org.objectweb.speedo.metadata
Class SpeedoIdentity

java.lang.Object
  extended by org.objectweb.speedo.metadata.SpeedoElement
      extended by org.objectweb.speedo.metadata.SpeedoIdentity
All Implemented Interfaces:
java.io.Serializable

public final class SpeedoIdentity
extends SpeedoElement

This class corresponds to the description of the policy management for a given identity.

Author:
S.Chassande-Barrioz
See Also:
Serialized Form

Field Summary
 SpeedoNoFieldColumn[] columns
          is the columns used for the identifier which have not been mapped in memory by visible persistent fields.
static byte DATASTORE_AUTO_ASSIGN
           
static byte DATASTORE_INCREMENT
           
static byte DATASTORE_LONG
           
static byte DATASTORE_NATIVE
           
static byte DATASTORE_OLONG
           
static byte DATASTORE_POLYMORPHID
           
static byte DATASTORE_SEQUENCE
           
static byte DATASTORE_UUID_HEX
           
static byte DATASTORE_UUID_STRING
           
static byte NO_ID
           
 java.lang.String objectidClass
          the class used as identifier
 java.lang.Class objectidJClass
           
 boolean oidClassAutoCalculated
           
 java.lang.String sequenceName
          the name of the sequence in case of the strategy is #DATASTORE_SEQUENCE
 byte strategy
          identifier strategy
static byte USER_ID
           
 
Fields inherited from class org.objectweb.speedo.metadata.SpeedoElement
jdoExtension, personality
 
Constructor Summary
SpeedoIdentity()
           
 
Method Summary
static byte getStrategy(java.lang.String s)
          Transforms a String into a Byte.
 java.lang.String getStrategyName()
           
static java.lang.String getStrategyName(byte s)
           
 boolean isDataStore()
           
 void merge(SpeedoIdentity id)
           
 void setColumns(java.util.List columns)
          Assignes SpeedoColumn for the identifier.
 void setDatastoreIdSequenceName(java.lang.String sequencename)
           
 java.lang.String toString()
           
 
Methods inherited from class org.objectweb.speedo.metadata.SpeedoElement
addExtension, addInArray, getExtension, getExtensionByKey, getExtensionValueByKey, indexOfInArray, removeInArray, setValueInArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NO_ID

public static final byte NO_ID
See Also:
Constant Field Values

USER_ID

public static final byte USER_ID
See Also:
Constant Field Values

DATASTORE_OLONG

public static final byte DATASTORE_OLONG
See Also:
Constant Field Values

DATASTORE_LONG

public static final byte DATASTORE_LONG
See Also:
Constant Field Values

DATASTORE_NATIVE

public static final byte DATASTORE_NATIVE
See Also:
Constant Field Values

DATASTORE_POLYMORPHID

public static final byte DATASTORE_POLYMORPHID
See Also:
Constant Field Values

DATASTORE_SEQUENCE

public static final byte DATASTORE_SEQUENCE
See Also:
Constant Field Values

DATASTORE_AUTO_ASSIGN

public static final byte DATASTORE_AUTO_ASSIGN
See Also:
Constant Field Values

DATASTORE_INCREMENT

public static final byte DATASTORE_INCREMENT
See Also:
Constant Field Values

DATASTORE_UUID_STRING

public static final byte DATASTORE_UUID_STRING
See Also:
Constant Field Values

DATASTORE_UUID_HEX

public static final byte DATASTORE_UUID_HEX
See Also:
Constant Field Values

strategy

public byte strategy
identifier strategy


objectidClass

public java.lang.String objectidClass
the class used as identifier


objectidJClass

public java.lang.Class objectidJClass

oidClassAutoCalculated

public boolean oidClassAutoCalculated

sequenceName

public java.lang.String sequenceName
the name of the sequence in case of the strategy is #DATASTORE_SEQUENCE


columns

public SpeedoNoFieldColumn[] columns
is the columns used for the identifier which have not been mapped in memory by visible persistent fields.

Constructor Detail

SpeedoIdentity

public SpeedoIdentity()
Method Detail

getStrategy

public static byte getStrategy(java.lang.String s)
Transforms a String into a Byte. The String must corresponds to local variables. It returns the byte associated with the variable.

Parameters:
s - String to transform.
Returns:
the byte associated to the String.

getStrategyName

public static java.lang.String getStrategyName(byte s)

setDatastoreIdSequenceName

public void setDatastoreIdSequenceName(java.lang.String sequencename)

isDataStore

public boolean isDataStore()

getStrategyName

public java.lang.String getStrategyName()

setColumns

public void setColumns(java.util.List columns)
                throws SpeedoException
Assignes SpeedoColumn for the identifier. This list of SpeedoColumn is transformed into an array of SpeedoNoFieldColumn

Parameters:
columns - is a list of SpeedoColumn
Throws:
SpeedoException - if the strategy does not correspond to the specified column (too many column, no strategy defined, application staregy choosen, ...)
See Also:
columns

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

merge

public void merge(SpeedoIdentity id)