Class JoinArrayStore<E>

  • All Implemented Interfaces:
    org.datanucleus.store.types.scostore.ArrayStore<E>, org.datanucleus.store.types.scostore.Store

    public class JoinArrayStore<E>
    extends AbstractArrayStore<E>
    RDBMS-specific implementation of a Join ArrayStore
    • Constructor Detail

      • JoinArrayStore

        public JoinArrayStore​(org.datanucleus.metadata.AbstractMemberMetaData mmd,
                              ArrayTable arrayTable,
                              org.datanucleus.ClassLoaderResolver clr)
        Constructor for an RDBMS implementation of a join array store.
        Parameters:
        mmd - Metadata for the owning field/property
        arrayTable - The Join table
        clr - ClassLoader resolver
    • Method Detail

      • iterator

        public Iterator<E> iterator​(org.datanucleus.state.ObjectProvider ownerOP)
        Method to return an iterator to the array.
        Specified by:
        iterator in interface org.datanucleus.store.types.scostore.ArrayStore<E>
        Specified by:
        iterator in class AbstractArrayStore<E>
        Parameters:
        ownerOP - ObjectProvider for the owner of the array
        Returns:
        The Iterator
      • getIteratorStatement

        public ElementIteratorStatement getIteratorStatement​(org.datanucleus.ExecutionContext ec,
                                                             org.datanucleus.FetchPlan fp,
                                                             boolean addRestrictionOnOwner)
        Method to return the SQLStatement and mapping for an iterator for this backing store. Create a statement of the form
         SELECT ELEM_COLS
         FROM JOIN_TBL
           [JOIN ELEM_TBL ON ELEM_TBL.ID = JOIN_TBL.ELEM_ID]
         [WHERE]
           [JOIN_TBL.OWNER_ID = {value}] [AND]
           [JOIN_TBL.DISCRIM = {discrimValue}]
         [ORDER BY {orderClause}]
         
        Parameters:
        ec - ExecutionContext
        fp - FetchPlan to use in determing which fields of element to select
        addRestrictionOnOwner - Whether to restrict to a particular owner (otherwise functions as bulk fetch for many owners).
        Returns:
        The SQLStatement and its associated StatementClassMapping