Class DDdependableFinder
java.lang.Object
org.apache.derby.impl.sql.catalog.DDdependableFinder
- All Implemented Interfaces:
Externalizable
,Serializable
,DependableFinder
,Formatable
,TypedFormat
- Direct Known Subclasses:
DDColumnDependableFinder
Class for most DependableFinders in the core DataDictionary.
This class is stored in SYSDEPENDS for the finders for
the provider and dependent. It stores no state, its functionality
is driven off its format identifier.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) Dependable
findDependable
(DataDictionary dd, UUID dependableObjectID) Find the dependable for getDependable.final Dependable
getDependable
(DataDictionary dd, UUID dependableObjectID) Get the dependable for the given UUIDThe name of the class of Dependables as a "SQL Object" which this Finder can find.final int
Get the formatID which corresponds to this class.void
Read this object from a stream of stored objects.toString()
void
Write this object to a stream of stored objects.
-
Field Details
-
formatId
private final int formatId
-
-
Constructor Details
-
DDdependableFinder
public DDdependableFinder(int formatId) Public constructor for Formatable hoo-hah.
-
-
Method Details
-
toString
-
readExternal
Read this object from a stream of stored objects. Nothing to do. Our persistent representation is just a 2-byte format id.- Specified by:
readExternal
in interfaceExternalizable
- Parameters:
in
- read this.- Throws:
IOException
ClassNotFoundException
-
writeExternal
Write this object to a stream of stored objects. Again, nothing to do. We just stamp the output stream with our Format id.- Specified by:
writeExternal
in interfaceExternalizable
- Parameters:
out
- write bytes here.- Throws:
IOException
-
getTypeFormatId
public final int getTypeFormatId()Get the formatID which corresponds to this class.- Specified by:
getTypeFormatId
in interfaceTypedFormat
- Returns:
- the formatID of this class
-
getSQLObjectType
Description copied from interface:DependableFinder
The name of the class of Dependables as a "SQL Object" which this Finder can find. This is a value like "Table" or "View". Every DependableFinder can find some class of Dependables.- Specified by:
getSQLObjectType
in interfaceDependableFinder
- Returns:
- String type of the "SQL Object" which this Finder can find.
- See Also:
-
getDependable
public final Dependable getDependable(DataDictionary dd, UUID dependableObjectID) throws StandardException Get the dependable for the given UUID- Specified by:
getDependable
in interfaceDependableFinder
- Parameters:
dd
- DataDictionary to use for lookup.dependableObjectID
- the ID of a Dependable. Used to locate that Dependable.- Returns:
- the associated Dependable
- Throws:
StandardException
- thrown on error
-
findDependable
Find the dependable for getDependable. Can return a null references, in which case getDependable() will thrown an exception.- Throws:
StandardException
-