org.datanucleus.store.mapped.scostore
Class JoinArrayStore

java.lang.Object
  extended by org.datanucleus.store.mapped.scostore.BaseContainerStore
      extended by org.datanucleus.store.mapped.scostore.ElementContainerStore
          extended by org.datanucleus.store.mapped.scostore.AbstractArrayStore
              extended by org.datanucleus.store.mapped.scostore.JoinArrayStore
All Implemented Interfaces:
ArrayStoreQueryable, ArrayStore, Store

public abstract class JoinArrayStore
extends AbstractArrayStore

Backing store for an array stored using a join table. Can be used for all types of arrays :- PC arrays, non-PC arrays, reference arrays.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.datanucleus.store.mapped.scostore.ElementContainerStore
ElementContainerStore.ElementInfo
 
Field Summary
 
Fields inherited from class org.datanucleus.store.mapped.scostore.ElementContainerStore
clr, containerTable, elementInfo, elementIsPersistentInterface, elementMapping, elementsAreEmbedded, elementsAreSerialised, elementType, emd, iterateUsingDiscriminator, orderMapping, relationDiscriminatorMapping, relationDiscriminatorValue, specialization
 
Fields inherited from class org.datanucleus.store.mapped.scostore.BaseContainerStore
allowsNull, dba, LOCALISER, ownerMapping, ownerMemberMetaData, relationType, storeMgr
 
Constructor Summary
JoinArrayStore(DatastoreContainerObject joinTable, AbstractMemberMetaData ownerFieldMetaData, JavaTypeMapping ownerMapping, JavaTypeMapping elementMapping, JavaTypeMapping orderMapping, JavaTypeMapping relationDiscriminatorMapping, java.lang.String relationDiscriminatorValue, java.lang.String elementType, boolean elementsAreEmbedded, boolean elementsAreSerialised, ClassLoaderResolver clr, JoinArrayStoreSpecialization specialization)
          Constructor.
 
Method Summary
 ScalarExpression joinElementsTo(QueryExpression stmt, QueryExpression parentStmt, JavaTypeMapping ownerMapping, LogicSetExpression ownerTe, DatastoreIdentifier listTableAlias, java.lang.Class filteredElementType, ScalarExpression elmExpr, DatastoreIdentifier elementTableAlias)
          Method used in queries when contains() has been invoked.
 
Methods inherited from class org.datanucleus.store.mapped.scostore.AbstractArrayStore
add, clear, getArray, getExistsSubquery, getSizeSubquery, iterator, set
 
Methods inherited from class org.datanucleus.store.mapped.scostore.ElementContainerStore
getContainerTable, getElementInfo, getElementInformationForClass, getElementMapping, getElementType, getEmd, getOrderMapping, getRelationDiscriminatorMapping, getRelationDiscriminatorValue, hasOrderMapping, isElementsAreEmbedded, isElementsAreSerialised, size, validateElementForReading, validateElementForWriting, validateElementType
 
Methods inherited from class org.datanucleus.store.mapped.scostore.BaseContainerStore
allowsBatching, getDatastoreAdapter, getOwnerMapping, getOwnerMemberMetaData, getRelationType, getStateManagerForEmbeddedPCObject, getStoreManager, isEmbeddedMapping, setOwner
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.datanucleus.store.scostore.ArrayStore
getElementType, size
 
Methods inherited from interface org.datanucleus.store.scostore.Store
getStoreManager
 

Constructor Detail

JoinArrayStore

public JoinArrayStore(DatastoreContainerObject joinTable,
                      AbstractMemberMetaData ownerFieldMetaData,
                      JavaTypeMapping ownerMapping,
                      JavaTypeMapping elementMapping,
                      JavaTypeMapping orderMapping,
                      JavaTypeMapping relationDiscriminatorMapping,
                      java.lang.String relationDiscriminatorValue,
                      java.lang.String elementType,
                      boolean elementsAreEmbedded,
                      boolean elementsAreSerialised,
                      ClassLoaderResolver clr,
                      JoinArrayStoreSpecialization specialization)
Constructor.

Parameters:
joinTable - Join table storing the relationship between owner and element
clr - ClassLoader resolver
Method Detail

joinElementsTo

public ScalarExpression joinElementsTo(QueryExpression stmt,
                                       QueryExpression parentStmt,
                                       JavaTypeMapping ownerMapping,
                                       LogicSetExpression ownerTe,
                                       DatastoreIdentifier listTableAlias,
                                       java.lang.Class filteredElementType,
                                       ScalarExpression elmExpr,
                                       DatastoreIdentifier elementTableAlias)
Method used in queries when contains() has been invoked.

Parameters:
stmt - The Query Statement
parentStmt - 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 owner
listTableAlias - Alias for the "List" table.
filteredElementType - The Class Type for the filtered element
elmExpr - The Expression for the element
elementTableAlias - The SQL alias to assign to the expression or to the element table.
Returns:
expression to the join


Copyright © 2010. All Rights Reserved.