/** * Convenience method. */ private ContainerPolicy getContainerPolicy() { return this.getMapping().getContainerPolicy(); }
/** * Convenience method. */ private ContainerPolicy getContainerPolicy() { return this.getMapping().getContainerPolicy(); }
/** * INTERNAL: * Return whether the element's user-defined Map key has changed * since it was cloned from the original version. * Object elements can change their keys without detection. * Get the original object and compare keys. */ public boolean mapKeyHasChanged(Object element, AbstractSession session) { //CR 4172 compare keys will now get backup if required return !this.getContainerPolicy().compareKeys(element, session); }
/** * INTERNAL: * Return whether the element's user-defined Map key has changed * since it was cloned from the original version. * Object elements can change their keys without detection. * Get the original object and compare keys. */ public boolean mapKeyHasChanged(Object element, AbstractSession session) { //CR 4172 compare keys will now get backup if required return !this.getContainerPolicy().compareKeys(element, session); }
/** * Convenience method. */ private ContainerPolicy getContainerPolicy() { return this.getMapping().getContainerPolicy(); }
/** * INTERNAL: * Return whether the element's user-defined Map key has changed * since it was cloned from the original version. * Object elements can change their keys without detection. * Get the original object and compare keys. */ public boolean mapKeyHasChanged(Object element, AbstractSession session) { //CR 4172 compare keys will now get backup if required return !this.getContainerPolicy().compareKeys(element, session); }
/** * INTERNAL: * Used to verify whether the specified object is deleted or not. */ public boolean verifyDelete(Object object, AbstractSession session) throws DatabaseException { if (this.isPrivateOwned()) { Object objects = this.getRealCollectionAttributeValueFromObject(object, session); ContainerPolicy containerPolicy = getContainerPolicy(); for (Object iter = containerPolicy.iteratorFor(objects); containerPolicy.hasNext(iter);) { if (!session.verifyDelete(containerPolicy.next(iter, session))) { return false; } } } return true; }
/** * This method will make sure that all the records privately owned by this mapping are * actually removed. If such records are found then those are all read and removed one * by one along with their privately owned parts. */ protected void deleteReferenceObjectsLeftOnDatabase(DeleteObjectQuery query) throws DatabaseException, OptimisticLockException { Object objects = this.readPrivateOwnedForObject(query); // delete all these objects one by one ContainerPolicy cp = this.getContainerPolicy(); for (Object iter = cp.iteratorFor(objects); cp.hasNext(iter);) { query.getSession().deleteObject(cp.next(iter, query.getSession())); } }
/** * INTERNAL: * Used to verify whether the specified object is deleted or not. */ @Override public boolean verifyDelete(Object object, AbstractSession session) throws DatabaseException { if (this.isPrivateOwned()) { Object objects = this.getRealCollectionAttributeValueFromObject(object, session); ContainerPolicy containerPolicy = getContainerPolicy(); for (Object iter = containerPolicy.iteratorFor(objects); containerPolicy.hasNext(iter);) { if (!session.verifyDelete(containerPolicy.next(iter, session))) { return false; } } } return true; }
/** * INTERNAL: * Used to verify whether the specified object is deleted or not. */ @Override public boolean verifyDelete(Object object, AbstractSession session) throws DatabaseException { if (this.isPrivateOwned()) { Object objects = this.getRealCollectionAttributeValueFromObject(object, session); ContainerPolicy containerPolicy = getContainerPolicy(); for (Object iter = containerPolicy.iteratorFor(objects); containerPolicy.hasNext(iter);) { if (!session.verifyDelete(containerPolicy.next(iter, session))) { return false; } } } return true; }
/** * This method will make sure that all the records privately owned by this mapping are * actually removed. If such records are found then those are all read and removed one * by one along with their privately owned parts. */ protected void deleteReferenceObjectsLeftOnDatabase(DeleteObjectQuery query) throws DatabaseException, OptimisticLockException { Object objects = this.readPrivateOwnedForObject(query); // delete all these objects one by one ContainerPolicy cp = this.getContainerPolicy(); for (Object iter = cp.iteratorFor(objects); cp.hasNext(iter);) { query.getSession().deleteObject(cp.next(iter, query.getSession())); } }
/** * This method will make sure that all the records privately owned by this mapping are * actually removed. If such records are found then those are all read and removed one * by one along with their privately owned parts. */ protected void deleteReferenceObjectsLeftOnDatabase(DeleteObjectQuery query) throws DatabaseException, OptimisticLockException { Object objects = this.readPrivateOwnedForObject(query); // delete all these objects one by one ContainerPolicy cp = this.getContainerPolicy(); for (Object iter = cp.iteratorFor(objects); cp.hasNext(iter);) { query.getSession().deleteObject(cp.next(iter, query.getSession())); } }
/** * Delete all the reference objects. */ protected void deleteAll(DeleteObjectQuery query, Object referenceObjects) throws DatabaseException { ((DeleteAllQuery)this.getDeleteAllQuery()).executeDeleteAll(query.getSession().getSessionForClass(this.getReferenceClass()), query.getTranslationRow(), this.getContainerPolicy().vectorFor(referenceObjects, query.getSession())); }
/** * Delete all the reference objects. */ protected void deleteAll(DeleteObjectQuery query, Object referenceObjects) throws DatabaseException { ((DeleteAllQuery)this.getDeleteAllQuery()).executeDeleteAll(query.getSession().getSessionForClass(this.getReferenceClass()), query.getTranslationRow(), this.getContainerPolicy().vectorFor(referenceObjects, query.getSession())); }
/** * Delete all the reference objects. */ protected void deleteAll(DeleteObjectQuery query, Object referenceObjects) throws DatabaseException { ((DeleteAllQuery)this.getDeleteAllQuery()).executeDeleteAll(query.getSession().getSessionForClass(this.getReferenceClass()), query.getTranslationRow(), this.getContainerPolicy().vectorFor(referenceObjects, query.getSession())); }
ContainerPolicy cp = this.getContainerPolicy();
this.deleteAll(query, referenceObjects); } else { ContainerPolicy cp = this.getContainerPolicy(); for (Object iter = cp.iteratorFor(referenceObjects); cp.hasNext(iter);) { DeleteObjectQuery deleteQuery = new DeleteObjectQuery();
this.deleteAll(query, referenceObjects); } else { ContainerPolicy cp = this.getContainerPolicy(); for (Object iter = cp.iteratorFor(referenceObjects); cp.hasNext(iter);) { DeleteObjectQuery deleteQuery = new DeleteObjectQuery();
this.deleteAll(query, referenceObjects); } else { ContainerPolicy cp = this.getContainerPolicy(); for (Object iter = cp.iteratorFor(referenceObjects); cp.hasNext(iter);) { DeleteObjectQuery deleteQuery = new DeleteObjectQuery();
ContainerPolicy cp = this.getContainerPolicy();