public class FKSetStore<E> extends AbstractSetStore<E>
SetStore using foreign keys.ElementContainerStore.ElementInfocontainsStmtaddStmt, clearStmt, containerTable, elementInfo, elementIsPersistentInterface, elementMapping, elementsAreEmbedded, elementsAreSerialised, elementType, emd, iterateUsingDiscriminator, orderMapping, relationDiscriminatorMapping, relationDiscriminatorValue, removeStmt, sizeStmtallowNulls, clr, dba, ownerMapping, ownerMemberMetaData, relationType, storeMgr| Constructor and Description |
|---|
FKSetStore(org.datanucleus.metadata.AbstractMemberMetaData mmd,
RDBMSStoreManager storeMgr,
org.datanucleus.ClassLoaderResolver clr)
Constructor for the backing store of a FK set for RDBMS.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(org.datanucleus.state.ObjectProvider op,
E element,
int size)
Method to add an object to the relationship at the collection end.
|
boolean |
addAll(org.datanucleus.state.ObjectProvider op,
Collection<E> elements,
int size)
Method to add a collection of object to the relationship at the collection end.
|
protected boolean |
checkRemovalOfElementShouldDelete(org.datanucleus.state.ObjectProvider op)
Convenience method to return if the removal of an element should delete the element.
|
void |
clear(org.datanucleus.state.ObjectProvider op)
Method to allow the Set relationship to be cleared out.
|
protected String |
getClearNullifyStmt(ElementContainerStore.ElementInfo info)
Generates the statement for clearing items by nulling the owner link out.
|
protected int |
getFieldNumberInElementForBidirectional(org.datanucleus.state.ObjectProvider op)
This seems to return the field number in the element of the relation when it is a bidirectional relation.
|
IteratorStatement |
getIteratorStatement(org.datanucleus.ClassLoaderResolver clr,
org.datanucleus.FetchPlan fp,
boolean addRestrictionOnOwner)
Method to return the SQLStatement and mapping for an iterator for this backing store.
|
Iterator<E> |
iterator(org.datanucleus.state.ObjectProvider op)
Accessor for an iterator for the set.
|
protected void |
manageRemovalOfElement(org.datanucleus.state.ObjectProvider op,
Object element)
Convenience method to manage the removal of an element from the collection, performing
any necessary "managed relationship" updates when the field is bidirectional.
|
boolean |
remove(org.datanucleus.state.ObjectProvider op,
Object element,
int size,
boolean allowDependentField)
Method to remove the link to the collection object specified.
|
boolean |
removeAll(org.datanucleus.state.ObjectProvider op,
Collection elements,
int size)
Method to remove the links to a collection of elements specified.
|
void |
update(org.datanucleus.state.ObjectProvider op,
Collection coll)
Method to update the collection to be the supplied collection of elements.
|
contains, getRemoveStmt, getUpdateEmbeddedElementStmt, updateEmbeddedElement, updateEmbeddedElementgetAddStmtForJoinTable, getClearStmt, getContainerTable, getElementInfoForElement, getElementInformationForClass, getElementMapping, getEmd, getRelationDiscriminatorMapping, getRelationDiscriminatorValue, getSize, getSizeStmt, hasOrderMapping, invalidateAddStmt, isElementsAreEmbedded, isElementsAreSerialised, size, usingJoinTable, validateElementForReading, validateElementForWriting, validateElementTypeallowsBatching, getDatastoreAdapter, getObjectProviderForEmbeddedPCObject, getOwnerMapping, getOwnerMemberMetaData, getRelationType, getStoreManager, isEmbeddedMapping, setOwnerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic FKSetStore(org.datanucleus.metadata.AbstractMemberMetaData mmd,
RDBMSStoreManager storeMgr,
org.datanucleus.ClassLoaderResolver clr)
mmd - The MetaData for the field that this representsstoreMgr - The StoreManager managing the associated datastore.clr - The ClassLoaderResolverprotected int getFieldNumberInElementForBidirectional(org.datanucleus.state.ObjectProvider op)
op - ObjectProvider for the owner.public void update(org.datanucleus.state.ObjectProvider op,
Collection coll)
update in interface org.datanucleus.store.scostore.CollectionStore<E>update in class AbstractCollectionStore<E>op - ObjectProvider for the owner.coll - The collection to usepublic boolean add(org.datanucleus.state.ObjectProvider op,
E element,
int size)
op - ObjectProvider for the owner.element - Element to be addedpublic boolean addAll(org.datanucleus.state.ObjectProvider op,
Collection<E> elements,
int size)
op - ObjectProvider for the owner.elements - Elements to be addedpublic boolean remove(org.datanucleus.state.ObjectProvider op,
Object element,
int size,
boolean allowDependentField)
remove in interface org.datanucleus.store.scostore.CollectionStore<E>remove in class AbstractSetStore<E>op - ObjectProvider for the owner.element - The element of the collection to be deleted.allowDependentField - Whether to allow any cascade deletes caused by this removalsize - Current sizepublic boolean removeAll(org.datanucleus.state.ObjectProvider op,
Collection elements,
int size)
removeAll in interface org.datanucleus.store.scostore.CollectionStore<E>removeAll in class AbstractSetStore<E>op - ObjectProvider for the owner.elements - The elements of the collection to be deleted.protected boolean checkRemovalOfElementShouldDelete(org.datanucleus.state.ObjectProvider op)
op - ObjectProvider for the owner.protected void manageRemovalOfElement(org.datanucleus.state.ObjectProvider op,
Object element)
op - ObjectProvider for the owner.element - The elementpublic void clear(org.datanucleus.state.ObjectProvider op)
clear in interface org.datanucleus.store.scostore.CollectionStore<E>clear in class ElementContainerStoreop - ObjectProvider for the owner.protected String getClearNullifyStmt(ElementContainerStore.ElementInfo info)
UPDATE LISTTABLE SET OWNERCOL=NULL [,DISTINGUISHER=NULL] WHERE OWNERCOL=?
info - ElementInfo for the elementpublic Iterator<E> iterator(org.datanucleus.state.ObjectProvider op)
iterator in interface org.datanucleus.store.scostore.CollectionStore<E>iterator in class AbstractSetStore<E>op - ObjectProvider for the owner.public IteratorStatement getIteratorStatement(org.datanucleus.ClassLoaderResolver clr, org.datanucleus.FetchPlan fp, boolean addRestrictionOnOwner)
clr - ClassLoader resolverfp - FetchPlan to use in determing which fields of element to selectaddRestrictionOnOwner - Whether to restrict to a particular owner (otherwise functions as bulk fetch for many owners).Copyright © 2017. All rights reserved.