Class RDBMSTablePKInfo
- java.lang.Object
-
- org.datanucleus.store.rdbms.schema.RDBMSTablePKInfo
-
- All Implemented Interfaces:
org.datanucleus.store.schema.ListStoreSchemaData,org.datanucleus.store.schema.StoreSchemaData
public class RDBMSTablePKInfo extends Object implements org.datanucleus.store.schema.ListStoreSchemaData
Representation of PK information for a table in the datastore. Supports the properties :-- table_cat : catalog for this table (or null if not defined/supported)
- table_sch : schema for this table (or null if not defined/supported)
- table_name : name of the table
-
-
Constructor Summary
Constructors Constructor Description RDBMSTablePKInfo()RDBMSTablePKInfo(String catalog, String schema, String table)Constructor taking just the catalog, schema and table name directly.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddChild(org.datanucleus.store.schema.StoreSchemaData child)Method to add another PK col to the table schema.voidaddProperty(String name, Object value)Method to add a property for the table.voidclearChildren()Method to remove all children.booleanequals(Object obj)Indicates whether some object is "equal to" this one.org.datanucleus.store.schema.StoreSchemaDatagetChild(int position)Accessor for the PK column at the position.List<org.datanucleus.store.schema.StoreSchemaData>getChildren()Accessor for the primary keysintgetNumberOfChildren()Accessor for the number of pk cols in the schema for this table.org.datanucleus.store.schema.StoreSchemaDatagetParent()ObjectgetProperty(String name)Accessor for a property of the table.inthashCode()Returns a hash code value for this object.voidsetParent(org.datanucleus.store.schema.StoreSchemaData parent)StringtoString()Returns the string representation of this object.
-
-
-
Method Detail
-
addChild
public void addChild(org.datanucleus.store.schema.StoreSchemaData child)
Method to add another PK col to the table schema.- Specified by:
addChildin interfaceorg.datanucleus.store.schema.ListStoreSchemaData- Parameters:
child- Column
-
clearChildren
public void clearChildren()
Method to remove all children.- Specified by:
clearChildrenin interfaceorg.datanucleus.store.schema.ListStoreSchemaData
-
getChild
public org.datanucleus.store.schema.StoreSchemaData getChild(int position)
Accessor for the PK column at the position.- Specified by:
getChildin interfaceorg.datanucleus.store.schema.ListStoreSchemaData- Parameters:
position- Index- Returns:
- PK column at the position
-
getChildren
public List<org.datanucleus.store.schema.StoreSchemaData> getChildren()
Accessor for the primary keys- Specified by:
getChildrenin interfaceorg.datanucleus.store.schema.ListStoreSchemaData- Returns:
- PK information
-
getNumberOfChildren
public int getNumberOfChildren()
Accessor for the number of pk cols in the schema for this table.- Specified by:
getNumberOfChildrenin interfaceorg.datanucleus.store.schema.ListStoreSchemaData- Returns:
- Number of pk cols
-
addProperty
public void addProperty(String name, Object value)
Method to add a property for the table.- Specified by:
addPropertyin interfaceorg.datanucleus.store.schema.StoreSchemaData- Parameters:
name- Name of propertyvalue- Its value
-
getProperty
public Object getProperty(String name)
Accessor for a property of the table.- Specified by:
getPropertyin interfaceorg.datanucleus.store.schema.StoreSchemaData- Parameters:
name- Name of the property- Returns:
- Its value, or null if not defined
-
getParent
public org.datanucleus.store.schema.StoreSchemaData getParent()
- Specified by:
getParentin interfaceorg.datanucleus.store.schema.ListStoreSchemaData
-
setParent
public void setParent(org.datanucleus.store.schema.StoreSchemaData parent)
- Specified by:
setParentin interfaceorg.datanucleus.store.schema.ListStoreSchemaData
-
equals
public final boolean equals(Object obj)
Indicates whether some object is "equal to" this one. Two RDBMSTableInfo are considered equal if their catalog, schema, table are all equal.
-
hashCode
public final int hashCode()
Returns a hash code value for this object.
-
-