Class SchemaDescriptor
java.lang.Object
org.apache.derby.iapi.sql.dictionary.TupleDescriptor
org.apache.derby.iapi.sql.dictionary.UniqueTupleDescriptor
org.apache.derby.iapi.sql.dictionary.SchemaDescriptor
- All Implemented Interfaces:
Dependable, Provider
This class represents a schema descriptor
- Version:
- 0.1
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate intFor system schemas, the only possible value for collation type is UCS_BASIC.static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprivate final booleanprivate final booleanprivate final String/ Implementationstatic final Stringprivate UUIDstatic final Stringstatic final Stringstatic final Stringstatic final StringSTD_DEFAULT_SCHEMA_NAME is the name of the default schema in databases that use ANSI standard identifier casing.static final StringThis schema is used for jar handling procedures.static final StringThis schema is for Derby specific system diagnostic procedures and functions which are not available in DB2.static final StringSTD_SYSTEM_SCHEMA_NAME is the name of the system schema in databases that use ANSI standard identifier casing.static final StringThis schema is for Derby specific system diagnostic procedures and functions which are not available in DB2.static final StringUUID's used as key's in the SYSSCHEMA catalog for the system schema'sstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from interface Dependable
ACTIVATION, ALIAS, COLUMNS_IN_TABLE, COLUMNS_PERMISSION, CONGLOMERATE, CONSTRAINT, DEFAULT, FILE, HEAP, INDEX, PERM, PREPARED_STATEMENT, ROLE_GRANT, ROUTINE_PERMISSION, SCHEMA, SEQUENCE, STORED_PREPARED_STATEMENT, TABLE, TABLE_PERMISSION, TRIGGER, VIEW -
Constructor Summary
ConstructorsConstructorDescriptionSchemaDescriptor(DataDictionary dataDictionary, String name, String aid, UUID oid, boolean isSystem) Constructor for a SchemaDescriptor. -
Method Summary
Modifier and TypeMethodDescriptionvoiddrop(LanguageConnectionContext lcc, Activation activation) Drop this schema.booleanDetermine if two SchemaDescriptors are the same.Gets the authorization id of the schemaGet the provider's type.intReturns the collation type associated with this schemaGet an object which can be written to disk and which, when read from disk, will find or reconstruct this in-memory Dependable.Each descriptor must identify itself with its type; i.e index, check constraint whatever.Get the provider's UUIDReturn the name of this Provider.Gets the name of the schemagetUUID()Gets the oid of the schemainthashCode()Get a hashcode for this SchemaDescriptorbooleanIndicate whether this is a system schema with grantable routinesbooleanisSYSIBM()booleanIndicate whether this is a system schema or not Examples of system schema's include: SYS, SYSIBM, SYSCAT, SYSFUN, SYSPROC, SYSSTAT, and SYSCS_DIAGvoidsetAuthorizationId(String newAuthorizationID) Sets the authorization id of the schema.voidSets the oid of the schematoString()Prints the contents of the SchemaDescriptorMethods inherited from class TupleDescriptor
getColumnDependableFinder, getDataDictionary, getDependableFinder, isPersistent, setDataDictionaryMethods inherited from interface Dependable
isPersistent
-
Field Details
-
STD_SYSTEM_SCHEMA_NAME
STD_SYSTEM_SCHEMA_NAME is the name of the system schema in databases that use ANSI standard identifier casing. See org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext#getSystemSchemaName- See Also:
-
IBM_SYSTEM_SCHEMA_NAME
- See Also:
-
IBM_SYSTEM_CAT_SCHEMA_NAME
- See Also:
-
IBM_SYSTEM_FUN_SCHEMA_NAME
- See Also:
-
IBM_SYSTEM_PROC_SCHEMA_NAME
- See Also:
-
IBM_SYSTEM_STAT_SCHEMA_NAME
- See Also:
-
IBM_SYSTEM_NULLID_SCHEMA_NAME
- See Also:
-
STD_SQLJ_SCHEMA_NAME
This schema is used for jar handling procedures.- See Also:
-
STD_SYSTEM_DIAG_SCHEMA_NAME
This schema is for Derby specific system diagnostic procedures and functions which are not available in DB2.- See Also:
-
STD_SYSTEM_UTIL_SCHEMA_NAME
This schema is for Derby specific system diagnostic procedures and functions which are not available in DB2.- See Also:
-
STD_DEFAULT_SCHEMA_NAME
STD_DEFAULT_SCHEMA_NAME is the name of the default schema in databases that use ANSI standard identifier casing. See org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext#getDefaultSchemaName- See Also:
-
SYSCAT_SCHEMA_UUID
UUID's used as key's in the SYSSCHEMA catalog for the system schema's- See Also:
-
SYSFUN_SCHEMA_UUID
- See Also:
-
SYSPROC_SCHEMA_UUID
- See Also:
-
SYSSTAT_SCHEMA_UUID
- See Also:
-
SYSCS_DIAG_SCHEMA_UUID
- See Also:
-
SYSCS_UTIL_SCHEMA_UUID
- See Also:
-
NULLID_SCHEMA_UUID
- See Also:
-
SQLJ_SCHEMA_UUID
- See Also:
-
SYSTEM_SCHEMA_UUID
- See Also:
-
SYSIBM_SCHEMA_UUID
- See Also:
-
DEFAULT_SCHEMA_UUID
- See Also:
-
STD_DECLARED_GLOBAL_TEMPORARY_TABLES_SCHEMA_NAME
- See Also:
-
DEFAULT_USER_NAME
- See Also:
-
SA_USER_NAME
- See Also:
-
name
/ Implementation -
oid
-
aid
-
isSystem
private final boolean isSystem -
isSYSIBM
private final boolean isSYSIBM -
collationType
private int collationTypeFor system schemas, the only possible value for collation type is UCS_BASIC. For user schemas, the collation type can be UCS_BASIC or TERRITORY_BASED.
-
-
Constructor Details
-
SchemaDescriptor
public SchemaDescriptor(DataDictionary dataDictionary, String name, String aid, UUID oid, boolean isSystem) Constructor for a SchemaDescriptor.- Parameters:
dataDictionary-name- The schema descriptor for this table.aid- The authorization idoid- The object idisSystem- boolean, true iff this is a system schema, like SYS, SYSIBM, SYSCAT, SYSFUN, ....
-
-
Method Details
-
getSchemaName
-
getAuthorizationId
Gets the authorization id of the schema- Returns:
- Authorization id lives in.
-
setAuthorizationId
Sets the authorization id of the schema. This is only used by the DataDictionary during boot in order to patch up the authorization ids on system schemas.- Parameters:
newAuthorizationID- What is is
-
getUUID
Gets the oid of the schema- Specified by:
getUUIDin classUniqueTupleDescriptor- Returns:
- An oid
-
setUUID
-
getCollationType
public int getCollationType()Returns the collation type associated with this schema- Returns:
- collation type
-
getDependableFinder
Description copied from interface:DependableGet an object which can be written to disk and which, when read from disk, will find or reconstruct this in-memory Dependable.- Specified by:
getDependableFinderin interfaceDependable- Returns:
- the stored form of this provider
- See Also:
-
getObjectName
Return the name of this Provider. (Useful for errors.)- Specified by:
getObjectNamein interfaceDependable- Returns:
- String The name of this provider.
-
getObjectID
Get the provider's UUID- Specified by:
getObjectIDin interfaceDependable- Returns:
- String The provider's UUID
-
getClassType
Get the provider's type.- Specified by:
getClassTypein interfaceDependable- Returns:
- String The provider's type.
-
toString
-
equals
-
isSystemSchema
public boolean isSystemSchema()Indicate whether this is a system schema or not Examples of system schema's include: SYS, SYSIBM, SYSCAT, SYSFUN, SYSPROC, SYSSTAT, and SYSCS_DIAG- Returns:
- true/false
-
isSchemaWithGrantableRoutines
public boolean isSchemaWithGrantableRoutines()Indicate whether this is a system schema with grantable routines- Returns:
- true/false
-
isSYSIBM
public boolean isSYSIBM() -
hashCode
-
getDescriptorName
- Overrides:
getDescriptorNamein classTupleDescriptor- See Also:
-
getDescriptorType
Description copied from class:TupleDescriptorEach descriptor must identify itself with its type; i.e index, check constraint whatever.- Overrides:
getDescriptorTypein classTupleDescriptor- See Also:
-
drop
Drop this schema. Drops the schema if it is empty. If the schema was the current default then the current default will be reset through the language connection context.- Throws:
StandardException- Schema could not be dropped.
-