Class RDBMSTableIndexInfo
java.lang.Object
org.datanucleus.store.rdbms.schema.RDBMSTableIndexInfo
- All Implemented Interfaces:
org.datanucleus.store.schema.ListStoreSchemaData
,org.datanucleus.store.schema.StoreSchemaData
public class RDBMSTableIndexInfo
extends Object
implements org.datanucleus.store.schema.ListStoreSchemaData
Representation of index 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
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRDBMSTableIndexInfo
(String catalog, String schema, String table) Constructor taking just the catalog, schema and table name directly. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addChild
(org.datanucleus.store.schema.StoreSchemaData child) Method to add another index col to the table schema.void
addProperty
(String name, Object value) Method to add a property for the table.void
Method to remove all children.final boolean
Indicates whether some object is "equal to" this one.org.datanucleus.store.schema.StoreSchemaData
getChild
(int position) Accessor for the index column at the position.List
<org.datanucleus.store.schema.StoreSchemaData> Accessor for the indices.int
Accessor for the number of indices cols in the schema for this table.org.datanucleus.store.schema.StoreSchemaData
getProperty
(String name) Accessor for a property of the table.final int
hashCode()
Returns a hash code value for this object.void
setParent
(org.datanucleus.store.schema.StoreSchemaData parent) toString()
Returns the string representation of this object.
-
Field Details
-
hash
private int hashHashcode. Set on first use. -
properties
Properties of the table. -
indices
List<org.datanucleus.store.schema.StoreSchemaData> indicesIndex information for this table.
-
-
Constructor Details
-
RDBMSTableIndexInfo
public RDBMSTableIndexInfo() -
RDBMSTableIndexInfo
Constructor taking just the catalog, schema and table name directly.- Parameters:
catalog
- Catalog containing the tableschema
- Schema containing the tabletable
- The table name
-
-
Method Details
-
addChild
public void addChild(org.datanucleus.store.schema.StoreSchemaData child) Method to add another index col to the table schema.- Specified by:
addChild
in interfaceorg.datanucleus.store.schema.ListStoreSchemaData
- Parameters:
child
- Column
-
clearChildren
public void clearChildren()Method to remove all children.- Specified by:
clearChildren
in interfaceorg.datanucleus.store.schema.ListStoreSchemaData
-
getChild
public org.datanucleus.store.schema.StoreSchemaData getChild(int position) Accessor for the index column at the position.- Specified by:
getChild
in interfaceorg.datanucleus.store.schema.ListStoreSchemaData
- Parameters:
position
- Index- Returns:
- PK column at the position
-
getChildren
Accessor for the indices.- Specified by:
getChildren
in interfaceorg.datanucleus.store.schema.ListStoreSchemaData
- Returns:
- PK information
-
getNumberOfChildren
public int getNumberOfChildren()Accessor for the number of indices cols in the schema for this table.- Specified by:
getNumberOfChildren
in interfaceorg.datanucleus.store.schema.ListStoreSchemaData
- Returns:
- Number of indices cols
-
addProperty
Method to add a property for the table.- Specified by:
addProperty
in interfaceorg.datanucleus.store.schema.StoreSchemaData
- Parameters:
name
- Name of propertyvalue
- Its value
-
getProperty
Accessor for a property of the table.- Specified by:
getProperty
in 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:
getParent
in interfaceorg.datanucleus.store.schema.ListStoreSchemaData
-
setParent
public void setParent(org.datanucleus.store.schema.StoreSchemaData parent) - Specified by:
setParent
in interfaceorg.datanucleus.store.schema.ListStoreSchemaData
-
equals
Indicates whether some object is "equal to" this one. Two RDBMSTableIndexInfo are considered equal if their catalog, schema, table are all equal. -
hashCode
public final int hashCode()Returns a hash code value for this object. -
toString
Returns the string representation of this object.
-