Class ForeignKeyInfo
java.lang.Object
org.datanucleus.store.rdbms.schema.ForeignKeyInfo
- All Implemented Interfaces:
org.datanucleus.store.schema.StoreSchemaData
Represents the metadata of a specific foreign key column.
Supports the following properties.
- pk_table_cat
- pk_table_schem
- pk_table_name
- pk_column_name
- fk_table_cat
- fk_table_schem
- fk_table_name
- fk_column_name
- key_seq
- update_rule
- delete_rule
- pk_name
- fk_name
- deferrability
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
Hashcode.Properties of the foreign-key. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a foreign key information object from the current row of the given result set. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addProperty
(String name, Object value) Method to add a property for the type.final boolean
Indicates whether some object is "equal to" this one.getProperty
(String name) Accessor for a property.final int
hashCode()
Returns a hash code value for this object.toString()
Returns the string representation of this object.
-
Field Details
-
properties
Properties of the foreign-key. -
hash
private int hashHashcode. Set on first use.
-
-
Constructor Details
-
ForeignKeyInfo
Constructs a foreign key information object from the current row of the given result set. TheResultSet
object passed must have been obtained from a call to java.sql.DatabaseMetaData.getImportedKeys() or java.sql.DatabaseMetaData.getImportedKeys().- Parameters:
rs
- The result set returned from java.sql.DatabaseMetaData.getImportedKeys() or java.sql.DatabaseMetaData.getExportedKeys().- Throws:
org.datanucleus.exceptions.NucleusDataStoreException
- if an exception is thrown upon retrieval
-
-
Method Details
-
addProperty
Method to add a property for the type.- Specified by:
addProperty
in interfaceorg.datanucleus.store.schema.StoreSchemaData
- Parameters:
name
- Name of propertyvalue
- Its value
-
getProperty
Accessor for a property.- Specified by:
getProperty
in interfaceorg.datanucleus.store.schema.StoreSchemaData
- Parameters:
name
- Name of the property- Returns:
- Its value, or null if not defined
-
equals
Indicates whether some object is "equal to" this one. Two ForeignKeyInfo objects are considered equal if their catalog, schema, table, and column names, both primary and foreign, are all equal. -
hashCode
public final int hashCode()Returns a hash code value for this object. -
toString
Returns the string representation of this object.
-