org.datanucleus.metadata
Class IdentityMetaData

java.lang.Object
  extended by org.datanucleus.metadata.MetaData
      extended by org.datanucleus.metadata.IdentityMetaData
All Implemented Interfaces:
java.io.Serializable, ColumnMetaDataContainer

public class IdentityMetaData
extends MetaData
implements ColumnMetaDataContainer

Meta-Data for the datastore-identity of a class. When used in ORM systems defines the column(s) that the identity is mapped to. Also defines the generation strategy for the identity values.

Since:
1.1
Version:
$Revision: 1.18 $
See Also:
Serialized Form

Field Summary
protected  ColumnMetaData[] columnMetaData
          Metadata for columns.
protected  java.lang.String columnName
          column name value.
protected  java.lang.String sequence
          sequence tag value.
protected  IdentityStrategy strategy
          strategy tag value.
protected  java.lang.String valueGeneratorName
          Name of a value generator if the user wants to override the default JPOX generator.
 
Fields inherited from class org.datanucleus.metadata.MetaData
extensions, LOCALISER, METADATA_CREATED_STATE, METADATA_INITIALISED_STATE, METADATA_POPULATED_STATE, METADATA_USED_STATE, metaDataState, parent, VENDOR_NAME, VENDOR_NAME_OLD
 
Constructor Summary
IdentityMetaData(AbstractClassMetaData parent, java.lang.String columnName, java.lang.String strategy, java.lang.String sequence)
          Constructor
 
Method Summary
 void addColumn(ColumnMetaData colmd)
          Add a new ColumnMetaData element
 ColumnMetaData[] getColumnMetaData()
          Accessor for columnMetaData
 java.lang.String getColumnName()
          Accessor for the column name.
 java.lang.String getSequence()
          Accessor for the sequence name
 java.lang.String getValueGeneratorName()
          Name of a (user-provided) value generator to override the default JPOX generator for this strategy.
 IdentityStrategy getValueStrategy()
          Accessor for the strategy tag value
 void initialise()
          Method to initialise all internal convenience arrays needed.
 void setValueGeneratorName(java.lang.String generator)
          Mutator for the name of the value generator to use for this strategy.
 java.lang.String toString(java.lang.String prefix, java.lang.String indent)
          Returns a string representation of the object using a prefix
 
Methods inherited from class org.datanucleus.metadata.MetaData
addExtension, addExtension, getExtensions, getNoOfExtensions, getParent, getValueForExtension, getValuesForExtension, hasExtension, isInitialised, isPopulated, isUsed, removeExtension, setInitialised, setParent, setPopulated, setUsed, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

columnName

protected java.lang.String columnName
column name value.


strategy

protected IdentityStrategy strategy
strategy tag value.


sequence

protected java.lang.String sequence
sequence tag value.


valueGeneratorName

protected java.lang.String valueGeneratorName
Name of a value generator if the user wants to override the default JPOX generator.


columnMetaData

protected ColumnMetaData[] columnMetaData
Metadata for columns.

Constructor Detail

IdentityMetaData

public IdentityMetaData(AbstractClassMetaData parent,
                        java.lang.String columnName,
                        java.lang.String strategy,
                        java.lang.String sequence)
Constructor

Parameters:
parent - parent AbstractClassMetaData instance
columnName - Name of the column
strategy - strategy
sequence - sequence name
Method Detail

initialise

public void initialise()
Method to initialise all internal convenience arrays needed.

Overrides:
initialise in class MetaData

addColumn

public void addColumn(ColumnMetaData colmd)
Add a new ColumnMetaData element

Specified by:
addColumn in interface ColumnMetaDataContainer
Parameters:
colmd - The ColumnMetaData to add

setValueGeneratorName

public void setValueGeneratorName(java.lang.String generator)
Mutator for the name of the value generator to use for this strategy.

Parameters:
generator - Name of value generator

getColumnMetaData

public final ColumnMetaData[] getColumnMetaData()
Accessor for columnMetaData

Specified by:
getColumnMetaData in interface ColumnMetaDataContainer
Returns:
Returns the columnMetaData.

getColumnName

public java.lang.String getColumnName()
Accessor for the column name.

Returns:
column name

getValueStrategy

public IdentityStrategy getValueStrategy()
Accessor for the strategy tag value

Returns:
strategy tag value

getSequence

public java.lang.String getSequence()
Accessor for the sequence name

Returns:
sequence name

getValueGeneratorName

public java.lang.String getValueGeneratorName()
Name of a (user-provided) value generator to override the default JPOX generator for this strategy.

Returns:
Name of user provided value generator

toString

public java.lang.String toString(java.lang.String prefix,
                                 java.lang.String indent)
Returns a string representation of the object using a prefix

Overrides:
toString in class MetaData
Parameters:
prefix - prefix string
indent - indent string
Returns:
a string representation of the object.


Copyright © 2009. All Rights Reserved.