|
||||||||||
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 DatastoreAdapter |
dba
Datastore adapter in use by this store. |
protected static Localiser |
LOCALISER
Localiser for messages. |
protected AbstractPropertyMetaData |
ownerFieldMetaData
MetaData for the field in the owner with this container. |
protected JavaTypeMapping |
ownerMapping
Mapping to the owner of the container. |
protected StoreManager |
storeMgr
Manager for the store. |
protected DatastoreIdentifier |
thisIdentifier
Identifier for the container in JDOQL queries. |
Fields inherited from class org.jpox.store.rdbms.scostore.AbstractArrayStore |
---|
addStmt |
Fields inherited from class org.jpox.store.rdbms.scostore.ElementContainerStore |
---|
clearStmt, clr, containerTable, elementInfo, elementMapping, elementsAreEmbedded, elementsAreSerialised, elementType, elmIdentifier, emd, iterateUsingDiscriminator, orderMapping, relationDiscriminatorMapping, relationDiscriminatorValue, sizeStmt |
Constructor Summary | |
---|---|
JoinArrayStore(ArrayTable joinTable,
ClassLoaderResolver clr)
Constructor. |
Method Summary | |
---|---|
protected java.sql.ResultSet |
executeQuery(java.lang.String stmt,
java.sql.PreparedStatement ps)
Method to execute a PreparedStatement query, and return the ResultSet. |
protected int |
executeUpdate(java.lang.String stmt,
java.sql.PreparedStatement ps)
Method to execute a PreparedStatement. |
protected QueryExpression |
getIteratorStatement(StateManager ownerSM)
Accessor for the iterator statement to retrieve the element(s) for the array. |
JavaTypeMapping |
getOwnerMapping()
Accessor for the owner mapping. |
protected StateManager |
getStateManagerForEmbeddedPCObject(StateManager sm,
java.lang.Object obj,
JoinTable table)
Method to return the StateManager for an embedded PC object (element, key, value). |
StoreManager |
getStoreManager()
Accessor for the RDBMSManager. |
protected boolean |
isEmbeddedMapping(JavaTypeMapping mapping)
Check if the mapping correspond to a non pc object or embedded field |
ScalarExpression |
joinElementsTo(QueryExpression stmt,
QueryExpression parentStmt,
JavaTypeMapping ownerMapping,
LogicSetExpression ownerTe,
DatastoreIdentifier listRangeVar,
java.lang.Class filteredElementType,
ScalarExpression elmExpr,
DatastoreIdentifier elementRangeVar)
Method used in queries when contains() has been invoked. |
protected int |
populateOwnerInStatement(StateManager sm,
PersistenceManager pm,
java.sql.PreparedStatement ps,
int jdbcPosition)
Convenience method to populate the passed PreparedStatement with the value from the owner. |
Methods inherited from class org.jpox.store.rdbms.scostore.AbstractArrayStore |
---|
add, clear, getArray, getExistsSubquery, getSizeSubquery, 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 |
---|
getOwnerMapping, getStoreManager |
Field Detail |
---|
protected static final Localiser LOCALISER
protected StoreManager storeMgr
protected DatastoreAdapter dba
protected JavaTypeMapping ownerMapping
protected AbstractPropertyMetaData ownerFieldMetaData
protected final DatastoreIdentifier thisIdentifier
Constructor Detail |
---|
public JoinArrayStore(ArrayTable joinTable, ClassLoaderResolver clr)
joinTable
- Join table storing the relationship between owner and elementclr
- ClassLoader resolverMethod Detail |
---|
protected QueryExpression getIteratorStatement(StateManager ownerSM)
getIteratorStatement
in class AbstractArrayStore
ownerSM
- The StateManager
public ScalarExpression joinElementsTo(QueryExpression stmt, QueryExpression parentStmt, JavaTypeMapping ownerMapping, LogicSetExpression ownerTe, DatastoreIdentifier listRangeVar, java.lang.Class filteredElementType, ScalarExpression elmExpr, DatastoreIdentifier elementRangeVar)
stmt
- The Query StatementparentStmt
- the parent Query Statement. If there is no parent, parentStmt
must be equals to stmt
ownerMapping
- the mapping for the owner.ownerTe
- Table Expression for the ownerlistRangeVar
- The range variable for the "List" table.filteredElementType
- The Class Type for the filtered elementelmExpr
- The Expression for the elementelementRangeVar
- The SQL alias, or "range variable", to assign to the
expression or to the element table.
public StoreManager getStoreManager()
public JavaTypeMapping getOwnerMapping()
protected int executeUpdate(java.lang.String stmt, java.sql.PreparedStatement ps) throws java.sql.SQLException
stmt
- The statement textps
- The Prepared Statement
java.sql.SQLException
- Thrown if an error occursprotected java.sql.ResultSet executeQuery(java.lang.String stmt, java.sql.PreparedStatement ps) throws java.sql.SQLException
stmt
- The statement textps
- The Prepared Statement
java.sql.SQLException
- Thrown if an error occursprotected boolean isEmbeddedMapping(JavaTypeMapping mapping)
mapping
- the mapping
protected int populateOwnerInStatement(StateManager sm, PersistenceManager pm, java.sql.PreparedStatement ps, int jdbcPosition)
sm
- State Managerpm
- Persistence Managerps
- The PreparedStatementjdbcPosition
- Position in JDBC statement to populate
protected StateManager getStateManagerForEmbeddedPCObject(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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |