Class ConstraintInfo
java.lang.Object
org.apache.derby.impl.sql.execute.ConstraintInfo
- All Implemented Interfaces:
Externalizable
,Serializable
,Formatable
,TypedFormat
,ConsInfo
This is a simple class used to store the run time information
about a constraint.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String[]
private int
private int
private String
This class implements Formatable.private UUID
private SchemaDescriptor
-
Constructor Summary
ConstructorsConstructorDescriptionNiladic constructor for FormattableConstraintInfo
(String tableName, SchemaDescriptor tableSd, String[] columnNames, int raDeleteRule, int raUpdateRule) Consructor -
Method Summary
Modifier and TypeMethodDescriptionString[]
This ConsInfo describes columns in a referenced table.This ConsInfo describes columns in a referenced table.Get the name of the table that these column live in.This ConsInfo describes columns in a referenced table.int
Get the referential Action for a Delete.int
Get the referential Action for an Update.int
Get the formatID which corresponds to this class.void
Read this object from a stream of stored objects.toString()
void
Write this object out
-
Field Details
-
tableName
This class implements Formatable. That means that it can write itself to and from a formatted stream. If you add more fields to this class, make sure that you also write/read them with the writeExternal()/readExternal() methods. If, inbetween releases, you add more fields to this class, then you should bump the version number emitted by the getTypeFormatId() method. OR, since this is something that is used in stored prepared statements, it is ok to change it if you make sure that stored prepared statements are invalidated across releases. -
tableSd
-
tableSchemaId
-
columnNames
-
raDeleteRule
private int raDeleteRule -
raUpdateRule
private int raUpdateRule
-
-
Constructor Details
-
ConstraintInfo
public ConstraintInfo()Niladic constructor for Formattable -
ConstraintInfo
public ConstraintInfo(String tableName, SchemaDescriptor tableSd, String[] columnNames, int raDeleteRule, int raUpdateRule) Consructor
-
-
Method Details
-
writeExternal
Write this object out- Specified by:
writeExternal
in interfaceExternalizable
- Parameters:
out
- write bytes here- Throws:
IOException
- thrown on error
-
readExternal
Read this object from a stream of stored objects.- Specified by:
readExternal
in interfaceExternalizable
- Parameters:
in
- read this.- Throws:
IOException
- thrown on errorClassNotFoundException
- thrown on error
-
getTypeFormatId
public int getTypeFormatId()Get the formatID which corresponds to this class.- Specified by:
getTypeFormatId
in interfaceTypedFormat
- Returns:
- the formatID of this class
-
toString
-
getReferencedTableSchemaDescriptor
public SchemaDescriptor getReferencedTableSchemaDescriptor(DataDictionary dd) throws StandardException Description copied from interface:ConsInfo
This ConsInfo describes columns in a referenced table. What is the schema that the referenced table lives in?- Specified by:
getReferencedTableSchemaDescriptor
in interfaceConsInfo
- Parameters:
dd
- data dictionary to search for schema- Returns:
- schema that referenced table lives in
- Throws:
StandardException
- thrown on oops
-
getReferencedTableDescriptor
Description copied from interface:ConsInfo
This ConsInfo describes columns in a referenced table. What is that table?- Specified by:
getReferencedTableDescriptor
in interfaceConsInfo
- Parameters:
dd
- data dictionary to search for table- Returns:
- referenced table
- Throws:
StandardException
- thrown on oops
-
getReferencedColumnNames
This ConsInfo describes columns in a referenced table. What are their names?- Specified by:
getReferencedColumnNames
in interfaceConsInfo
- Returns:
- array of referenced column names
-
getReferencedTableName
Get the name of the table that these column live in.- Specified by:
getReferencedTableName
in interfaceConsInfo
- Returns:
- referenced table name
-
getReferentialActionUpdateRule
public int getReferentialActionUpdateRule()Get the referential Action for an Update.- Specified by:
getReferentialActionUpdateRule
in interfaceConsInfo
- Returns:
- referential Action for update
-
getReferentialActionDeleteRule
public int getReferentialActionDeleteRule()Get the referential Action for a Delete.- Specified by:
getReferentialActionDeleteRule
in interfaceConsInfo
- Returns:
- referential Action Delete rule
-