|
SolarMetric Kodo JDO 3.0.3 generated on February 20 2004 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--kodo.meta.DelegatingExtensions
|
+--kodo.meta.DelegatingFieldMetaData
|
+--kodo.jdbc.meta.FieldMapping
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 |
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 |
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 |
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.jdbc.meta.JDBCTypes |
TYPE_ASCII_STREAM, TYPE_BINARY_STREAM, TYPE_BLOB, TYPE_BYTES, TYPE_CHAR_STREAM, TYPE_CLOB, TYPE_JDBC_DEFAULT, TYPE_REF, TYPE_SQL_ARRAY, TYPE_SQL_DATE, TYPE_SQL_OBJECT, TYPE_TIME, TYPE_TIMESTAMP |
| 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 |
| Fields inherited from interface kodo.meta.FieldMetaData |
DEPENDENT, ELEMENT_DEPENDENT, ELEMENT_TYPE, EXTERNALIZER, FACTORY, FETCH_GROUP, INVERSE_OWNER, KEY_DEPENDENT, KEY_TYPE, LRS, MANAGE_NONE, MANAGE_PERSISTENT, MANAGE_TRANSACTIONAL, NULL_DEFAULT, NULL_EXCEPTION, NULL_NONE, TYPE, VALUE_DEPENDENT, VALUE_TYPE |
| Constructor Summary | |
FieldMapping(FieldMetaData meta)
Constructor. |
|
| Method Summary | |
void |
appendIsEmpty(SQLBuffer sql,
Joins joins)
Append a where clause to the given statement checking if this value is empty. |
abstract void |
appendIsNotNull(SQLBuffer sql,
Joins joins)
Append a where clause to the given statement checking if this value is not null. |
abstract void |
appendIsNull(SQLBuffer sql,
Joins joins)
Append a where clause to the given statement checking if this value is null. |
boolean |
containsSelectTables(Select sel)
Return true if the given select has already selected from all the tables that may be selected in select(kodo.jdbc.sql.Select, kodo.runtime.KodoStateManager, kodo.jdbc.runtime.JDBCStoreManager, kodo.jdbc.runtime.JDBCFetchConfiguration, int). |
void |
delete(KodoStateManager sm,
JDBCStoreManager store)
Override this method to customize flushing this mapping. |
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. |
abstract Column[] |
getColumns()
Return the data columns for this mapping. |
Object |
getDataStoreValue(Object val)
Translate the given external field value to its datastore equivalent. |
protected DBDictionary |
getDBDictionary()
Return the dictionary to use. |
ClassMapping |
getDeclaredElementTypeMapping()
Convenience method to make casting from getDeclaredElementTypeMetaData() unnecessary. |
ClassMetaData |
getDeclaredElementTypeMetaData()
Return metadata for the field's type, if the type is persistent. |
ClassMapping |
getDeclaredKeyTypeMapping()
Convenience method to make casting from getDeclaredKeyTypeMetaData() unnecessary. |
ClassMetaData |
getDeclaredKeyTypeMetaData()
Return metadata for the field's type, if the type is persistent. |
ClassMapping |
getDeclaredTypeMapping()
Convenience method to make casting from getDeclaredTypeMetaData()
unnecessary. |
ClassMetaData |
getDeclaredTypeMetaData()
Return metadata for the field's type, if the type is persistent. |
static FieldMapping[] |
getDefaults()
Return the default set of available field mappings. |
int |
getDeleteAction()
|
int |
getElementDeleteAction()
|
int |
getElementIndexed()
|
int |
getElementSize()
|
ClassMapping |
getElementTypeMapping()
Convenience method to make casting from getElementTypeMetaData()
unnecessary. |
ClassMetaData |
getElementTypeMetaData()
Return metadata for the element type, or null if not persistent. |
String |
getFieldMappingName()
|
int |
getIndexed()
|
FieldMapping |
getInverseOwnerMapping()
Convenience method to avoid casting the result of getInverseOwnerMetaData(). |
FieldMetaData |
getInverseOwnerMetaData()
Return the metadata for the field's inverse. |
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()
|
int |
getKeyIndexed()
|
int |
getKeySize()
|
ClassMapping |
getKeyTypeMapping()
Convenience method to make casting from getKeyTypeMetaData()
unnecessary. |
ClassMetaData |
getKeyTypeMetaData()
Return metadata for the key type, or null if not persistent. |
MappingRepository |
getMappingRepository()
Return the mapping's repository. |
ClassMetaData |
getOwner()
Return the owning metadata for this field. |
ClassMapping |
getOwnerMapping()
Convenience method to make casting getOwner() unnecessary. |
int |
getRefDeleteAction()
|
int |
getRefIndexed()
|
int |
getSize()
|
ClassMapping |
getTypeMapping()
Convenience method to make casting from getTypeMetaData()
unnecessary. |
ClassMetaData |
getTypeMetaData()
Return metadata for the field's type, if the type is persistent. |
void |
insert(KodoStateManager sm,
JDBCStoreManager store)
Override this method to customize flushing this mapping. |
void |
invalidateResolve()
For implementation use. |
boolean |
isAutoIncrement()
|
Boolean |
isCustomDelete(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 |
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 |
isCustomInsert(KodoStateManager sm)
Return Boolean.FALSE if this mapping does not customize the
insert process, Boolean.TRUE if it does, or null if it does
customize the insert, but also relies on the standard insert 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 |
isCustomUpdate(KodoStateManager sm)
Return Boolean.FALSE if this mapping does not customize the
update process, Boolean.TRUE if it does, or null if it does
customize the update, but also relies on the standard update method
being called. |
boolean |
isDeleteActionDeferred()
|
boolean |
isElementDeleteActionDeferred()
|
boolean |
isKeyDeleteActionDeferred()
|
boolean |
isRefDeleteActionDeferred()
|
boolean |
isResolved()
Return whether this field has been resolved. |
void |
join(Joins joins)
Join this value to the class table. |
void |
joinKey(Joins joins)
Join the key value to the class table. |
void |
joinKeyRelation(Joins joins)
Join this value's table to the table for the related first class object key type, if any. |
void |
joinRelation(Joins joins)
Join this value's table to the table for the related first class object type, if any. |
abstract void |
load(KodoStateManager sm,
JDBCStoreManager store,
JDBCFetchConfiguration fetch)
Load secondary data using a connection from the store manager. |
abstract 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. |
Object |
loadKeyProjection(JDBCStoreManager store,
JDBCFetchConfiguration fetch,
Result res)
Load this field's key value using the given result. |
abstract Object |
loadProjection(JDBCStoreManager store,
JDBCFetchConfiguration fetch,
Result res)
Load this field value using the given result. |
static FieldMapping |
newInstance(String type,
FieldMetaData meta)
Return the mapping for the given mapping name. |
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. |
void |
resolve()
For implementation use. |
void |
reverseMap(SchemaGroup schema,
ReverseMappingTool tool)
Create mappings from the schema, using the given tool. |
abstract int |
select(Select sel,
KodoStateManager sm,
JDBCStoreManager store,
JDBCFetchConfiguration fetch,
int eagerMode)
Select the virtual row columns of this mapping. |
void |
selectEager(Select sel,
KodoStateManager sm,
JDBCStoreManager store,
JDBCFetchConfiguration fetch)
Select eager to-many relations. |
void |
setAutoIncrement(boolean autoInc)
|
void |
setDeleteAction(int action,
boolean deferred)
|
void |
setElementDeleteAction(int action,
boolean deferred)
|
void |
setElementIndexed(int idx)
|
void |
setElementSize(int size)
|
void |
setFieldMappingName(String map)
|
void |
setIndexed(int idx)
|
void |
setKeyDeleteAction(int action,
boolean deferred)
|
void |
setKeyIndexed(int idx)
|
void |
setKeySize(int size)
|
void |
setOwner(ClassMetaData owner)
Set the owning metadata for this field. |
void |
setRefDeleteAction(int action,
boolean deferred)
|
void |
setRefIndexed(int idx)
|
void |
setSize(int size)
|
boolean |
supportsTwoPartSelect()
Return true if this mapping can benefit from a two-part select, in which some data is selected in select(kodo.jdbc.sql.Select, kodo.runtime.KodoStateManager, kodo.jdbc.runtime.JDBCStoreManager, kodo.jdbc.runtime.JDBCFetchConfiguration, int), and other data is
loaded separately. |
void |
update(KodoStateManager sm,
JDBCStoreManager store)
Override this method to customize flushing this mapping. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface kodo.jdbc.meta.Mapping |
delete, fromMappingInfo, getMappingType, getTable, insert, map, refSchemaComponents, toMappingInfo, update |
| Field Detail |
public static final String FIELD_MAP
public static final String SIZE
public static final String ELEMENT_SIZE
SIZEpublic static final String VALUE_SIZE
SIZEpublic static final String KEY_SIZE
SIZEpublic static final String INDEXED
true, false, or unique.
Default depends on the mapping involved.public static final String ELEMENT_INDEXED
INDEXEDpublic static final String VALUE_INDEXED
INDEXEDpublic static final String KEY_INDEXED
INDEXEDpublic static final String REF_INDEXED
INDEXEDpublic 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_ACTIONpublic static final String KEY_DELETE_ACTION
DELETE_ACTIONpublic static final String VALUE_DELETE_ACTION
DELETE_ACTIONpublic static final String REF_DELETE_ACTION
DELETE_ACTIONpublic static final String AUTO_INCREMENT
| Constructor Detail |
public FieldMapping(FieldMetaData meta)
| Method Detail |
public static FieldMapping newInstance(String type,
FieldMetaData meta)
public static FieldMapping[] getDefaults()
public MappingRepository getMappingRepository()
MappinggetMappingRepository in interface Mappingpublic abstract Column[] getColumns()
public Column[] getKeyColumns()
public void reverseMap(SchemaGroup schema,
ReverseMappingTool tool)
MappingreverseMap in interface Mappingpublic boolean containsSelectTables(Select sel)
select(kodo.jdbc.sql.Select, kodo.runtime.KodoStateManager, kodo.jdbc.runtime.JDBCStoreManager, kodo.jdbc.runtime.JDBCFetchConfiguration, int). By default, returns
true if the select contains the table returned by Mapping.getTable().public boolean supportsTwoPartSelect()
select(kodo.jdbc.sql.Select, kodo.runtime.KodoStateManager, kodo.jdbc.runtime.JDBCStoreManager, kodo.jdbc.runtime.JDBCFetchConfiguration, int), and other data is
loaded separately. Returns false by default.
public abstract 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 configuration
public void selectEager(Select sel,
KodoStateManager sm,
JDBCStoreManager store,
JDBCFetchConfiguration fetch)
FetchConfiguration.EAGER_FETCH_MULTIPLE. Does nothing by
default.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 configuration
public abstract void load(KodoStateManager sm,
JDBCStoreManager store,
JDBCFetchConfiguration fetch,
Result res)
throws SQLException
public abstract 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 isCustomInsert(KodoStateManager sm)
MappingBoolean.FALSE if this mapping does not customize the
insert process, Boolean.TRUE if it does, or null if it does
customize the insert, but also relies on the standard insert method
being called. Implement the
#insert(KodoStateManager,JDBCStoreManager,Connection) method
to implement the custom insertion behavior.isCustomInsert in interface Mappingpublic Boolean isCustomUpdate(KodoStateManager sm)
MappingBoolean.FALSE if this mapping does not customize the
update process, Boolean.TRUE if it does, or null if it does
customize the update, but also relies on the standard update method
being called. Implement the
#update(KodoStateManager,JDBCStoreManager,Connection) method
to override the default update behavior.isCustomUpdate in interface Mappingpublic Boolean isCustomDelete(KodoStateManager sm)
MappingBoolean.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
#delete(KodoStateManager,JDBCStoreManager,Connection) method
to override the default deletion behavior.isCustomDelete in interface Mappingpublic 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 insert(KodoStateManager sm,
JDBCStoreManager store)
throws SQLException
Mappinginsert in interface Mapping
public void update(KodoStateManager sm,
JDBCStoreManager store)
throws SQLException
Mappingupdate in interface Mapping
public void delete(KodoStateManager sm,
JDBCStoreManager store)
throws SQLException
Mappingdelete in interface Mapping
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,
Joins joins)
public abstract void appendIsNull(SQLBuffer sql,
Joins joins)
public abstract void appendIsNotNull(SQLBuffer sql,
Joins joins)
public void join(Joins joins)
public void joinKey(Joins joins)
public void joinRelation(Joins joins)
public void joinKeyRelation(Joins joins)
public abstract Object loadProjection(JDBCStoreManager store,
JDBCFetchConfiguration fetch,
Result res)
throws SQLException
getColumns().
public Object loadKeyProjection(JDBCStoreManager store,
JDBCFetchConfiguration fetch,
Result res)
throws SQLException
getKeyColumns(). Returns null by default.protected DBDictionary getDBDictionary()
public String getFieldMappingName()
public void setFieldMappingName(String map)
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 ClassMetaData getOwner()
FieldMetaDatagetOwner in class DelegatingFieldMetaDatapublic ClassMapping getOwnerMapping()
getOwner() unnecessary.public void setOwner(ClassMetaData owner)
FieldMetaDatasetOwner in class DelegatingFieldMetaDatapublic ClassMetaData getTypeMetaData()
FieldMetaDatagetTypeMetaData in class DelegatingFieldMetaDatapublic ClassMapping getTypeMapping()
getTypeMetaData()
unnecessary.public ClassMetaData getDeclaredTypeMetaData()
FieldMetaDatagetDeclaredTypeMetaData in class DelegatingFieldMetaDatapublic ClassMapping getDeclaredTypeMapping()
getDeclaredTypeMetaData()
unnecessary.public ClassMetaData getElementTypeMetaData()
FieldMetaDatagetElementTypeMetaData in class DelegatingFieldMetaDatapublic ClassMapping getElementTypeMapping()
getElementTypeMetaData()
unnecessary.public ClassMetaData getDeclaredElementTypeMetaData()
FieldMetaDatagetDeclaredElementTypeMetaData in class DelegatingFieldMetaDatapublic ClassMapping getDeclaredElementTypeMapping()
getDeclaredElementTypeMetaData() unnecessary.public ClassMetaData getKeyTypeMetaData()
FieldMetaDatagetKeyTypeMetaData in class DelegatingFieldMetaDatapublic ClassMapping getKeyTypeMapping()
getKeyTypeMetaData()
unnecessary.public ClassMetaData getDeclaredKeyTypeMetaData()
FieldMetaDatagetDeclaredKeyTypeMetaData in class DelegatingFieldMetaDatapublic ClassMapping getDeclaredKeyTypeMapping()
getDeclaredKeyTypeMetaData() unnecessary.public FieldMetaData getInverseOwnerMetaData()
FieldMetaDatagetInverseOwnerMetaData in class DelegatingFieldMetaDatapublic FieldMapping getInverseOwnerMapping()
getInverseOwnerMetaData().public boolean isResolved()
FieldMetaDataisResolved in class DelegatingFieldMetaDatapublic void invalidateResolve()
FieldMetaDatainvalidateResolve in class DelegatingFieldMetaDatapublic void resolve()
FieldMetaDataresolve in class DelegatingFieldMetaData
|
SolarMetric Kodo JDO 3.0.3 generated on February 20 2004 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||