Top Description Fields Constructors Methods
org.apache.derby.iapi.sql.dictionary

public final Class SchemaDescriptor

extends UniqueTupleDescriptor
implements Provider
Class Inheritance
All Implemented Interfaces
org.apache.derby.iapi.sql.depend.Provider, org.apache.derby.catalog.Dependable
Imports
org.apache.derby.iapi.sql.conn.LanguageConnectionContext, org.apache.derby.iapi.sql.depend.DependencyManager, .Provider, org.apache.derby.iapi.sql.Activation, org.apache.derby.iapi.store.access.TransactionController, org.apache.derby.catalog.DependableFinder, .UUID, .Dependable, org.apache.derby.iapi.services.io.StoredFormatIds, org.apache.derby.shared.common.error.StandardException, org.apache.derby.shared.common.reference.Property, .SQLState

This class represents a schema descriptor
Version
0.1

Field Summary

Modifier and TypeField and Description
private String
private int
collationType

For system schemas, the only possible value for collation type is UCS_BASIC.

public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
private final boolean
private final boolean
private final String
public static final String
private UUID
public static final String
public static final String
public static final String
public static final String
STD_DEFAULT_SCHEMA_NAME

STD_DEFAULT_SCHEMA_NAME is the name of the default schema in databases that use ANSI standard identifier casing.

public static final String
STD_SQLJ_SCHEMA_NAME

This schema is used for jar handling procedures.

public static final String
STD_SYSTEM_DIAG_SCHEMA_NAME

This schema is for Derby specific system diagnostic procedures and functions which are not available in DB2.

public static final String
STD_SYSTEM_SCHEMA_NAME

STD_SYSTEM_SCHEMA_NAME is the name of the system schema in databases that use ANSI standard identifier casing.

public static final String
STD_SYSTEM_UTIL_SCHEMA_NAME

This schema is for Derby specific system diagnostic procedures and functions which are not available in DB2.

public static final String
SYSCAT_SCHEMA_UUID

UUID's used as key's in the SYSSCHEMA catalog for the system schema's

public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String

Constructor Summary

AccessConstructor and Description
public
SchemaDescriptor(DataDictionary dataDictionary, String
The schema descriptor for this table.
name
,
String
The authorization id
aid
,
UUID
The object id
oid
,
boolean
boolean, true iff this is a system schema, like SYS, SYSIBM, SYSCAT, SYSFUN, ....
isSystem
)

Constructor for a SchemaDescriptor.

Method Summary

Modifier and TypeMethod and Description
public void
drop(LanguageConnectionContext lcc, Activation activation)

Drop this schema.

public boolean

Returns:

true if they are the same, false otherwise
equals
(Object
other schemadescriptor
otherObject
)

Overrides java.lang.Object.equals.

Determine if two SchemaDescriptors are the same.

public String

Returns:

Authorization id lives in.
getAuthorizationId
()

Gets the authorization id of the schema

public String

Returns:

String The provider's type.
getClassType
()

Implements org.apache.derby.catalog.Dependable.getClassType.

Get the provider's type.

public int

Returns:

collation type
getCollationType
()

Returns the collation type associated with this schema

public DependableFinder

Returns:

the stored form of this provider
getDependableFinder
()

Implements org.apache.derby.catalog.Dependable.getDependableFinder.

Get an object which can be written to disk and which, when read from disk, will find or reconstruct this in-memory Dependable.

public String
public String
getDescriptorType()

Overrides org.apache.derby.iapi.sql.dictionary.TupleDescriptor.getDescriptorType.

Each descriptor must identify itself with its type; i.e index, check constraint whatever.

public UUID

Returns:

String The provider's UUID
getObjectID
()

Implements org.apache.derby.catalog.Dependable.getObjectID.

Get the provider's UUID

public String

Returns:

String The name of this provider.
getObjectName
()

Implements org.apache.derby.catalog.Dependable.getObjectName.

Return the name of this Provider.

public String

Returns:

The schema name
getSchemaName
()

Gets the name of the schema

public UUID

Returns:

An oid
getUUID
()

Implements abstract org.apache.derby.iapi.sql.dictionary.UniqueTupleDescriptor.getUUID.

Gets the oid of the schema

public int

Returns:

hashcode
hashCode
()

Overrides java.lang.Object.hashCode.

Get a hashcode for this SchemaDescriptor

public boolean

Returns:

true/false
isSchemaWithGrantableRoutines
()

Indicate whether this is a system schema with grantable routines

public boolean
public boolean

Returns:

true/false
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

public void
setAuthorizationId(String
What is is
newAuthorizationID
)

Sets the authorization id of the schema.

public void
setUUID(UUID
The object id
oid
)

Sets the oid of the schema

public String

Returns:

The contents as a String
toString
()

Overrides java.lang.Object.toString.

Prints the contents of the SchemaDescriptor

Field Detail

aidback to summary
private String aid
collationTypeback to summary
private int collationType

For 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.

DEFAULT_SCHEMA_UUIDback to summary
public static final String DEFAULT_SCHEMA_UUID
DEFAULT_USER_NAMEback to summary
public static final String DEFAULT_USER_NAME
IBM_SYSTEM_CAT_SCHEMA_NAMEback to summary
public static final String IBM_SYSTEM_CAT_SCHEMA_NAME
IBM_SYSTEM_FUN_SCHEMA_NAMEback to summary
public static final String IBM_SYSTEM_FUN_SCHEMA_NAME
IBM_SYSTEM_NULLID_SCHEMA_NAMEback to summary
public static final String IBM_SYSTEM_NULLID_SCHEMA_NAME
IBM_SYSTEM_PROC_SCHEMA_NAMEback to summary
public static final String IBM_SYSTEM_PROC_SCHEMA_NAME
IBM_SYSTEM_SCHEMA_NAMEback to summary
public static final String IBM_SYSTEM_SCHEMA_NAME
IBM_SYSTEM_STAT_SCHEMA_NAMEback to summary
public static final String IBM_SYSTEM_STAT_SCHEMA_NAME
isSYSIBMback to summary
private final boolean isSYSIBM
isSystemback to summary
private final boolean isSystem
nameback to summary
private final String name
NULLID_SCHEMA_UUIDback to summary
public static final String NULLID_SCHEMA_UUID
oidback to summary
private UUID oid
SA_USER_NAMEback to summary
public static final String SA_USER_NAME
SQLJ_SCHEMA_UUIDback to summary
public static final String SQLJ_SCHEMA_UUID
STD_DECLARED_GLOBAL_TEMPORARY_TABLES_SCHEMA_NAMEback to summary
public static final String STD_DECLARED_GLOBAL_TEMPORARY_TABLES_SCHEMA_NAME
STD_DEFAULT_SCHEMA_NAMEback to summary
public static final String 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

STD_SQLJ_SCHEMA_NAMEback to summary
public static final String STD_SQLJ_SCHEMA_NAME

This schema is used for jar handling procedures.

STD_SYSTEM_DIAG_SCHEMA_NAMEback to summary
public static final String STD_SYSTEM_DIAG_SCHEMA_NAME

This schema is for Derby specific system diagnostic procedures and functions which are not available in DB2.

STD_SYSTEM_SCHEMA_NAMEback to summary
public static final String 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

STD_SYSTEM_UTIL_SCHEMA_NAMEback to summary
public static final String STD_SYSTEM_UTIL_SCHEMA_NAME

This schema is for Derby specific system diagnostic procedures and functions which are not available in DB2.

SYSCAT_SCHEMA_UUIDback to summary
public static final String SYSCAT_SCHEMA_UUID

UUID's used as key's in the SYSSCHEMA catalog for the system schema's

SYSCS_DIAG_SCHEMA_UUIDback to summary
public static final String SYSCS_DIAG_SCHEMA_UUID
SYSCS_UTIL_SCHEMA_UUIDback to summary
public static final String SYSCS_UTIL_SCHEMA_UUID
SYSFUN_SCHEMA_UUIDback to summary
public static final String SYSFUN_SCHEMA_UUID
SYSIBM_SCHEMA_UUIDback to summary
public static final String SYSIBM_SCHEMA_UUID
SYSPROC_SCHEMA_UUIDback to summary
public static final String SYSPROC_SCHEMA_UUID
SYSSTAT_SCHEMA_UUIDback to summary
public static final String SYSSTAT_SCHEMA_UUID
SYSTEM_SCHEMA_UUIDback to summary
public static final String SYSTEM_SCHEMA_UUID

Constructor Detail

SchemaDescriptorback to summary
public SchemaDescriptor(DataDictionary dataDictionary, String name, String aid, UUID oid, boolean isSystem)

Constructor for a SchemaDescriptor.

Parameters
name:String

The schema descriptor for this table.

aid:String

The authorization id

oid:UUID

The object id

isSystem:boolean

boolean, true iff this is a system schema, like SYS, SYSIBM, SYSCAT, SYSFUN, ....

Method Detail

dropback to summary
public void drop(LanguageConnectionContext lcc, Activation activation) throws StandardException

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.

Exceptions
StandardException:
Schema could not be dropped.
equalsback to summary
public boolean equals(Object otherObject)

Overrides java.lang.Object.equals.

Determine if two SchemaDescriptors are the same.

Parameters
otherObject:Object

other schemadescriptor

Returns:boolean

true if they are the same, false otherwise

getAuthorizationIdback to summary
public String getAuthorizationId()

Gets the authorization id of the schema

Returns:String

Authorization id lives in.

getClassTypeback to summary
public String getClassType()

Implements org.apache.derby.catalog.Dependable.getClassType.

Get the provider's type.

Returns:String

String The provider's type.

getCollationTypeback to summary
public int getCollationType()

Returns the collation type associated with this schema

Returns:int

collation type

getDependableFinderback to summary
public DependableFinder getDependableFinder()

Implements org.apache.derby.catalog.Dependable.getDependableFinder.

Doc from org.apache.derby.catalog.Dependable.getDependableFinder.

Get an object which can be written to disk and which, when read from disk, will find or reconstruct this in-memory Dependable.

Returns:DependableFinder

the stored form of this provider

See Also
Dependable#getDependableFinder
getDescriptorNameback to summary
public String getDescriptorName()

Overrides org.apache.derby.iapi.sql.dictionary.TupleDescriptor.getDescriptorName.

See Also
TupleDescriptor#getDescriptorName
getDescriptorTypeback to summary
public String getDescriptorType()

Overrides org.apache.derby.iapi.sql.dictionary.TupleDescriptor.getDescriptorType.

Doc from org.apache.derby.iapi.sql.dictionary.TupleDescriptor.getDescriptorType.

Each descriptor must identify itself with its type; i.e index, check constraint whatever.

See Also
TupleDescriptor#getDescriptorType
getObjectIDback to summary
public UUID getObjectID()

Implements org.apache.derby.catalog.Dependable.getObjectID.

Get the provider's UUID

Returns:UUID

String The provider's UUID

getObjectNameback to summary
public String getObjectName()

Implements org.apache.derby.catalog.Dependable.getObjectName.

Return the name of this Provider. (Useful for errors.)

Returns:String

String The name of this provider.

getSchemaNameback to summary
public String getSchemaName()

Gets the name of the schema

Returns:String

The schema name

getUUIDback to summary
public UUID getUUID()

Implements abstract org.apache.derby.iapi.sql.dictionary.UniqueTupleDescriptor.getUUID.

Gets the oid of the schema

Returns:UUID

An oid

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Get a hashcode for this SchemaDescriptor

Returns:int

hashcode

isSchemaWithGrantableRoutinesback to summary
public boolean isSchemaWithGrantableRoutines()

Indicate whether this is a system schema with grantable routines

Returns:boolean

true/false

isSYSIBMback to summary
public boolean isSYSIBM()
isSystemSchemaback to summary
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:boolean

true/false

setAuthorizationIdback to summary
public void setAuthorizationId(String newAuthorizationID)

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:String

What is is

setUUIDback to summary
public void setUUID(UUID oid)

Sets the oid of the schema

Parameters
oid:UUID

The object id

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Prints the contents of the SchemaDescriptor

Returns:String

The contents as a String