org.jpox.store
Class DatastoreFieldRole

java.lang.Object
  extended byorg.jpox.store.DatastoreFieldRole

public class DatastoreFieldRole
extends java.lang.Object

Representation of a role for a DatastoreField (column). It represents the type of column we are handling ... key, index, owner, element, etc. It also provides a "custom" option which is for use where the user has overridden the name for example.

Version:
$Revision: 1.5 $

Field Summary
static DatastoreFieldRole ARRAY_ELEMENT
          element of an array
static DatastoreFieldRole COLLECTION_ELEMENT
          element of a collection
static DatastoreFieldRole CUSTOM
          custom
static DatastoreFieldRole FIELD
          field
static DatastoreFieldRole INDEX
          index
static DatastoreFieldRole MAP_KEY
          key of a map
static DatastoreFieldRole MAP_VALUE
          value of a map
static int MAX_SUFFIX_LENGTH
          max length of the role suffix
static DatastoreFieldRole NONE
          none
static DatastoreFieldRole OWNER
          owner
 
Method Summary
 java.lang.String getIdentifierSuffix(DatastoreAdapter dba, boolean embedded)
          Accessor for the suffix to add to any column identifier, based on the role type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CUSTOM

public static final DatastoreFieldRole CUSTOM
custom


NONE

public static final DatastoreFieldRole NONE
none


OWNER

public static final DatastoreFieldRole OWNER
owner


FIELD

public static final DatastoreFieldRole FIELD
field


COLLECTION_ELEMENT

public static final DatastoreFieldRole COLLECTION_ELEMENT
element of a collection


ARRAY_ELEMENT

public static final DatastoreFieldRole ARRAY_ELEMENT
element of an array


MAP_KEY

public static final DatastoreFieldRole MAP_KEY
key of a map


MAP_VALUE

public static final DatastoreFieldRole MAP_VALUE
value of a map


INDEX

public static final DatastoreFieldRole INDEX
index


MAX_SUFFIX_LENGTH

public static final int MAX_SUFFIX_LENGTH
max length of the role suffix

See Also:
Constant Field Values
Method Detail

getIdentifierSuffix

public java.lang.String getIdentifierSuffix(DatastoreAdapter dba,
                                            boolean embedded)
Accessor for the suffix to add to any column identifier, based on the role type.

Parameters:
dba - The database adapter
embedded - Whether the DatastoreField is stored embedded
Returns:
The suffix (e.g _ID for id columns).


Copyright © -2007 . All Rights Reserved.