Class ForeignKeyInfo
- java.lang.Object
-
- org.datanucleus.store.rdbms.schema.ForeignKeyInfo
-
- All Implemented Interfaces:
org.datanucleus.store.schema.StoreSchemaData
public class ForeignKeyInfo extends java.lang.Object implements org.datanucleus.store.schema.StoreSchemaDataRepresents 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
Fields Modifier and Type Field Description private inthashHashcode.(package private) java.util.Map<java.lang.String,java.lang.Object>propertiesProperties of the foreign-key.
-
Constructor Summary
Constructors Constructor Description ForeignKeyInfo(java.sql.ResultSet rs)Constructs a foreign key information object from the current row of the given result set.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddProperty(java.lang.String name, java.lang.Object value)Method to add a property for the type.booleanequals(java.lang.Object obj)Indicates whether some object is "equal to" this one.java.lang.ObjectgetProperty(java.lang.String name)Accessor for a property.inthashCode()Returns a hash code value for this object.java.lang.StringtoString()Returns the string representation of this object.
-
-
-
Constructor Detail
-
ForeignKeyInfo
public ForeignKeyInfo(java.sql.ResultSet rs)
Constructs a foreign key information object from the current row of the given result set. TheResultSetobject 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 Detail
-
addProperty
public void addProperty(java.lang.String name, java.lang.Object value)Method to add a property for the type.- Specified by:
addPropertyin interfaceorg.datanucleus.store.schema.StoreSchemaData- Parameters:
name- Name of propertyvalue- Its value
-
getProperty
public java.lang.Object getProperty(java.lang.String name)
Accessor for a property.- Specified by:
getPropertyin interfaceorg.datanucleus.store.schema.StoreSchemaData- Parameters:
name- Name of the property- Returns:
- Its value, or null if not defined
-
equals
public final boolean equals(java.lang.Object obj)
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.- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- the reference object with which to compare- Returns:
- true if this object is equal to the obj argument; false otherwise.
-
hashCode
public final int hashCode()
Returns a hash code value for this object.- Overrides:
hashCodein classjava.lang.Object- Returns:
- a hash code value for this object.
-
toString
public java.lang.String toString()
Returns the string representation of this object.- Overrides:
toStringin classjava.lang.Object- Returns:
- string representation of this object.
-
-