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 intcolumnNumberprivate UUIDdefaultUUIDprivate UUIDtableUUID-
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.StringgetClassType()Get the provider's type.intgetColumnNumber()Get the column number of the column.DependableFindergetDependableFinder()Get an object which can be written to disk and which, when read from disk, will find or reconstruct this in-memory Dependable.UUIDgetObjectID()Get the provider's UUIDjava.lang.StringgetObjectName()Return the name of this Provider.UUIDgetTableUUID()Get the UUID of the table.UUIDgetUUID()Get the UUID of the default.booleanisValid()Check that all of the dependent's dependencies are valid.voidmakeInvalid(int action, LanguageConnectionContext lcc)Mark the dependent as invalid (due to at least one of its dependencies being invalid).voidprepareToInvalidate(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.StringtoString()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:
getUUIDin 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:
toStringin classjava.lang.Object- Returns:
- A String representation of this DefaultDescriptor
-
getDependableFinder
public DependableFinder getDependableFinder()
Description copied from interface:DependableGet an object which can be written to disk and which, when read from disk, will find or reconstruct this in-memory Dependable.- Specified by:
getDependableFinderin 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:
getObjectNamein interfaceDependable- Returns:
- String The name of this provider.
-
getObjectID
public UUID getObjectID()
Get the provider's UUID- Specified by:
getObjectIDin interfaceDependable- Returns:
- The provider's UUID
-
getClassType
public java.lang.String getClassType()
Get the provider's type.- Specified by:
getClassTypein 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:
prepareToInvalidatein 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 StandardExceptionMark 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:
makeInvalidin interfaceDependent- Parameters:
action- The action causing the invalidationlcc- The LanguageConnectionContext- Throws:
StandardException- thrown if called in sanity mode
-
-