Class DefaultDescriptor
- java.lang.Object
-
- org.apache.derby.iapi.sql.dictionary.TupleDescriptor
-
- org.apache.derby.iapi.sql.dictionary.UniqueTupleDescriptor
-
- org.apache.derby.iapi.sql.dictionary.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 Summary
Fields Modifier and Type Field Description private int
columnNumber
private UUID
defaultUUID
private UUID
tableUUID
-
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
Constructors Constructor Description DefaultDescriptor(DataDictionary dataDictionary, UUID defaultUUID, UUID tableUUID, int columnNumber)
Constructor for a DefaultDescriptor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getClassType()
Get the provider's type.int
getColumnNumber()
Get the column number of the column.DependableFinder
getDependableFinder()
Get an object which can be written to disk and which, when read from disk, will find or reconstruct this in-memory Dependable.UUID
getObjectID()
Get the provider's UUIDjava.lang.String
getObjectName()
Return the name of this Provider.UUID
getTableUUID()
Get the UUID of the table.UUID
getUUID()
Get the UUID of the default.boolean
isValid()
Check that all of the dependent's dependencies are valid.void
makeInvalid(int action, LanguageConnectionContext lcc)
Mark the dependent as invalid (due to at least one of its dependencies being invalid).void
prepareToInvalidate(Provider p, int action, LanguageConnectionContext lcc)
Prepare to mark the dependent as invalid (due to at least one of its dependencies being invalid).java.lang.String
toString()
Convert the DefaultDescriptor to a String.-
Methods inherited from class org.apache.derby.iapi.sql.dictionary.TupleDescriptor
getColumnDependableFinder, getDataDictionary, getDependableFinder, getDescriptorName, getDescriptorType, isPersistent, setDataDictionary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.derby.catalog.Dependable
isPersistent
-
-
-
-
Constructor Detail
-
DefaultDescriptor
public DefaultDescriptor(DataDictionary dataDictionary, UUID defaultUUID, UUID tableUUID, int columnNumber)
Constructor for a DefaultDescriptor- Parameters:
dataDictionary
- the DDdefaultUUID
- The UUID of the defaulttableUUID
- The UUID of the tablecolumnNumber
- The column number of the column that the default is for
-
-
Method Detail
-
getUUID
public UUID getUUID()
Get the UUID of the default.- Specified by:
getUUID
in classUniqueTupleDescriptor
- 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 java.lang.String toString()
Convert the DefaultDescriptor to a String.- Overrides:
toString
in classjava.lang.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 interfaceDependable
- Returns:
- the stored form of this provider
- See Also:
Dependable.getDependableFinder()
-
getObjectName
public java.lang.String getObjectName()
Return the name of this Provider. (Useful for errors.)- Specified by:
getObjectName
in interfaceDependable
- Returns:
- String The name of this provider.
-
getObjectID
public UUID getObjectID()
Get the provider's UUID- Specified by:
getObjectID
in interfaceDependable
- Returns:
- The provider's UUID
-
getClassType
public java.lang.String getClassType()
Get the provider's type.- Specified by:
getClassType
in interfaceDependable
- Returns:
- char The provider's type.
-
isValid
public boolean isValid()
Check that all of the dependent's dependencies are 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 interfaceDependent
- Parameters:
action
- The action causing the invalidationp
- the providerlcc
- 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 interfaceDependent
- Parameters:
action
- The action causing the invalidationlcc
- The LanguageConnectionContext- Throws:
StandardException
- thrown if called in sanity mode
-
-