本文整理汇总了Java中org.hsqldb.rights.Grantee类的典型用法代码示例。如果您正苦于以下问题:Java Grantee类的具体用法?Java Grantee怎么用?Java Grantee使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Grantee类属于org.hsqldb.rights包,在下文中一共展示了Grantee类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: dropSchemas
import org.hsqldb.rights.Grantee; //导入依赖的package包/类
/**
* drop all schemas with the given authorisation
*/
public void dropSchemas(Session session, Grantee grantee,
boolean cascade) {
writeLock.lock();
try {
HsqlArrayList list = getSchemas(grantee);
Iterator it = list.iterator();
while (it.hasNext()) {
Schema schema = (Schema) it.next();
dropSchema(session, schema.getName().name, cascade);
}
} finally {
writeLock.unlock();
}
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:22,代码来源:SchemaManager.java
示例2: getSchemas
import org.hsqldb.rights.Grantee; //导入依赖的package包/类
public HsqlArrayList getSchemas(Grantee grantee) {
readLock.lock();
try {
HsqlArrayList list = new HsqlArrayList();
Iterator it = schemaMap.values().iterator();
while (it.hasNext()) {
Schema schema = (Schema) it.next();
if (grantee.equals(schema.getOwner())) {
list.add(schema);
}
}
return list;
} finally {
readLock.unlock();
}
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:22,代码来源:SchemaManager.java
示例3: hasSchemas
import org.hsqldb.rights.Grantee; //导入依赖的package包/类
public boolean hasSchemas(Grantee grantee) {
readLock.lock();
try {
Iterator it = schemaMap.values().iterator();
while (it.hasNext()) {
Schema schema = (Schema) it.next();
if (grantee.equals(schema.getOwner())) {
return true;
}
}
return false;
} finally {
readLock.unlock();
}
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:21,代码来源:SchemaManager.java
示例4: dropRole
import org.hsqldb.rights.Grantee; //导入依赖的package包/类
private static void dropRole(Session session, HsqlName name,
boolean cascade) {
Grantee role = session.database.getGranteeManager().getRole(name.name);
if (!cascade && session.database.schemaManager.hasSchemas(role)) {
HsqlArrayList list =
session.database.schemaManager.getSchemas(role);
Schema schema = (Schema) list.get(0);
throw Error.error(ErrorCode.X_42502,
schema.getName().statementName);
}
session.database.schemaManager.dropSchemas(session, role, cascade);
session.database.getGranteeManager().dropRole(name.name);
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:18,代码来源:StatementSchema.java
示例5: dropUser
import org.hsqldb.rights.Grantee; //导入依赖的package包/类
private static void dropUser(Session session, HsqlName name,
boolean cascade) {
Grantee grantee = session.database.getUserManager().get(name.name);
if (session.database.getSessionManager().isUserActive(name.name)) {
throw Error.error(ErrorCode.X_42539);
}
if (!cascade && session.database.schemaManager.hasSchemas(grantee)) {
HsqlArrayList list =
session.database.schemaManager.getSchemas(grantee);
Schema schema = (Schema) list.get(0);
throw Error.error(ErrorCode.X_42502,
schema.getName().statementName);
}
session.database.schemaManager.dropSchemas(session, grantee, cascade);
session.database.getUserManager().dropUser(name.name);
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:22,代码来源:StatementSchema.java
示例6: Schema
import org.hsqldb.rights.Grantee; //导入依赖的package包/类
public Schema(HsqlName name, Grantee owner) {
this.name = name;
triggerLookup = new SchemaObjectSet(SchemaObject.TRIGGER);
indexLookup = new SchemaObjectSet(SchemaObject.INDEX);
constraintLookup = new SchemaObjectSet(SchemaObject.CONSTRAINT);
tableLookup = new SchemaObjectSet(SchemaObject.TABLE);
sequenceLookup = new SchemaObjectSet(SchemaObject.SEQUENCE);
typeLookup = new SchemaObjectSet(SchemaObject.TYPE);
charsetLookup = new SchemaObjectSet(SchemaObject.CHARSET);
collationLookup = new SchemaObjectSet(SchemaObject.COLLATION);
procedureLookup = new SchemaObjectSet(SchemaObject.PROCEDURE);
functionLookup = new SchemaObjectSet(SchemaObject.FUNCTION);
specificRoutineLookup =
new SchemaObjectSet(SchemaObject.SPECIFIC_ROUTINE);
assertionLookup = new SchemaObjectSet(SchemaObject.ASSERTION);
referenceLookup = new SchemaObjectSet(SchemaObject.REFERENCE);
tableList = (HashMappedList) tableLookup.map;
sequenceList = (HashMappedList) sequenceLookup.map;
referenceList = (HashMappedList) referenceLookup.map;
name.owner = owner;
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:23,代码来源:Schema.java
示例7: Schema
import org.hsqldb.rights.Grantee; //导入依赖的package包/类
public Schema(HsqlName name, Grantee owner) {
this.name = name;
triggerLookup = new SchemaObjectSet(SchemaObject.TRIGGER);
indexLookup = new SchemaObjectSet(SchemaObject.INDEX);
constraintLookup = new SchemaObjectSet(SchemaObject.CONSTRAINT);
tableLookup = new SchemaObjectSet(SchemaObject.TABLE);
sequenceLookup = new SchemaObjectSet(SchemaObject.SEQUENCE);
typeLookup = new SchemaObjectSet(SchemaObject.TYPE);
charsetLookup = new SchemaObjectSet(SchemaObject.CHARSET);
collationLookup = new SchemaObjectSet(SchemaObject.COLLATION);
procedureLookup = new SchemaObjectSet(SchemaObject.PROCEDURE);
functionLookup = new SchemaObjectSet(SchemaObject.FUNCTION);
specificRoutineLookup =
new SchemaObjectSet(SchemaObject.SPECIFIC_ROUTINE);
assertionLookup = new SchemaObjectSet(SchemaObject.ASSERTION);
tableList = (HashMappedList) tableLookup.map;
sequenceList = (HashMappedList) sequenceLookup.map;
name.owner = owner;
}
开发者ID:Julien35,项目名称:dev-courses,代码行数:21,代码来源:Schema.java
示例8: toSchemaOwner
import org.hsqldb.rights.Grantee; //导入依赖的package包/类
public Grantee toSchemaOwner(String name) {
// Note that INFORMATION_SCHEMA and DEFINITION_SCHEMA aren't in the
// backing map.
// This may not be the most elegant solution, but it is the safest
// (without doing a code review for implications of adding
// them to the map).
if (SqlInvariants.INFORMATION_SCHEMA_HSQLNAME.name.equals(name)) {
return SqlInvariants.INFORMATION_SCHEMA_HSQLNAME.owner;
}
Schema schema = (Schema) schemaMap.get(name);
return schema == null ? null
: schema.owner;
}
开发者ID:s-store,项目名称:sstore-soft,代码行数:17,代码来源:SchemaManager.java
示例9: dropRole
import org.hsqldb.rights.Grantee; //导入依赖的package包/类
private static void dropRole(Session session, HsqlName name,
boolean cascade) {
Grantee role = session.database.getGranteeManager().getRole(name.name);
if (!cascade && session.database.schemaManager.hasSchemas(role)) {
HsqlArrayList list =
session.database.schemaManager.getSchemas(role);
Schema schema = (Schema) list.get(0);
throw Error.error(ErrorCode.X_42502,
schema.getName().statementName);
}
session.database.schemaManager.dropSchemas(role, cascade);
session.database.getGranteeManager().dropRole(name.name);
}
开发者ID:s-store,项目名称:sstore-soft,代码行数:18,代码来源:StatementSchema.java
示例10: dropUser
import org.hsqldb.rights.Grantee; //导入依赖的package包/类
private static void dropUser(Session session, HsqlName name,
boolean cascade) {
Grantee grantee = session.database.getUserManager().get(name.name);
if (session.database.getSessionManager().isUserActive(name.name)) {
throw Error.error(ErrorCode.X_42539);
}
if (!cascade && session.database.schemaManager.hasSchemas(grantee)) {
HsqlArrayList list =
session.database.schemaManager.getSchemas(grantee);
Schema schema = (Schema) list.get(0);
throw Error.error(ErrorCode.X_42502,
schema.getName().statementName);
}
session.database.schemaManager.dropSchemas(grantee, cascade);
session.database.getUserManager().dropUser(name.name);
}
开发者ID:s-store,项目名称:sstore-soft,代码行数:22,代码来源:StatementSchema.java
示例11: Schema
import org.hsqldb.rights.Grantee; //导入依赖的package包/类
Schema(HsqlName name, Grantee owner) {
this.name = name;
triggerLookup = new SchemaObjectSet(SchemaObject.TRIGGER);
indexLookup = new SchemaObjectSet(SchemaObject.INDEX);
constraintLookup = new SchemaObjectSet(SchemaObject.CONSTRAINT);
tableLookup = new SchemaObjectSet(SchemaObject.TABLE);
streamLookup = new SchemaObjectSet(SchemaObject.STREAM);
sequenceLookup = new SchemaObjectSet(SchemaObject.SEQUENCE);
typeLookup = new SchemaObjectSet(SchemaObject.TYPE);
charsetLookup = new SchemaObjectSet(SchemaObject.CHARSET);
collationLookup = new SchemaObjectSet(SchemaObject.COLLATION);
procedureLookup = new SchemaObjectSet(SchemaObject.PROCEDURE);
functionLookup = new SchemaObjectSet(SchemaObject.FUNCTION);
assertionLookup = new SchemaObjectSet(SchemaObject.ASSERTION);
tableList = (HashMappedList) tableLookup.map;
sequenceList = (HashMappedList) sequenceLookup.map;
this.owner = owner;
name.owner = owner;
}
开发者ID:s-store,项目名称:sstore-soft,代码行数:21,代码来源:Schema.java
示例12: compileCreateUser
import org.hsqldb.rights.Grantee; //导入依赖的package包/类
StatementSchema compileCreateUser() {
HsqlName name;
String password;
Boolean admin = Boolean.FALSE;
Boolean isDigest = Boolean.FALSE;
Grantee grantor = session.getGrantee();
read();
name = readNewUserIdentifier();
readThis(Tokens.PASSWORD);
if (readIfThis(Tokens.DIGEST)) {
isDigest = Boolean.TRUE;
}
password = readPassword();
if (token.tokenType == Tokens.ADMIN) {
read();
admin = Boolean.TRUE;
}
checkDatabaseUpdateAuthorisation();
String sql = getLastPart();
Object[] args = new Object[] {
name, password, grantor, admin, isDigest
};
HsqlName[] writeLockNames = database.schemaManager.catalogNameArray;
return new StatementSchema(sql, StatementTypes.CREATE_USER, args,
null, writeLockNames);
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:38,代码来源:ParserDDL.java
示例13: getOwner
import org.hsqldb.rights.Grantee; //导入依赖的package包/类
public final Grantee getOwner() {
if (userTypeModifier == null) {
throw Error.runtimeError(ErrorCode.U_S0500, "Type");
}
return userTypeModifier.getOwner();
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:9,代码来源:Type.java
示例14: createSchema
import org.hsqldb.rights.Grantee; //导入依赖的package包/类
/**
* Creates a schema belonging to the given grantee.
*/
public void createSchema(HsqlName name, Grantee owner) {
writeLock.lock();
try {
SqlInvariants.checkSchemaNameNotSystem(name.name);
Schema schema = new Schema(name, owner);
schemaMap.add(name.name, schema);
} finally {
writeLock.unlock();
}
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:18,代码来源:SchemaManager.java
示例15: toSchemaOwner
import org.hsqldb.rights.Grantee; //导入依赖的package包/类
public Grantee toSchemaOwner(String name) {
readLock.lock();
try {
Schema schema = (Schema) schemaMap.get(name);
return schema == null ? null
: schema.getOwner();
} finally {
readLock.unlock();
}
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:14,代码来源:SchemaManager.java
示例16: isSchemaAuthorisation
import org.hsqldb.rights.Grantee; //导入依赖的package包/类
/**
* is a grantee the authorization of any schema
*/
boolean isSchemaAuthorisation(Grantee grantee) {
Iterator schemas = allSchemaNameIterator();
while (schemas.hasNext()) {
String schemaName = (String) schemas.next();
if (grantee.equals(toSchemaOwner(schemaName))) {
return true;
}
}
return false;
}
开发者ID:s-store,项目名称:sstore-soft,代码行数:18,代码来源:SchemaManager.java
示例17: dropSchemas
import org.hsqldb.rights.Grantee; //导入依赖的package包/类
/**
* drop all schemas with the given authorisation
*/
void dropSchemas(Grantee grantee, boolean cascade) {
HsqlArrayList list = getSchemas(grantee);
Iterator it = list.iterator();
while (it.hasNext()) {
Schema schema = (Schema) it.next();
dropSchema(schema.name.name, cascade);
}
}
开发者ID:s-store,项目名称:sstore-soft,代码行数:15,代码来源:SchemaManager.java
示例18: getSchemas
import org.hsqldb.rights.Grantee; //导入依赖的package包/类
HsqlArrayList getSchemas(Grantee grantee) {
HsqlArrayList list = new HsqlArrayList();
Iterator it = schemaMap.values().iterator();
while (it.hasNext()) {
Schema schema = (Schema) it.next();
if (grantee.equals(schema.owner)) {
list.add(schema);
}
}
return list;
}
开发者ID:s-store,项目名称:sstore-soft,代码行数:16,代码来源:SchemaManager.java
示例19: hasSchemas
import org.hsqldb.rights.Grantee; //导入依赖的package包/类
boolean hasSchemas(Grantee grantee) {
Iterator it = schemaMap.values().iterator();
while (it.hasNext()) {
Schema schema = (Schema) it.next();
if (grantee.equals(schema.owner)) {
return true;
}
}
return false;
}
开发者ID:s-store,项目名称:sstore-soft,代码行数:15,代码来源:SchemaManager.java
示例20: getOwner
import org.hsqldb.rights.Grantee; //导入依赖的package包/类
public Grantee getOwner() {
return columnName.schema == null ? null
: columnName.schema.owner;
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:5,代码来源:ColumnSchema.java
注:本文中的org.hsqldb.rights.Grantee类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论