Class PrimaryKeyInfo
- java.lang.Object
-
- org.datanucleus.store.rdbms.schema.PrimaryKeyInfo
-
- All Implemented Interfaces:
org.datanucleus.store.schema.StoreSchemaData
public class PrimaryKeyInfo extends Object implements org.datanucleus.store.schema.StoreSchemaData
Represents the metadata of a specific primary key column. Supports the following properties.- table_cat
- table_schem
- table_name
- column_name
- key_seq
- pk_name
-
-
Constructor Summary
Constructors Constructor Description PrimaryKeyInfo(ResultSet rs)
Constructs a primary 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 void
addProperty(String name, Object value)
Method to add a property for the PK.boolean
equals(Object obj)
Indicates whether some object is "equal to" this one.Object
getProperty(String name)
Accessor for a property.int
hashCode()
Returns a hash code value for this object.String
toString()
Returns the string representation of this object.
-
-
-
Constructor Detail
-
PrimaryKeyInfo
public PrimaryKeyInfo(ResultSet rs)
Constructs a primary 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.getPrimaryKeys().- Parameters:
rs
- The result set returned from java.sql.DatabaseMetaData.getPrimaryKeys().- Throws:
org.datanucleus.exceptions.NucleusDataStoreException
- if an exception occurs during retrieval
-
-
Method Detail
-
addProperty
public void addProperty(String name, Object value)
Method to add a property for the PK.- Specified by:
addProperty
in interfaceorg.datanucleus.store.schema.StoreSchemaData
- Parameters:
name
- Name of propertyvalue
- Its value
-
getProperty
public Object getProperty(String name)
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
public final boolean equals(Object obj)
Indicates whether some object is "equal to" this one. Two PrimaryKeyInfo objects are considered equal if their catalog, schema, table, and column names are all equal.
-
hashCode
public final int hashCode()
Returns a hash code value for this object.
-
-