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 String
private int
For system schemas, the only possible value for collation type is UCS_BASIC.static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
private final boolean
private final boolean
private final String
the public interface for this system: public String getSchemaName(); public String getAuthorizationId(); public void setUUID(UUID uuid); public boolean isSystemSchema();static final String
private UUID
static final String
static final String
static final String
static final String
STD_DEFAULT_SCHEMA_NAME is the name of the default schema in databases that use ANSI standard identifier casing.static final String
This schema is used for jar handling procedures.static final String
This schema is for Derby specific system diagnostic procedures and functions which are not available in DB2.static final String
STD_SYSTEM_SCHEMA_NAME is the name of the system schema in databases that use ANSI standard identifier casing.static final String
This schema is for Derby specific system diagnostic procedures and functions which are not available in DB2.static final String
UUID's used as key's in the SYSSCHEMA catalog for the system schema'sstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
Fields inherited from interface org.apache.derby.catalog.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 TypeMethodDescriptionvoid
drop
(LanguageConnectionContext lcc, Activation activation) Drop this schema.boolean
Determine if two SchemaDescriptors are the same.Gets the authorization id of the schemaGet the provider's type.int
Returns 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 schemaint
hashCode()
Get a hashcode for this SchemaDescriptorboolean
Indicate whether this is a system schema with grantable routinesboolean
isSYSIBM()
boolean
Indicate whether this is a system schema or not Examples of system schema's include: SYS, SYSIBM, SYSCAT, SYSFUN, SYSPROC, SYSSTAT, and SYSCS_DIAGvoid
setAuthorizationId
(String newAuthorizationID) Sets the authorization id of the schema.void
Sets the oid of the schematoString()
Prints the contents of the SchemaDescriptorMethods inherited from class org.apache.derby.iapi.sql.dictionary.TupleDescriptor
getColumnDependableFinder, getDataDictionary, getDependableFinder, isPersistent, setDataDictionary
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.derby.catalog.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
the public interface for this system:- public String getSchemaName();
- public String getAuthorizationId();
- public void setUUID(UUID uuid);
- public boolean isSystemSchema();
-
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
Gets the name of the schema- Returns:
- The schema name
-
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:
getUUID
in classUniqueTupleDescriptor
- Returns:
- An oid
-
setUUID
Sets the oid of the schema- Parameters:
oid
- The object id
-
getCollationType
public int getCollationType()Returns the collation type associated with this schema- Returns:
- collation type
-
getDependableFinder
Description copied from interface:Dependable
Get an object which can be written to disk and which, when read from disk, will find or reconstruct this in-memory Dependable.- Specified by:
getDependableFinder
in interfaceDependable
- Returns:
- the stored form of this provider
- See Also:
-
getObjectName
Return the name of this Provider. (Useful for errors.)- Specified by:
getObjectName
in interfaceDependable
- Returns:
- String The name of this provider.
-
getObjectID
Get the provider's UUID- Specified by:
getObjectID
in interfaceDependable
- Returns:
- String The provider's UUID
-
getClassType
Get the provider's type.- Specified by:
getClassType
in interfaceDependable
- Returns:
- String The provider's type.
-
toString
Prints the contents of the SchemaDescriptor -
equals
Determine if two SchemaDescriptors are the same. -
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
public int hashCode()Get a hashcode for this SchemaDescriptor -
getDescriptorName
- Overrides:
getDescriptorName
in classTupleDescriptor
- See Also:
-
getDescriptorType
Description copied from class:TupleDescriptor
Each descriptor must identify itself with its type; i.e index, check constraint whatever.- Overrides:
getDescriptorType
in 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.
-