Class DDdependableFinder
- java.lang.Object
-
- org.apache.derby.impl.sql.catalog.DDdependableFinder
-
- All Implemented Interfaces:
java.io.Externalizable
,java.io.Serializable
,DependableFinder
,Formatable
,TypedFormat
- Direct Known Subclasses:
DDColumnDependableFinder
public class DDdependableFinder extends java.lang.Object implements DependableFinder, Formatable
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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private int
formatId
-
Constructor Summary
Constructors Constructor Description DDdependableFinder(int formatId)
Public constructor for Formatable hoo-hah.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) Dependable
findDependable(DataDictionary dd, UUID dependableObjectID)
Find the dependable for getDependable.Dependable
getDependable(DataDictionary dd, UUID dependableObjectID)
Get the dependable for the given UUIDjava.lang.String
getSQLObjectType()
The name of the class of Dependables as a "SQL Object" which this Finder can find.int
getTypeFormatId()
Get the formatID which corresponds to this class.void
readExternal(java.io.ObjectInput in)
Read this object from a stream of stored objects.java.lang.String
toString()
void
writeExternal(java.io.ObjectOutput out)
Write this object to a stream of stored objects.
-
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
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 interfacejava.io.Externalizable
- Parameters:
in
- read this.- Throws:
java.io.IOException
java.lang.ClassNotFoundException
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
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 interfacejava.io.Externalizable
- Parameters:
out
- write bytes here.- Throws:
java.io.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
public java.lang.String 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:
DependableFinder.getSQLObjectType()
-
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
Dependable findDependable(DataDictionary dd, UUID dependableObjectID) throws StandardException
Find the dependable for getDependable. Can return a null references, in which case getDependable() will thrown an exception.- Throws:
StandardException
-
-