|
SolarMetric Kodo JDO 3.2.4 generated on January 7 2005 | ||||||||
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.AbstractFieldMapping | +--kodo.jdbc.meta.ReferenceFieldMapping | +--kodo.jdbc.meta.ContainerFieldMapping | +--kodo.jdbc.meta.AbstractCollectionFieldMapping
Base class for collection mappings. Manages ordering and basic
query functionality as well as lazy loading. Subclasses must implement
FieldMapping.loadProjection(kodo.jdbc.runtime.JDBCStoreManager, kodo.jdbc.runtime.JDBCFetchConfiguration, kodo.jdbc.sql.Result, kodo.jdbc.sql.Joins)
even if they have FCO elements.
Inner Class Summary | |
protected class |
AbstractCollectionFieldMapping.LRSProxyCollection
Large result set collection. |
Field Summary | |
static String |
ORDERED
Extension key used to mark whether a collection/array mapping should use an extra column to maintain order. |
Fields inherited from class kodo.jdbc.meta.ContainerFieldMapping |
CONTAINER_META |
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.jdbc.meta.FieldMapping |
AUTO_INCREMENT, DELETE_ACTION, ELEMENT_DELETE_ACTION, ELEMENT_INDEXED, ELEMENT_SIZE, EXTENSION_KEYS, FIELD_MAP, INDEXED, KEY_DELETE_ACTION, KEY_INDEXED, KEY_SIZE, REF_DELETE_ACTION, REF_INDEXED, SIZE, VALUE_DELETE_ACTION, VALUE_INDEXED, VALUE_SIZE |
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, TYPE, VALUE_DEPENDENT, VALUE_TYPE |
Constructor Summary | |
AbstractCollectionFieldMapping(FieldMetaData meta)
Constructor. |
Method Summary | |
void |
addExtensionKeys(Collection attrs)
Add all the known extension keys to the specified collection; any implementation that utilized new extensions should override this method to include both the known extensions of its superclass as well as its own extension keys. |
void |
addMappingInfoAttributes(Collection attrs)
Add all mapping attributes names used by this mapping to the given collection. |
protected void |
fromMappingInfo(MappingInfo info,
boolean adapt,
boolean canOrder)
|
Column |
getOrderColumn()
Return the column holding the ordering data. |
int |
getOrdered()
|
boolean |
isEagerJoinToMany()
Whether the eager joins used by this field are to-many. |
void |
load(KodoStateManager sm,
JDBCStoreManager store,
JDBCFetchConfiguration fetch)
Load secondary data using a connection from the store manager. |
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. |
protected boolean |
map(Table table,
boolean defaultOrder)
|
void |
refSchemaComponents()
Increment the reference count of all used schema components. |
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. |
protected abstract void |
selectProjection(Select sel,
JDBCStoreManager store,
JDBCFetchConfiguration fetch,
int eagerMode,
Joins joins)
Implement this method to select the projection of this field. |
void |
setOrderColumn(Column col)
Set the column holding the ordering data. |
void |
setOrdered(int ordered)
|
boolean |
supportsSelect(Select sel,
int type,
KodoStateManager sm,
JDBCStoreManager store,
JDBCFetchConfiguration fetch)
Return true if this mapping can perform the given select type. |
protected Object |
toArray(Collection coll)
Helper method to return the given collection as an array. |
protected Collection |
toCollection(Object array)
Helper method to return the given array as a collection. |
void |
toMappingInfo(MappingInfo info)
Serialize this mapping to a simple MappingInfo instance
for transfer to XML or some other format. |
Methods inherited from class kodo.jdbc.meta.ContainerFieldMapping |
appendIsEmpty, appendIsNotNull, appendIsNull, delete, fromMappingInfo, getContainerMeta, getMetaDataColumn, insert, join, load, map, nullEmbedded, select, setContainerMeta, setMetaDataColumn, update |
Methods inherited from class kodo.jdbc.meta.ReferenceFieldMapping |
createRefForeignKey, getJoinedRow, getRefForeignKey, getRefJoins, getRefJoinType, getTable, join, setRefForeignKey, setRefForeignKey, setRefJoinType, wherePrimaryKey, whereRefForeignKey |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface kodo.jdbc.meta.Mapping |
getMappingType |
Methods inherited from interface kodo.jdbc.meta.FieldMapping |
getColumns, loadProjection |
Methods inherited from interface java.lang.Comparable |
compareTo |
Field Detail |
public static final String ORDERED
true
and false
.Constructor Detail |
public AbstractCollectionFieldMapping(FieldMetaData meta)
Method Detail |
public Column getOrderColumn()
public void setOrderColumn(Column col)
public int getOrdered()
public void setOrdered(int ordered)
public void toMappingInfo(MappingInfo info)
Mapping
MappingInfo
instance
for transfer to XML or some other format.toMappingInfo
in class ContainerFieldMapping
protected void fromMappingInfo(MappingInfo info, boolean adapt, boolean canOrder)
fromMappingInfo
in class ReferenceFieldMapping
public void addMappingInfoAttributes(Collection attrs)
Mapping
addMappingInfoAttributes
in class ContainerFieldMapping
public void addExtensionKeys(Collection attrs)
Extensions
addExtensionKeys
in class ContainerFieldMapping
protected boolean map(Table table, boolean defaultOrder)
public void refSchemaComponents()
Mapping
refSchemaComponents
in class ContainerFieldMapping
protected abstract void selectProjection(Select sel, JDBCStoreManager store, JDBCFetchConfiguration fetch, int eagerMode, Joins joins)
FieldMapping.loadProjection(kodo.jdbc.runtime.JDBCStoreManager, kodo.jdbc.runtime.JDBCFetchConfiguration, kodo.jdbc.sql.Result, kodo.jdbc.sql.Joins)
.public boolean supportsSelect(Select sel, int type, KodoStateManager sm, JDBCStoreManager store, JDBCFetchConfiguration fetch)
FieldMapping
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.supportsSelect
in class ContainerFieldMapping
public int selectEagerJoin(Select sel, KodoStateManager sm, JDBCStoreManager store, JDBCFetchConfiguration fetch, int eagerMode)
FieldMapping
selectEagerJoin
in class AbstractFieldMapping
kodo.jdbc.meta.FieldMapping
FieldMapping.select(kodo.jdbc.sql.Select, kodo.runtime.KodoStateManager, kodo.jdbc.runtime.JDBCStoreManager, kodo.jdbc.runtime.JDBCFetchConfiguration, int)
public boolean isEagerJoinToMany()
FieldMapping
isEagerJoinToMany
in class AbstractFieldMapping
public int selectEagerParallel(Select sel, Select orig, KodoStateManager sm, JDBCStoreManager store, JDBCFetchConfiguration fetch, int eagerMode)
FieldMapping
selectEagerParallel
in class AbstractFieldMapping
kodo.jdbc.meta.FieldMapping
FieldMapping.select(kodo.jdbc.sql.Select, kodo.runtime.KodoStateManager, kodo.jdbc.runtime.JDBCStoreManager, kodo.jdbc.runtime.JDBCFetchConfiguration, int)
public void loadEagerJoin(KodoStateManager sm, JDBCStoreManager store, JDBCFetchConfiguration fetch, Result res) throws SQLException
FieldMapping
loadEagerJoin
in class AbstractFieldMapping
public void loadEagerParallel(KodoStateManager sm, JDBCStoreManager store, JDBCFetchConfiguration fetch, Result res, Result orig) throws SQLException
FieldMapping
loadEagerParallel
in class AbstractFieldMapping
public void load(KodoStateManager sm, JDBCStoreManager store, JDBCFetchConfiguration fetch) throws SQLException
FieldMapping
protected Collection toCollection(Object array)
protected Object toArray(Collection coll)
|
SolarMetric Kodo JDO 3.2.4 generated on January 7 2005 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |