|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jpox.store.rdbms.scostore.ElementContainerStore
org.jpox.store.rdbms.scostore.AbstractArrayStore
org.jpox.store.rdbms.scostore.JoinArrayStore
public class JoinArrayStore
Backing store for an array stored using a join table. Can be used for all types of arrays :- PersistenceCapable arrays, non-PersistenceCapable arrays, reference arrays.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.jpox.store.rdbms.scostore.ElementContainerStore |
|---|
ElementContainerStore.ElementInfo |
| Field Summary | |
|---|---|
protected boolean |
allowsNull
Whether the container allows null elements/values. |
protected org.jpox.store.mapped.DatastoreAdapter |
dba
Datastore adapter in use by this store. |
protected static org.jpox.util.Localiser |
LOCALISER
Localiser for messages. |
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 RDBMSManager |
storeMgr
Manager for the store. |
| Fields inherited from class org.jpox.store.rdbms.scostore.ElementContainerStore |
|---|
addStmt, clearStmt, clr, containerTable, elementInfo, elementIsPersistentInterface, elementMapping, elementsAreEmbedded, elementsAreSerialised, elementType, elmIdentifier, emd, iterateUsingDiscriminator, orderMapping, relationDiscriminatorMapping, relationDiscriminatorValue, removeStmt, usingDiscriminatorInSizeStmt |
| Constructor Summary | |
|---|---|
JoinArrayStore(ArrayTable joinTable,
org.jpox.ClassLoaderResolver clr)
Constructor. |
|
| Method Summary | |
|---|---|
protected boolean |
allowsBatching()
Convenience method to return if the RDBMS supports batching and the user wants batching. |
protected org.jpox.store.mapped.expression.QueryExpression |
getIteratorStatement(org.jpox.StateManager ownerSM)
Accessor for the iterator statement to retrieve the element(s) for the array. |
org.jpox.store.mapped.mapping.JavaTypeMapping |
getOwnerMapping()
Accessor for the owner mapping. |
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. |
protected boolean |
isEmbeddedMapping(org.jpox.store.mapped.mapping.JavaTypeMapping mapping)
Check if the mapping correspond to a non pc object or embedded field |
org.jpox.store.mapped.expression.ScalarExpression |
joinElementsTo(org.jpox.store.mapped.expression.QueryExpression stmt,
org.jpox.store.mapped.expression.QueryExpression parentStmt,
org.jpox.store.mapped.mapping.JavaTypeMapping ownerMapping,
org.jpox.store.mapped.expression.LogicSetExpression ownerTe,
org.jpox.store.mapped.DatastoreIdentifier listTableAlias,
java.lang.Class filteredElementType,
org.jpox.store.mapped.expression.ScalarExpression elmExpr,
org.jpox.store.mapped.DatastoreIdentifier elementTableAlias)
Method used in queries when contains() has been invoked. |
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. |
protected void |
setOwnerMemberMetaData(org.jpox.metadata.AbstractMemberMetaData mmd)
Method to set the owner field/property MetaData and sets whether null elements/values are allowed. |
| Methods inherited from class org.jpox.store.rdbms.scostore.AbstractArrayStore |
|---|
add, clear, getArray, getExistsSubquery, getSizeSubquery, internalAdd, iterator, set |
| 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.ArrayStore |
|---|
getElementType, size |
| Methods inherited from interface org.jpox.store.scostore.Store |
|---|
getStoreManager |
| Field Detail |
|---|
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 JoinArrayStore(ArrayTable joinTable,
org.jpox.ClassLoaderResolver clr)
joinTable - Join table storing the relationship between owner and elementclr - ClassLoader resolver| Method Detail |
|---|
protected org.jpox.store.mapped.expression.QueryExpression getIteratorStatement(org.jpox.StateManager ownerSM)
getIteratorStatement in class AbstractArrayStoreownerSM - The StateManager
public org.jpox.store.mapped.expression.ScalarExpression joinElementsTo(org.jpox.store.mapped.expression.QueryExpression stmt,
org.jpox.store.mapped.expression.QueryExpression parentStmt,
org.jpox.store.mapped.mapping.JavaTypeMapping ownerMapping,
org.jpox.store.mapped.expression.LogicSetExpression ownerTe,
org.jpox.store.mapped.DatastoreIdentifier listTableAlias,
java.lang.Class filteredElementType,
org.jpox.store.mapped.expression.ScalarExpression elmExpr,
org.jpox.store.mapped.DatastoreIdentifier elementTableAlias)
stmt - The Query StatementparentStmt - the parent Query Statement. If there is no parent, parentStmt must be equals to stmtownerMapping - the mapping for the owner.ownerTe - Table Expression for the ownerlistTableAlias - Alias for the "List" 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.
protected void setOwnerMemberMetaData(org.jpox.metadata.AbstractMemberMetaData mmd)
mmd - MetaData for the field/property owning this backing store.public org.jpox.store.StoreManager getStoreManager()
public org.jpox.store.mapped.mapping.JavaTypeMapping getOwnerMapping()
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 | |||||||||