Class AliasDescriptor

All Implemented Interfaces:
Dependable, Dependent, Provider

public final class AliasDescriptor extends PrivilegedSQLObject implements Provider, Dependent
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 Details

    • aliasID

      private final UUID aliasID
    • aliasName

      private final String aliasName
    • schemaID

      private final UUID schemaID
    • javaClassName

      private final String javaClassName
    • aliasType

      private final char aliasType
    • nameSpace

      private final char nameSpace
    • systemAlias

      private final boolean systemAlias
    • aliasInfo

      private final AliasInfo aliasInfo
    • specificName

      private final String specificName
    • schemaDescriptor

      private final SchemaDescriptor schemaDescriptor
  • Constructor Details

    • AliasDescriptor

      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 - The data dictionary that this descriptor lives in
      aliasID - The UUID for this alias
      aliasName - The name of the method alias
      schemaID - The UUID for this alias's schema
      javaClassName - The java class name of the alias
      aliasType - The alias type
      nameSpace - The alias name space
      aliasInfo - The AliasInfo for the alias
      Throws:
      StandardException
  • Method Details

    • getUUID

      public UUID getUUID()
      Gets the UUID of the method alias.
      Specified by:
      getUUID in class UniqueTupleDescriptor
      Returns:
      The UUID String of the method alias.
    • getObjectTypeName

      public String getObjectTypeName()
      Description copied from class: PrivilegedSQLObject
      Get the type of the object for storage in SYS.SYSPERMS
      Specified by:
      getObjectTypeName in class PrivilegedSQLObject
      See Also:
    • getSchemaUUID

      public UUID getSchemaUUID()
      Gets the UUID of the schema for this method alias.
      Returns:
      The UUID String of the schema id.
    • getSchemaDescriptor

      public final SchemaDescriptor getSchemaDescriptor()
      Gets the SchemaDescriptor for this alias.
      Specified by:
      getSchemaDescriptor in class UniqueSQLObjectDescriptor
      Returns:
      SchemaDescriptor The SchemaDescriptor.
    • getName

      public final String getName()
      Gets the name of the alias.
      Specified by:
      getName in class UniqueSQLObjectDescriptor
      Returns:
      A String containing the name of the statement.
    • getSchemaName

      public String getSchemaName()
      Gets the name of the schema that the alias lives in.
      Returns:
      A String containing the name of the schema that the alias lives in.
    • getQualifiedName

      public String getQualifiedName()
      Gets the full, qualified name of the alias.
      Returns:
      A String containing the name of the table.
    • getJavaClassName

      public String getJavaClassName()
      Gets the java class name of the alias.
      Returns:
      The java class name of the alias.
    • getAliasType

      public char getAliasType()
      Gets the type of the alias.
      Returns:
      The type of the alias.
    • getNameSpace

      public char getNameSpace()
      Gets the name space of the alias.
      Returns:
      The name space of the alias.
    • getSystemAlias

      public boolean getSystemAlias()
      Gets whether or not the alias is a system alias.
      Returns:
      Whether or not the alias is a system alias.
    • getAliasInfo

      public AliasInfo getAliasInfo()
      Gests the AliasInfo for the alias.
      Returns:
      The AliasInfo for the alias.
    • toString

      public String toString()
      Convert the AliasDescriptor to a String.
      Overrides:
      toString in class Object
      Returns:
      A String representation of this AliasDescriptor
    • equals

      public boolean equals(Object otherObject)
      Determine if two AliasDescriptors are the same.
      Overrides:
      equals in class Object
      Parameters:
      otherObject - other descriptor
      Returns:
      true if they are the same, false otherwise
    • hashCode

      public int hashCode()
      Get a hashcode for this AliasDescriptor
      Overrides:
      hashCode in class Object
      Returns:
      hashcode
    • getDependableFinder

      public DependableFinder 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 interface Dependable
      Returns:
      the stored form of this provider representation
      See Also:
    • getObjectName

      public String getObjectName()
      Return the name of this Provider. (Useful for errors.)
      Specified by:
      getObjectName in interface Dependable
      Returns:
      String The name of this provider.
    • getObjectID

      public UUID getObjectID()
      Get the provider's UUID
      Specified by:
      getObjectID in interface Dependable
      Returns:
      String The provider's UUID
    • getClassType

      public String getClassType()
      Get the provider's type.
      Specified by:
      getClassType in interface Dependable
      Returns:
      String The provider's type.
    • getDescriptorType

      public String getDescriptorType()
      Description copied from class: TupleDescriptor
      Each descriptor must identify itself with its type; i.e index, check constraint whatever.
      Overrides:
      getDescriptorType in class TupleDescriptor
      See Also:
    • getAliasType

      public static final String getAliasType(char nameSpace)
    • getDescriptorName

      public String getDescriptorName()
      Overrides:
      getDescriptorName in class TupleDescriptor
      See Also:
    • getSpecificName

      public String getSpecificName()
      Return the specific name for this object.
    • isPersistent

      public boolean isPersistent()
      Functions are persistent unless they are in the SYSFUN schema.
      Specified by:
      isPersistent in interface Dependable
      Overrides:
      isPersistent in class TupleDescriptor
      Returns:
      boolean Whether or not this provider is persistent.
    • isTableFunction

      public boolean isTableFunction()
      Report whether this descriptor describes a Table Function.
    • drop

      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.
      Parameters:
      lcc -
      Throws:
      StandardException
    • isValid

      public boolean isValid()
      Check that all of the dependent's dependencies are valid.
      Specified by:
      isValid in interface Dependent
      Returns:
      true if the dependent is currently valid
    • prepareToInvalidate

      public void prepareToInvalidate(Provider p, int action, LanguageConnectionContext lcc) throws StandardException
      Prepare to mark the dependent as invalid (due to at least one of its dependencies being invalid).
      Specified by:
      prepareToInvalidate in interface Dependent
      Parameters:
      p - the provider
      action - The action causing the invalidation
      lcc - The LanguageConnectionContext
      Throws:
      StandardException - thrown if unable to make it invalid
    • makeInvalid

      public void makeInvalid(int action, LanguageConnectionContext lcc) throws StandardException
      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.
      Specified by:
      makeInvalid in interface Dependent
      Parameters:
      action - The action causing the invalidation
      lcc - The LanguageConnectionContext
      Throws:
      StandardException - thrown if called in sanity mode