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

public final Class AliasDescriptor

extends PrivilegedSQLObject
implements Provider, Dependent
Class Inheritance
All Implemented Interfaces
org.apache.derby.iapi.sql.depend.Dependent, org.apache.derby.catalog.Dependable, org.apache.derby.iapi.sql.depend.Provider
Imports
org.apache.derby.iapi.sql.conn.LanguageConnectionContext, org.apache.derby.iapi.sql.depend.DependencyManager, .Dependent, .Provider, org.apache.derby.iapi.store.access.TransactionController, org.apache.derby.shared.common.error.StandardException, org.apache.derby.shared.common.reference.SQLState, org.apache.derby.shared.common.sanity.SanityManager, org.apache.derby.catalog.AliasInfo, .UUID, .AliasInfo, .DependableFinder, .Dependable, .UUID, org.apache.derby.catalog.types.AggregateAliasInfo, .RoutineAliasInfo, .UDTAliasInfo, org.apache.derby.iapi.services.io.StoredFormatIds, org.apache.derby.iapi.util.IdUtil

This class represents an Alias Descriptor. The public methods for this class are:
  1. getUUID
  2. getJavaClassName
  3. getAliasType
  4. getNameSpace
  5. getSystemAlias
  6. getAliasId

Field Summary

Modifier and TypeField and Description
private final UUID
private final AliasInfo
private final String
private final char
private final String
private final char
private final SchemaDescriptor
private final UUID
private final String
private final boolean

Constructor Summary

AccessConstructor and Description
public
AliasDescriptor(DataDictionary
The data dictionary that this descriptor lives in
dataDictionary
,
UUID
The UUID for this alias
aliasID
,
String
The name of the method alias
aliasName
,
UUID
The UUID for this alias's schema
schemaID
,
String
The java class name of the alias
javaClassName
,
char
The alias type
aliasType
,
char
The alias name space
nameSpace
,
boolean systemAlias, AliasInfo
The AliasInfo for the alias
aliasInfo
,
String specificName)

Constructor for a AliasDescriptor

Method Summary

Modifier and TypeMethod and Description
public void
drop(LanguageConnectionContext lcc)

Drop the routine or synonym.

public boolean

Returns:

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

Overrides java.lang.Object.equals.

Determine if two AliasDescriptors are the same.

public AliasInfo

Returns:

The AliasInfo for the alias.
getAliasInfo
()

Gests the AliasInfo for the alias.

public char

Returns:

The type of the alias.
getAliasType
()

Gets the type of the alias.

public static final String
getAliasType(char nameSpace)

public String

Returns:

String The provider's type.
getClassType
()

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

Get the provider's type.

public DependableFinder

Returns:

the stored form of this provider representation
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 String

Returns:

The java class name of the alias.
getJavaClassName
()

Gets the java class name of the alias.

public final String

Returns:

A String containing the name of the statement.
getName
()

Implements abstract org.apache.derby.iapi.sql.dictionary.UniqueSQLObjectDescriptor.getName.

Gets the name of the alias.

public char

Returns:

The name space of the alias.
getNameSpace
()

Gets the name space of the alias.

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
getObjectTypeName()

Implements abstract org.apache.derby.iapi.sql.dictionary.PrivilegedSQLObject.getObjectTypeName.

Get the type of the object for storage in SYS.SYSPERMS

public String

Returns:

A String containing the name of the table.
getQualifiedName
()

Gets the full, qualified name of the alias.

public final SchemaDescriptor

Returns:

SchemaDescriptor The SchemaDescriptor.
getSchemaDescriptor
()

Implements abstract org.apache.derby.iapi.sql.dictionary.UniqueSQLObjectDescriptor.getSchemaDescriptor.

Gets the SchemaDescriptor for this alias.

public String

Returns:

A String containing the name of the schema that the alias lives in.
getSchemaName
()

Gets the name of the schema that the alias lives in.

public UUID

Returns:

The UUID String of the schema id.
getSchemaUUID
()

Gets the UUID of the schema for this method alias.

public String
getSpecificName()

Return the specific name for this object.

public boolean

Returns:

Whether or not the alias is a system alias.
getSystemAlias
()

Gets whether or not the alias is a system alias.

public UUID

Returns:

The UUID String of the method alias.
getUUID
()

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

Gets the UUID of the method alias.

public int

Returns:

hashcode
hashCode
()

Overrides java.lang.Object.hashCode.

Get a hashcode for this AliasDescriptor

public boolean
isPersistent()

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

Implements org.apache.derby.catalog.Dependable.isPersistent.

Functions are persistent unless they are in the SYSFUN schema.

public boolean
isTableFunction()

Report whether this descriptor describes a Table Function.

public synchronized boolean

Returns:

true if the dependent is currently valid
isValid
()

Implements org.apache.derby.iapi.sql.depend.Dependent.isValid.

Check that all of the dependent's dependencies are valid.

public void
makeInvalid(int
The action causing the invalidation
action
,
LanguageConnectionContext
The LanguageConnectionContext
lcc
)

Implements org.apache.derby.iapi.sql.depend.Dependent.makeInvalid.

Mark the dependent as invalid (due to at least one of its dependencies being invalid).

public void
prepareToInvalidate(Provider
the provider
p
,
int
The action causing the invalidation
action
,
LanguageConnectionContext
The LanguageConnectionContext
lcc
)

Implements org.apache.derby.iapi.sql.depend.Dependent.prepareToInvalidate.

Prepare to mark the dependent as invalid (due to at least one of its dependencies being invalid).

public String

Returns:

A String representation of this AliasDescriptor
toString
()

Overrides java.lang.Object.toString.

Convert the AliasDescriptor to a String.

Field Detail

aliasIDback to summary
private final UUID aliasID
aliasInfoback to summary
private final AliasInfo aliasInfo
aliasNameback to summary
private final String aliasName
aliasTypeback to summary
private final char aliasType
javaClassNameback to summary
private final String javaClassName
nameSpaceback to summary
private final char nameSpace
schemaDescriptorback to summary
private final SchemaDescriptor schemaDescriptor
schemaIDback to summary
private final UUID schemaID
specificNameback to summary
private final String specificName
systemAliasback to summary
private final boolean systemAlias

Constructor Detail

AliasDescriptorback to summary
public AliasDescriptor(DataDictionary dataDictionary, UUID aliasID, String aliasName, UUID schemaID, String javaClassName, char aliasType, char nameSpace, boolean systemAlias, AliasInfo aliasInfo, String specificName) throws StandardException

Constructor for a AliasDescriptor

Parameters
dataDictionary:DataDictionary

The data dictionary that this descriptor lives in

aliasID:UUID

The UUID for this alias

aliasName:String

The name of the method alias

schemaID:UUID

The UUID for this alias's schema

javaClassName:String

The java class name of the alias

aliasType:char

The alias type

nameSpace:char

The alias name space

aliasInfo:AliasInfo

The AliasInfo for the alias

Method Detail

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

Drop the routine or synonym. For a routine its permission descriptors will be dropped as well. For a synonym its TableDescriptor will be dropped as well.

equalsback to summary
public boolean equals(Object otherObject)

Overrides java.lang.Object.equals.

Determine if two AliasDescriptors are the same.

Parameters
otherObject:Object

other descriptor

Returns:boolean

true if they are the same, false otherwise

getAliasInfoback to summary
public AliasInfo getAliasInfo()

Gests the AliasInfo for the alias.

Returns:AliasInfo

The AliasInfo for the alias.

getAliasTypeback to summary
public char getAliasType()

Gets the type of the alias.

Returns:char

The type of the alias.

getAliasTypeback to summary
public static final String getAliasType(char nameSpace)
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.

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 representation

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
getJavaClassNameback to summary
public String getJavaClassName()

Gets the java class name of the alias.

Returns:String

The java class name of the alias.

getNameback to summary
public final String getName()

Implements abstract org.apache.derby.iapi.sql.dictionary.UniqueSQLObjectDescriptor.getName.

Gets the name of the alias.

Returns:String

A String containing the name of the statement.

getNameSpaceback to summary
public char getNameSpace()

Gets the name space of the alias.

Returns:char

The name space of the alias.

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.

getObjectTypeNameback to summary
public String getObjectTypeName()

Implements abstract org.apache.derby.iapi.sql.dictionary.PrivilegedSQLObject.getObjectTypeName.

Doc from org.apache.derby.iapi.sql.dictionary.PrivilegedSQLObject.getObjectTypeName.

Get the type of the object for storage in SYS.SYSPERMS

See Also
PrivilegedSQLObject#getObjectTypeName
getQualifiedNameback to summary
public String getQualifiedName()

Gets the full, qualified name of the alias.

Returns:String

A String containing the name of the table.

getSchemaDescriptorback to summary
public final SchemaDescriptor getSchemaDescriptor()

Implements abstract org.apache.derby.iapi.sql.dictionary.UniqueSQLObjectDescriptor.getSchemaDescriptor.

Gets the SchemaDescriptor for this alias.

Returns:SchemaDescriptor

SchemaDescriptor The SchemaDescriptor.

getSchemaNameback to summary
public String getSchemaName()

Gets the name of the schema that the alias lives in.

Returns:String

A String containing the name of the schema that the alias lives in.

getSchemaUUIDback to summary
public UUID getSchemaUUID()

Gets the UUID of the schema for this method alias.

Returns:UUID

The UUID String of the schema id.

getSpecificNameback to summary
public String getSpecificName()

Return the specific name for this object.

getSystemAliasback to summary
public boolean getSystemAlias()

Gets whether or not the alias is a system alias.

Returns:boolean

Whether or not the alias is a system alias.

getUUIDback to summary
public UUID getUUID()

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

Gets the UUID of the method alias.

Returns:UUID

The UUID String of the method alias.

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Get a hashcode for this AliasDescriptor

Returns:int

hashcode

isPersistentback to summary
public boolean isPersistent()

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

Implements org.apache.derby.catalog.Dependable.isPersistent.

Functions are persistent unless they are in the SYSFUN schema.

Returns:boolean

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

true if this Dependable is persistent.

isTableFunctionback to summary
public boolean isTableFunction()

Report whether this descriptor describes a Table Function.

isValidback to summary
public synchronized boolean isValid()

Implements org.apache.derby.iapi.sql.depend.Dependent.isValid.

Check that all of the dependent's dependencies are valid.

Returns:boolean

true if the dependent is currently valid

makeInvalidback to summary
public void makeInvalid(int action, LanguageConnectionContext lcc) throws StandardException

Implements org.apache.derby.iapi.sql.depend.Dependent.makeInvalid.

Mark the dependent as invalid (due to at least one of its dependencies being invalid). Always an error for an alias -- should never have gotten here.

Parameters
action:int

The action causing the invalidation

lcc:LanguageConnectionContext

Doc from org.apache.derby.iapi.sql.depend.Dependent.makeInvalid.

The LanguageConnectionContext

Exceptions
StandardException:
thrown if called in sanity mode
prepareToInvalidateback to summary
public void prepareToInvalidate(Provider p, int action, LanguageConnectionContext lcc) throws StandardException

Implements org.apache.derby.iapi.sql.depend.Dependent.prepareToInvalidate.

Prepare to mark the dependent as invalid (due to at least one of its dependencies being invalid).

Parameters
p:Provider

the provider

action:int

The action causing the invalidation

lcc:LanguageConnectionContext

Doc from org.apache.derby.iapi.sql.depend.Dependent.prepareToInvalidate.

The LanguageConnectionContext

Exceptions
StandardException:
thrown if unable to make it invalid
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Convert the AliasDescriptor to a String.

Returns:String

A String representation of this AliasDescriptor