Class DefaultDescriptor

All Implemented Interfaces:
Dependable, Dependent, Provider

public final class DefaultDescriptor extends UniqueTupleDescriptor implements Provider, Dependent
This interface is used to get information from a DefaultDescriptor.
  • Field Details

    • columnNumber

      private final int columnNumber
    • defaultUUID

      private final UUID defaultUUID
    • tableUUID

      private final UUID tableUUID
  • Constructor Details

    • DefaultDescriptor

      public DefaultDescriptor(DataDictionary dataDictionary, UUID defaultUUID, UUID tableUUID, int columnNumber)
      Constructor for a DefaultDescriptor
      Parameters:
      dataDictionary - the DD
      defaultUUID - The UUID of the default
      tableUUID - The UUID of the table
      columnNumber - The column number of the column that the default is for
  • Method Details

    • getUUID

      public UUID getUUID()
      Get the UUID of the default.
      Specified by:
      getUUID in class UniqueTupleDescriptor
      Returns:
      The UUID of the default.
    • getTableUUID

      public UUID getTableUUID()
      Get the UUID of the table.
      Returns:
      The UUID of the table.
    • getColumnNumber

      public int getColumnNumber()
      Get the column number of the column.
      Returns:
      The column number of the column.
    • toString

      public String toString()
      Convert the DefaultDescriptor to a String.
      Overrides:
      toString in class Object
      Returns:
      A String representation of this DefaultDescriptor
    • 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
      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:
      The provider's UUID
    • getClassType

      public String getClassType()
      Get the provider's type.
      Specified by:
      getClassType in interface Dependable
      Returns:
      char The provider's type.
    • 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 a constraint -- 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