|
SolarMetric Kodo JDO 3.3.5 generated on August 31 2005 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Maps a persistent field to the relational schema.
Field Summary | |
static String |
AUTO_INCREMENT
Extension indicating that this field uses an auto-incrementing column. |
static String |
DELETE_ACTION
Extension key used to mark the foreign key delete action to use for the field, if it represents a foreign key to a related object. |
static String |
ELEMENT_DELETE_ACTION
Extension key used to mark the foreign key delete action to use for the element values of a collection, if they represent a foreign key to a related object. |
static String |
ELEMENT_INDEXED
Extension key used to mark whether element columns are indexed. |
static String |
ELEMENT_SIZE
Extension key used to mark the size of element data columns. |
static String[] |
EXTENSION_KEYS
All the valid field-level extensions. |
static String |
FIELD_MAP
Extension key used to indicate the type of field mapping to use. |
static String |
INDEXED
Extension key used to mark whether data columns are indexed. |
static String |
JDBC_TYPE
Extension key used to mark the JDBC type hint of the column to use. |
static String |
KEY_DELETE_ACTION
Extension key used to mark the foreign key delete action to use for the keys of a map, if they represent a foreign key to a related object. |
static String |
KEY_INDEXED
Extension key used to mark whether key columns are indexed. |
static String |
KEY_SIZE
Extension key used to mark the size of key data columns. |
static String |
REF_DELETE_ACTION
Extension key used to mark the foreign key delete action on reference columns. |
static String |
REF_INDEXED
Extension key used to mark whether reference columns are indexed. |
static String |
SIZE
Extension key used to mark the size of data columns. |
static String |
SQL_TYPE
Extension key used to mark the SQL type name hint for the column to use. |
static String |
VALUE_DELETE_ACTION
Extension key used to mark the foreign key delete action to use for the values of a map, if they represent a foreign key to a related object. |
static String |
VALUE_INDEXED
Extension key used to mark whether value columns are indexed. |
static String |
VALUE_SIZE
Extension key used to mark the size of value data columns. |
Fields inherited from interface kodo.meta.FieldMetaData |
DEPENDENT, EAGER_FETCH_MODE, ELEMENT_DEPENDENT, ELEMENT_TYPE, EXTERNAL_VALUES, EXTERNALIZER, FACTORY, FETCH_GROUP, INVERSE_LOGICAL, INVERSE_OWNER, KEY_DEPENDENT, KEY_TYPE, LOCK_GROUP, LOCK_GROUP_DEFAULT, LOCK_GROUP_NONE, LRS, MANAGE_NONE, MANAGE_PERSISTENT, MANAGE_TRANSACTIONAL, NULL_DEFAULT, NULL_EXCEPTION, NULL_NONE, NULL_UNSET, SEQUENCE_ASSIGNED, TYPE, VALUE_DEPENDENT, VALUE_TYPE |
Fields inherited from interface kodo.meta.JDOTypes |
TYPE_ARRAY, TYPE_BIGDECIMAL, TYPE_BIGINTEGER, TYPE_BOOLEAN, TYPE_BOOLEAN_OBJ, TYPE_BYTE, TYPE_BYTE_OBJ, TYPE_CHAR, TYPE_CHAR_OBJ, TYPE_COLLECTION, TYPE_DATE, TYPE_DOUBLE, TYPE_DOUBLE_OBJ, TYPE_FCO, TYPE_FLOAT, TYPE_FLOAT_OBJ, TYPE_INT, TYPE_INT_OBJ, TYPE_LOCALE, TYPE_LONG, TYPE_LONG_OBJ, TYPE_MAP, TYPE_NUMBER, TYPE_OBJECT, TYPE_PC_OBJECT, TYPE_SHORT, TYPE_SHORT_OBJ, TYPE_STRING |
Method Summary | |
void |
appendIsEmpty(SQLBuffer sql,
Select sel,
Joins joins)
Append a where clause to the given statement checking if this value is empty. |
void |
appendIsNotNull(SQLBuffer sql,
Select sel,
Joins joins)
Append a where clause to the given statement checking if this value is not null. |
void |
appendIsNull(SQLBuffer sql,
Select sel,
Joins joins)
Append a where clause to the given statement checking if this value is null. |
void |
deleteEmbedded(KodoStateManager sm,
JDBCStoreManager store)
Override this method to customize deleting the given mapping (used with embedded values only). |
void |
deleteEmbedded(KodoStateManager sm,
RowManager rm)
Delete values for the mapping. |
Column[] |
getColumns()
Return the data columns for this mapping. |
Object |
getDataStoreValue(Object val)
Translate the given external field value to its datastore equivalent. |
int |
getDeleteAction()
The value of the delete action extension. |
int |
getElementDeleteAction()
The value of the element delete action extension. |
int |
getElementIndexed()
The value of the element indexed extension. |
int |
getElementSize()
The value of the element size extension. |
ClassMapping |
getElementTypeMapping()
Convenience method to make casting from FieldMetaData.getElementTypeMetaData()
unnecessary. |
String |
getFieldMappingName()
The value of the field mapping name extension. |
int |
getIndexed()
The value of the indexed extension. |
int |
getJDBCTypeCode()
The value of the jdbc-type extension |
Column[] |
getKeyColumns()
Return the key columns for this mapping, or empty array if none. |
Object |
getKeyDataStoreValue(Object val)
Translate the given key value to its datastore equivalent. |
int |
getKeyDeleteAction()
The value of the key delete action extension. |
int |
getKeyIndexed()
The value of the key indexed extension. |
int |
getKeySize()
The value of the key size extension. |
ClassMapping |
getKeyTypeMapping()
Convenience method to make casting from FieldMetaData.getKeyTypeMetaData()
unnecessary. |
FieldMetaData |
getMetaData()
Return the underlying FieldMetaData for this mapping. |
ClassMapping |
getNonVirtualOwner()
The non-virtual owner for the field. |
ClassMapping |
getOwnerMapping()
Convenience method to make casting FieldMetaData.getOwner() unnecessary. |
int |
getRefDeleteAction()
The value of the ref delete action extension. |
int |
getRefIndexed()
The value of the ref indexed extension. |
int |
getSize()
The value of the size extension. |
String |
getSQLType()
The sql type name extension. |
ClassMapping |
getTypeMapping()
Convenience method to make casting from FieldMetaData.getTypeMetaData()
unnecessary. |
boolean |
isAutoIncrement()
The value of the auto increment extension. |
Boolean |
isCustomDeleteEmbedded(KodoStateManager sm)
Return Boolean.FALSE if this mapping does not customize the
delete process, Boolean.TRUE if it does, or null if it does
customize the delete, but also relies on the standard delete method
being called. |
Boolean |
isCustomNullEmbedded(KodoStateManager sm)
Return Boolean.FALSE if this mapping does not customize the
nulling process, Boolean.TRUE if it does, or null if it does
customize the nulling, but also relies on the standard nulling method
being called. |
boolean |
isDeleteActionDeferred()
The value of the delete action extension. |
boolean |
isEagerJoinToMany()
Whether the eager joins used by this field are to-many. |
boolean |
isElementDeleteActionDeferred()
The value of the element delete action extension. |
boolean |
isKeyDeleteActionDeferred()
The value of the key delete action extension. |
boolean |
isRefDeleteActionDeferred()
The value of the ref delete action extension. |
Joins |
join(Joins joins)
Join this value to the class table. |
Joins |
joinKey(Joins joins)
Join the key value to the class table. |
Joins |
joinKeyRelation(Joins joins)
Join this value's table to the table for the related first class object key type, if any. |
Joins |
joinRelation(Joins joins)
Join this value's table to the table for the related first class object type, if any. |
void |
load(KodoStateManager sm,
JDBCStoreManager store,
JDBCFetchConfiguration fetch)
Load secondary data using a connection from the store manager. |
void |
load(KodoStateManager sm,
JDBCStoreManager store,
JDBCFetchConfiguration fetch,
Result res)
Load virtual row data; the given result is not guaranteed to contain data for this field, so the field mapping should make sure the result contains its needed column data before loading. |
void |
loadEagerJoin(KodoStateManager sm,
JDBCStoreManager store,
JDBCFetchConfiguration fetch,
Result res)
Load the joined eager result. |
void |
loadEagerParallel(KodoStateManager sm,
JDBCStoreManager store,
JDBCFetchConfiguration fetch,
Result res,
Result orig)
Load the batched eager result. |
Object |
loadKeyProjection(JDBCStoreManager store,
JDBCFetchConfiguration fetch,
Result res,
Joins joins)
Load this field's key value using the given result. |
Object |
loadProjection(JDBCStoreManager store,
JDBCFetchConfiguration fetch,
Result res,
Joins joins)
Load this field value using the given result. |
void |
nullEmbedded(KodoStateManager sm,
JDBCStoreManager store)
Override this method to customize nulling the given mapping (used with embedded values only). |
void |
nullEmbedded(KodoStateManager sm,
RowManager rm)
Null values for the mapping. |
int |
select(Select sel,
KodoStateManager sm,
JDBCStoreManager store,
JDBCFetchConfiguration fetch,
int eagerMode)
Select the virtual row columns of this mapping. |
int |
selectEagerJoin(Select sel,
KodoStateManager sm,
JDBCStoreManager store,
JDBCFetchConfiguration fetch,
int eagerMode)
Use eager joins to select related objects. |
int |
selectEagerParallel(Select sel,
Select orig,
KodoStateManager sm,
JDBCStoreManager store,
JDBCFetchConfiguration fetch,
int eagerMode)
Create a parallel eager select for related objects. |
void |
setAutoIncrement(boolean autoInc)
The value of the auto increment extension. |
void |
setDeleteAction(int action,
boolean deferred)
The value of the delete action extension. |
void |
setElementDeleteAction(int action,
boolean deferred)
The value of the element delete action extension. |
void |
setElementIndexed(int idx)
The value of the element indexed extension. |
void |
setElementSize(int size)
The value of the element size extension. |
void |
setFieldMappingName(String map)
The value of the field mapping name extension. |
void |
setIndexed(int idx)
The value of the indexed extension. |
void |
setJDBCTypeCode(int type)
The value of the jdbc-type extension. |
void |
setKeyDeleteAction(int action,
boolean deferred)
The value of the key delete action extension. |
void |
setKeyIndexed(int idx)
The value of the key indexed extension. |
void |
setKeySize(int size)
The value of the key size extension. |
void |
setNonVirtualOwner(ClassMapping nvm)
The non-virtual owner for the field. |
void |
setRefDeleteAction(int action,
boolean deferred)
The value of the ref delete action extension. |
void |
setRefIndexed(int idx)
The value of the ref indexed extension. |
void |
setSize(int size)
The value of the size extension. |
void |
setSQLType(String type)
The sql type name extension. |
boolean |
supportsSelect(Select sel,
int type,
KodoStateManager sm,
JDBCStoreManager store,
JDBCFetchConfiguration fetch)
Return true if this mapping can perform the given select type. |
Methods inherited from interface java.lang.Comparable |
compareTo |
Methods inherited from interface kodo.meta.Commentable |
getComments |
Methods inherited from interface kodo.jdbc.meta.Mapping |
addMappingInfoAttributes, delete, delete, fromMappingInfo, getMappingRepository, getMappingType, getTable, insert, insert, isCustomDelete, isCustomInsert, isCustomUpdate, map, refSchemaComponents, reverseMap, toMappingInfo, update, update |
Field Detail |
public static final String FIELD_MAP
public static final String JDBC_TYPE
public static final String SQL_TYPE
public static final String SIZE
public static final String ELEMENT_SIZE
SIZE
public static final String VALUE_SIZE
SIZE
public static final String KEY_SIZE
SIZE
public static final String INDEXED
true
, false
, or unique
.
Default depends on the mapping involved.public static final String ELEMENT_INDEXED
INDEXED
public static final String VALUE_INDEXED
INDEXED
public static final String KEY_INDEXED
INDEXED
public static final String REF_INDEXED
INDEXED
public static final String DELETE_ACTION
none
, null
,
null-deferred
, default
,
default-deferred
, exception
,
exception-deferred
, cascade
,
cascade-deferred
. Default depends on mapping involved.public static final String ELEMENT_DELETE_ACTION
DELETE_ACTION
public static final String KEY_DELETE_ACTION
DELETE_ACTION
public static final String VALUE_DELETE_ACTION
DELETE_ACTION
public static final String REF_DELETE_ACTION
DELETE_ACTION
public static final String AUTO_INCREMENT
public static final String[] EXTENSION_KEYS
Method Detail |
public Column[] getColumns()
public Column[] getKeyColumns()
public boolean supportsSelect(Select sel, int type, KodoStateManager sm, JDBCStoreManager store, JDBCFetchConfiguration fetch)
Select#JOINLESS
and the given select instance already has this field's table selected.
The given state manager may be null if selecting multiple instances.public int selectEagerParallel(Select sel, Select orig, KodoStateManager sm, JDBCStoreManager store, JDBCFetchConfiguration fetch, int eagerMode)
select(kodo.jdbc.sql.Select, kodo.runtime.KodoStateManager, kodo.jdbc.runtime.JDBCStoreManager, kodo.jdbc.runtime.JDBCFetchConfiguration, int)
public int selectEagerJoin(Select sel, KodoStateManager sm, JDBCStoreManager store, JDBCFetchConfiguration fetch, int eagerMode)
select(kodo.jdbc.sql.Select, kodo.runtime.KodoStateManager, kodo.jdbc.runtime.JDBCStoreManager, kodo.jdbc.runtime.JDBCFetchConfiguration, int)
public boolean isEagerJoinToMany()
public int select(Select sel, KodoStateManager sm, JDBCStoreManager store, JDBCFetchConfiguration fetch, int eagerMode)
sel
- the select to add tosm
- the instance being loaded, or null if not
initialized yet or selecting for multiple instancesstore
- the current store managerfetch
- fetch configurationeagerMode
- the eager fetch mode to use; this may be more
restrictive than the mode of the fetch configurationpublic void loadEagerParallel(KodoStateManager sm, JDBCStoreManager store, JDBCFetchConfiguration fetch, Result res, Result orig) throws SQLException
public void loadEagerJoin(KodoStateManager sm, JDBCStoreManager store, JDBCFetchConfiguration fetch, Result res) throws SQLException
public void load(KodoStateManager sm, JDBCStoreManager store, JDBCFetchConfiguration fetch, Result res) throws SQLException
public void load(KodoStateManager sm, JDBCStoreManager store, JDBCFetchConfiguration fetch) throws SQLException
public void nullEmbedded(KodoStateManager sm, RowManager rm) throws SQLException
Mapping.insert(kodo.runtime.KodoStateManager, kodo.jdbc.sql.RowManager)
public void deleteEmbedded(KodoStateManager sm, RowManager rm) throws SQLException
Mapping.insert(kodo.runtime.KodoStateManager, kodo.jdbc.sql.RowManager)
public Boolean isCustomNullEmbedded(KodoStateManager sm)
Boolean.FALSE
if this mapping does not customize the
nulling process, Boolean.TRUE
if it does, or null if it does
customize the nulling, but also relies on the standard nulling method
being called. Implement the
#nullEmbedded(KodoStateManager,JDBCStoreManager,Connection)
method to override the default update behavior.public Boolean isCustomDeleteEmbedded(KodoStateManager sm)
Boolean.FALSE
if this mapping does not customize the
delete process, Boolean.TRUE
if it does, or null if it does
customize the delete, but also relies on the standard delete method
being called. Implement the
#deleteEmbedded(KodoStateManager,JDBCStoreManager,Connection)
method to override the default update behavior.public void nullEmbedded(KodoStateManager sm, JDBCStoreManager store) throws SQLException
public void deleteEmbedded(KodoStateManager sm, JDBCStoreManager store) throws SQLException
public Object getDataStoreValue(Object val)
public Object getKeyDataStoreValue(Object val)
public void appendIsEmpty(SQLBuffer sql, Select sel, Joins joins)
public void appendIsNull(SQLBuffer sql, Select sel, Joins joins)
public void appendIsNotNull(SQLBuffer sql, Select sel, Joins joins)
public Joins join(Joins joins)
public Joins joinKey(Joins joins)
public Joins joinRelation(Joins joins)
public Joins joinKeyRelation(Joins joins)
public Object loadProjection(JDBCStoreManager store, JDBCFetchConfiguration fetch, Result res, Joins joins) throws SQLException
getColumns()
.public Object loadKeyProjection(JDBCStoreManager store, JDBCFetchConfiguration fetch, Result res, Joins joins) throws SQLException
getKeyColumns()
.public String getFieldMappingName()
public void setFieldMappingName(String map)
public int getJDBCTypeCode()
public void setJDBCTypeCode(int type)
public String getSQLType()
public void setSQLType(String type)
public int getSize()
public void setSize(int size)
public int getElementSize()
public void setElementSize(int size)
public int getKeySize()
public void setKeySize(int size)
public int getIndexed()
public void setIndexed(int idx)
public int getElementIndexed()
public void setElementIndexed(int idx)
public int getKeyIndexed()
public void setKeyIndexed(int idx)
public int getRefIndexed()
public void setRefIndexed(int idx)
public int getDeleteAction()
public boolean isDeleteActionDeferred()
public void setDeleteAction(int action, boolean deferred)
public int getElementDeleteAction()
public boolean isElementDeleteActionDeferred()
public void setElementDeleteAction(int action, boolean deferred)
public int getKeyDeleteAction()
public boolean isKeyDeleteActionDeferred()
public void setKeyDeleteAction(int action, boolean deferred)
public int getRefDeleteAction()
public boolean isRefDeleteActionDeferred()
public void setRefDeleteAction(int action, boolean deferred)
public boolean isAutoIncrement()
public void setAutoIncrement(boolean autoInc)
public FieldMetaData getMetaData()
FieldMetaData
for this mapping.public ClassMapping getOwnerMapping()
FieldMetaData.getOwner()
unnecessary.public ClassMapping getNonVirtualOwner()
public void setNonVirtualOwner(ClassMapping nvm)
public ClassMapping getTypeMapping()
FieldMetaData.getTypeMetaData()
unnecessary.public ClassMapping getElementTypeMapping()
FieldMetaData.getElementTypeMetaData()
unnecessary.public ClassMapping getKeyTypeMapping()
FieldMetaData.getKeyTypeMetaData()
unnecessary.
|
SolarMetric Kodo JDO 3.3.5 generated on August 31 2005 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |