|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jpox.store.rdbms.scostore.MapEntrySetStore
public class MapEntrySetStore
Representation of backing store for a MapEntry Set.
| Field Summary | |
|---|---|
protected boolean |
allowsNull
Whether the container allows null elements/values. |
protected org.jpox.ClassLoaderResolver |
clr
|
protected org.jpox.store.mapped.DatastoreAdapter |
dba
Datastore adapter in use by this store. |
protected java.lang.String |
iteratorStmt
|
protected org.jpox.store.mapped.mapping.JavaTypeMapping |
keyMapping
Mapping for the key (if not PC(embedded)). |
protected java.lang.String |
keyType
The key type. |
protected org.jpox.metadata.AbstractClassMetaData |
kmd
MetaData for the key class. |
protected static org.jpox.util.Localiser |
LOCALISER
Localiser for messages. |
protected org.jpox.store.scostore.MapStore |
mapStore
The backing store for the Map. |
protected org.jpox.store.mapped.mapping.JavaTypeMapping |
ownerMapping
Mapping to the owner of the container. |
protected org.jpox.metadata.AbstractMemberMetaData |
ownerMemberMetaData
MetaData for the field/property in the owner with this container. |
protected org.jpox.store.mapped.DatastoreContainerObject |
setTable
Table containing the key and value forming the entry. |
protected java.lang.String |
sizeStmt
|
protected RDBMSManager |
storeMgr
Manager for the store. |
protected org.jpox.store.mapped.mapping.JavaTypeMapping |
valueMapping
Mapping for the value (if not PC(embedded)). |
protected java.lang.String |
valueType
The value type |
protected org.jpox.metadata.AbstractClassMetaData |
vmd
MetaData for the value class. |
| Constructor Summary | |
|---|---|
MapEntrySetStore(org.jpox.store.mapped.DatastoreContainerObject valueTable,
org.jpox.store.mapped.mapping.JavaTypeMapping ownerMapping,
org.jpox.store.mapped.mapping.JavaTypeMapping keyMapping,
org.jpox.store.mapped.mapping.JavaTypeMapping valueMapping,
org.jpox.store.scostore.MapStore mapStore)
Constructor when using a ForeignKey Map. |
|
MapEntrySetStore(MapTable mapTable,
org.jpox.store.scostore.MapStore mapStore,
org.jpox.ClassLoaderResolver clr)
Constructor when using a JoinTable map. |
|
| Method Summary | |
|---|---|
boolean |
add(org.jpox.StateManager sm,
java.lang.Object element,
int size)
Method to add an entry to the Map. |
boolean |
addAll(org.jpox.StateManager sm,
java.util.Collection elements,
int size)
Method to add entries to the Map. |
protected boolean |
allowsBatching()
Convenience method to return if the RDBMS supports batching and the user wants batching. |
void |
clear(org.jpox.StateManager sm)
Method to clear the Map. |
boolean |
contains(org.jpox.StateManager sm,
java.lang.Object element)
|
java.lang.String |
getElementType()
Accessor for the element type. |
org.jpox.store.mapped.expression.QueryExpression |
getExistsSubquery(org.jpox.store.mapped.expression.QueryExpression stmt,
org.jpox.store.mapped.mapping.JavaTypeMapping ownerMapping,
org.jpox.store.mapped.expression.LogicSetExpression ownerTe,
org.jpox.store.mapped.DatastoreIdentifier collectionTableAlias)
Create a subquery for the given query that joins a SetStore element table to the owner table. |
org.jpox.store.mapped.mapping.JavaTypeMapping |
getOwnerMapping()
Accessor for the owner mapping. |
org.jpox.store.mapped.expression.QueryExpression |
getSizeSubquery(org.jpox.store.mapped.expression.QueryExpression stmt,
org.jpox.store.mapped.mapping.JavaTypeMapping ownerMapping,
org.jpox.store.mapped.expression.LogicSetExpression ownerTe,
org.jpox.store.mapped.DatastoreIdentifier collectionTableAlias)
Create a subquery for the size() of the collection of entries. |
protected org.jpox.StateManager |
getStateManagerForEmbeddedPCObject(org.jpox.StateManager sm,
java.lang.Object obj,
JoinTable table)
Method to return the StateManager for an embedded PC object (element, key, value). |
org.jpox.store.StoreManager |
getStoreManager()
Accessor for the RDBMSManager. |
boolean |
hasOrderMapping()
Accessor for whether this store has an order mapping to allow for duplicates, or ordering. |
protected boolean |
isEmbeddedMapping(org.jpox.store.mapped.mapping.JavaTypeMapping mapping)
Check if the mapping correspond to a non pc object or embedded field |
java.util.Iterator |
iterator(org.jpox.StateManager sm)
Accessor for an iterator for the entries of the Map. |
org.jpox.store.mapped.expression.ScalarExpression |
joinElementsTo(org.jpox.store.mapped.expression.QueryExpression stmt,
org.jpox.store.mapped.expression.QueryExpression qs,
org.jpox.store.mapped.mapping.JavaTypeMapping ownerMapping,
org.jpox.store.mapped.expression.LogicSetExpression ownerTe,
org.jpox.store.mapped.DatastoreIdentifier collectionTableAlias,
java.lang.Class filteredElementType,
org.jpox.store.mapped.expression.ScalarExpression elmExpr,
org.jpox.store.mapped.DatastoreIdentifier elementTableAlias,
boolean existsQuery)
Method used in queries when contains() has been invoked. |
org.jpox.store.mapped.expression.QueryExpression |
newQueryStatement(org.jpox.StateManager sm,
java.lang.String candidateClass,
org.jpox.store.mapped.DatastoreIdentifier candidateAlias)
Method to return a new QueryStatement. |
org.jpox.store.query.ResultObjectFactory |
newResultObjectFactory(org.jpox.StateManager sm,
org.jpox.store.mapped.expression.QueryExpression expr,
boolean useFetchPlan)
Method to return an object factory for processing map entry statements. |
org.jpox.store.query.ResultObjectFactory |
newResultObjectFactory(org.jpox.StateManager sm,
org.jpox.store.mapped.expression.QueryExpression stmt,
boolean ignoreCache,
boolean useFetchPlan)
Method to return an object factory for processing query statements. |
protected int |
populateOwnerInStatement(org.jpox.StateManager sm,
org.jpox.ObjectManager om,
java.sql.PreparedStatement ps,
int jdbcPosition)
Convenience method to populate the passed PreparedStatement with the value from the owner. |
boolean |
remove(org.jpox.StateManager sm,
java.lang.Object element,
int size,
boolean allowDependentField)
Method to remove an entry from the Map. |
boolean |
removeAll(org.jpox.StateManager sm,
java.util.Collection elements,
int size)
Method to remove entries from the Map. |
protected void |
setOwnerMemberMetaData(org.jpox.metadata.AbstractMemberMetaData mmd)
Method to set the owner field/property MetaData and sets whether null elements/values are allowed. |
int |
size(org.jpox.StateManager sm)
Accessor for the size of the Map. |
boolean |
updateEmbeddedElement(org.jpox.StateManager sm,
java.lang.Object element,
int fieldNumber,
java.lang.Object value)
Method to update an embedded element. |
protected boolean |
validateElementType(java.lang.Object element)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jpox.store.scostore.Store |
|---|
getStoreManager |
| Field Detail |
|---|
protected org.jpox.store.mapped.DatastoreContainerObject setTable
protected org.jpox.store.scostore.MapStore mapStore
protected org.jpox.store.mapped.mapping.JavaTypeMapping keyMapping
protected org.jpox.store.mapped.mapping.JavaTypeMapping valueMapping
protected java.lang.String keyType
protected java.lang.String valueType
protected org.jpox.metadata.AbstractClassMetaData kmd
protected org.jpox.metadata.AbstractClassMetaData vmd
protected java.lang.String iteratorStmt
protected java.lang.String sizeStmt
protected org.jpox.ClassLoaderResolver clr
protected static final org.jpox.util.Localiser LOCALISER
protected RDBMSManager storeMgr
protected org.jpox.store.mapped.DatastoreAdapter dba
protected org.jpox.store.mapped.mapping.JavaTypeMapping ownerMapping
protected org.jpox.metadata.AbstractMemberMetaData ownerMemberMetaData
protected boolean allowsNull
| Constructor Detail |
|---|
public MapEntrySetStore(MapTable mapTable,
org.jpox.store.scostore.MapStore mapStore,
org.jpox.ClassLoaderResolver clr)
mapTable - Table for the mapmapStore - Store in use by the Mapclr - ClassLoader resolver
public MapEntrySetStore(org.jpox.store.mapped.DatastoreContainerObject valueTable,
org.jpox.store.mapped.mapping.JavaTypeMapping ownerMapping,
org.jpox.store.mapped.mapping.JavaTypeMapping keyMapping,
org.jpox.store.mapped.mapping.JavaTypeMapping valueMapping,
org.jpox.store.scostore.MapStore mapStore)
valueTable - Table storing the valuesownerMapping - Mapping to the ownerkeyMapping - Mapping to the keyvalueMapping - Mapping to the valuemapStore - Store in use by the map.| Method Detail |
|---|
public boolean hasOrderMapping()
hasOrderMapping in interface org.jpox.store.scostore.CollectionStore
public boolean updateEmbeddedElement(org.jpox.StateManager sm,
java.lang.Object element,
int fieldNumber,
java.lang.Object value)
updateEmbeddedElement in interface org.jpox.store.scostore.CollectionStoresm - State Manager of the ownerelement - The element to updatefieldNumber - The number of the field to updatevalue - The value
public java.lang.String getElementType()
getElementType in interface org.jpox.store.scostore.CollectionStorepublic org.jpox.store.mapped.mapping.JavaTypeMapping getOwnerMapping()
protected boolean validateElementType(java.lang.Object element)
public java.util.Iterator iterator(org.jpox.StateManager sm)
iterator in interface org.jpox.store.scostore.CollectionStoresm - State manager for the owner
public int size(org.jpox.StateManager sm)
size in interface org.jpox.store.scostore.CollectionStoresm - The state manager
public boolean contains(org.jpox.StateManager sm,
java.lang.Object element)
contains in interface org.jpox.store.scostore.CollectionStore
public boolean add(org.jpox.StateManager sm,
java.lang.Object element,
int size)
add in interface org.jpox.store.scostore.CollectionStoresm - State Manager for the ownerelement - Entry to add
public boolean addAll(org.jpox.StateManager sm,
java.util.Collection elements,
int size)
addAll in interface org.jpox.store.scostore.CollectionStoresm - State Manager for the ownerelements - Entries to add
public boolean remove(org.jpox.StateManager sm,
java.lang.Object element,
int size,
boolean allowDependentField)
remove in interface org.jpox.store.scostore.CollectionStoresm - State Manager for the ownerelement - Entry to remove
public boolean removeAll(org.jpox.StateManager sm,
java.util.Collection elements,
int size)
removeAll in interface org.jpox.store.scostore.CollectionStoresm - State Manager for the ownerelements - Entries to remove
public void clear(org.jpox.StateManager sm)
clear in interface org.jpox.store.scostore.CollectionStoresm - State Manager for the owner.
public org.jpox.store.query.ResultObjectFactory newResultObjectFactory(org.jpox.StateManager sm,
org.jpox.store.mapped.expression.QueryExpression expr,
boolean useFetchPlan)
sm - the StateManagerexpr - the QueryExpressionuseFetchPlan - whether to use the FetchPlan
org.jpox.exceptions.JPOXUserException - unsupported method
public org.jpox.store.mapped.expression.QueryExpression newQueryStatement(org.jpox.StateManager sm,
java.lang.String candidateClass,
org.jpox.store.mapped.DatastoreIdentifier candidateAlias)
sm - StateManager for the collection.candidateClass - The class to querycandidateAlias - Alias for the candidate
org.jpox.exceptions.JPOXUserException - unsupported method
public org.jpox.store.query.ResultObjectFactory newResultObjectFactory(org.jpox.StateManager sm,
org.jpox.store.mapped.expression.QueryExpression stmt,
boolean ignoreCache,
boolean useFetchPlan)
sm - State Manager for the collection.stmt - The Query Statement.ignoreCache - Whether to ignore the cache.useFetchPlan - whether to use the fetch plan to retrieve fields in the same query
org.jpox.exceptions.JPOXUserException - unsupported method
public org.jpox.store.mapped.expression.QueryExpression getExistsSubquery(org.jpox.store.mapped.expression.QueryExpression stmt,
org.jpox.store.mapped.mapping.JavaTypeMapping ownerMapping,
org.jpox.store.mapped.expression.LogicSetExpression ownerTe,
org.jpox.store.mapped.DatastoreIdentifier collectionTableAlias)
stmt - The Query Statement.ownerMapping - the mapping for the owner.ownerTe - Table Expression for the ownercollectionTableAlias - Alias for the "Collection" table.
org.jpox.exceptions.JPOXUserException - unsupported method
public org.jpox.store.mapped.expression.QueryExpression getSizeSubquery(org.jpox.store.mapped.expression.QueryExpression stmt,
org.jpox.store.mapped.mapping.JavaTypeMapping ownerMapping,
org.jpox.store.mapped.expression.LogicSetExpression ownerTe,
org.jpox.store.mapped.DatastoreIdentifier collectionTableAlias)
stmt - The Query Statement.ownerMapping - the mapping for the owner.ownerTe - Table Expression for the ownercollectionTableAlias - Alias for the "Collection" table.
org.jpox.exceptions.JPOXUserException - unsupported method
public org.jpox.store.mapped.expression.ScalarExpression joinElementsTo(org.jpox.store.mapped.expression.QueryExpression stmt,
org.jpox.store.mapped.expression.QueryExpression qs,
org.jpox.store.mapped.mapping.JavaTypeMapping ownerMapping,
org.jpox.store.mapped.expression.LogicSetExpression ownerTe,
org.jpox.store.mapped.DatastoreIdentifier collectionTableAlias,
java.lang.Class filteredElementType,
org.jpox.store.mapped.expression.ScalarExpression elmExpr,
org.jpox.store.mapped.DatastoreIdentifier elementTableAlias,
boolean existsQuery)
stmt - The Query StatementownerMapping - the mapping for the owner.ownerTe - Table Expression for the ownercollectionTableAlias - Alias for the "Collection" table.filteredElementType - The Class Type for the filtered elementelmExpr - The Expression for the elementelementTableAlias - The SQL alias to assign to the expression or to the element table.
org.jpox.exceptions.JPOXUserException - unsupported methodprotected void setOwnerMemberMetaData(org.jpox.metadata.AbstractMemberMetaData mmd)
mmd - MetaData for the field/property owning this backing store.public org.jpox.store.StoreManager getStoreManager()
protected boolean isEmbeddedMapping(org.jpox.store.mapped.mapping.JavaTypeMapping mapping)
mapping - the mapping
protected int populateOwnerInStatement(org.jpox.StateManager sm,
org.jpox.ObjectManager om,
java.sql.PreparedStatement ps,
int jdbcPosition)
sm - State Managerom - Object Managerps - The PreparedStatementjdbcPosition - Position in JDBC statement to populate
protected org.jpox.StateManager getStateManagerForEmbeddedPCObject(org.jpox.StateManager sm,
java.lang.Object obj,
JoinTable table)
sm - State Manager of the ownerobj - The embedded PC objecttable - Join table where the objects are stored
protected boolean allowsBatching()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||