/** * INTERNAL: * Return whether data for a map key must be included on a Delete datamodification event * If the keyMapping is privateOwned, that data should be. */ @Override public boolean shouldIncludeKeyInDeleteEvent() { return ((DatabaseMapping)keyMapping).isPrivateOwned(); }
/** * INTERNAL: * Returns true if the mapping should be added to the UnitOfWork's list of private owned * objects for private owned orphan removal. */ public boolean isCandidateForPrivateOwnedRemoval() { return isPrivateOwned(); }
/** * INTERNAL: * Return if the mapping has any ownership or other dependency over its target object(s). */ public boolean hasDependency() { return isPrivateOwned(); }
/** * INTERNAL: * Returns true if the mapping should be added to the UnitOfWork's list of private owned * objects for private owned orphan removal. */ public boolean isCandidateForPrivateOwnedRemoval() { return isPrivateOwned(); }
/** * INTERNAL: * Returns true if the mapping should be added to the UnitOfWork's list of private owned * objects for private owned orphan removal. */ public boolean isCandidateForPrivateOwnedRemoval() { return isPrivateOwned(); }
/** * INTERNAL: * Return whether data for a map key must be included on a Delete datamodification event * If the keyMapping is privateOwned, that data should be. */ @Override public boolean shouldIncludeKeyInDeleteEvent() { return ((DatabaseMapping)keyMapping).isPrivateOwned(); }
/** * INTERNAL: * Return whether data for a map key must be included on a Delete datamodification event * If the keyMapping is privateOwned, that data should be * * @return */ public boolean shouldIncludeKeyInDeleteEvent(){ return ((DatabaseMapping)keyMapping).isPrivateOwned(); }
/** * INTERNAL: * Checks if the class has any private owned parts are not */ public boolean hasPrivatelyOwnedParts() { for (Enumeration mappings = getMappings().elements(); mappings.hasMoreElements();) { DatabaseMapping mapping = (DatabaseMapping)mappings.nextElement(); if (mapping.isPrivateOwned()) { return true; } } return false; }
/** * INTERNAL: * Checks if the class has any private owned parts are not */ public boolean hasPrivatelyOwnedParts() { for (Enumeration mappings = getMappings().elements(); mappings.hasMoreElements();) { DatabaseMapping mapping = (DatabaseMapping)mappings.nextElement(); if (mapping.isPrivateOwned()) { return true; } } return false; }
/** * INTERNAL: * Checks if the class has any private owned parts are not */ public boolean hasPrivatelyOwnedParts() { for (Enumeration mappings = getMappings().elements(); mappings.hasMoreElements();) { DatabaseMapping mapping = (DatabaseMapping)mappings.nextElement(); if (mapping.isPrivateOwned()) { return true; } } return false; }
/** * INTERNAL: * This method is used to iterate over the specified object's mappings and cascade * remove orphaned private owned objects from the UnitOfWorkChangeSet and IdentityMap. */ public void cascadePerformRemovePrivateOwnedObjectFromChangeSet(Object object, UnitOfWorkImpl uow, Map visitedObjects) { if (object != null && !this.isSimple) { for (DatabaseMapping mapping : this.relationshipMappings) { // only cascade into private owned mappings if (mapping.isPrivateOwned()) { mapping.cascadePerformRemovePrivateOwnedObjectFromChangeSetIfRequired(object, uow, visitedObjects); } } } }
/** * INTERNAL: * This method is used to iterate over the specified object's mappings and cascade * remove orphaned private owned objects from the UnitOfWorkChangeSet and IdentityMap. */ public void cascadePerformRemovePrivateOwnedObjectFromChangeSet(Object object, UnitOfWorkImpl uow, Map visitedObjects) { if (object != null && !this.isSimple) { for (DatabaseMapping mapping : this.relationshipMappings) { // only cascade into private owned mappings if (mapping.isPrivateOwned()) { mapping.cascadePerformRemovePrivateOwnedObjectFromChangeSetIfRequired(object, uow, visitedObjects); } } } }
/** * INTERNAL: * Delete the key and value of the passed association passed object. */ @Override public void deleteWrappedObject(Object objectDeleted, AbstractSession session) { if (((DatabaseMapping)keyMapping).isPrivateOwned()){ keyMapping.deleteMapKey(((Map.Entry)objectDeleted).getKey(), session); } session.deleteObject(unwrapIteratorResult(objectDeleted)); }
/** * INTERNAL: * Delete the key and value of the passed association passed object. */ @Override public void deleteWrappedObject(Object objectDeleted, AbstractSession session) { if (((DatabaseMapping)keyMapping).isPrivateOwned()){ keyMapping.deleteMapKey(((Map.Entry)objectDeleted).getKey(), session); } session.deleteObject(unwrapIteratorResult(objectDeleted)); }
/** * INTERNAL: * Delete the key and value of the passed association passed object * * @param objectDeleted * @param session */ public void deleteWrappedObject(Object objectDeleted, AbstractSession session){ if (((DatabaseMapping)keyMapping).isPrivateOwned()){ keyMapping.deleteMapKey(((Map.Entry)objectDeleted).getKey(), session); } session.deleteObject(unwrapIteratorResult(objectDeleted)); }
/** * INTERNAL: * Add the key and value from provided association to the deleted objects list on the commit manager. */ @Override public void recordPrivateOwnedRemovals(Object object,ClassDescriptor referenceDescriptor, UnitOfWorkImpl uow){ if (((DatabaseMapping)keyMapping).isPrivateOwned()){ Object key = ((Map.Entry)object).getKey(); ((DatabaseMapping)keyMapping).getReferenceDescriptor().getObjectBuilder().recordPrivateOwnedRemovals(key, uow, false); } super.recordPrivateOwnedRemovals(((Map.Entry)object).getValue(), referenceDescriptor, uow); }
/** * INTERNAL: * Add the key and value from provided association to the deleted objects list on the commit manager. */ @Override public void recordPrivateOwnedRemovals(Object object,ClassDescriptor referenceDescriptor, UnitOfWorkImpl uow){ if (((DatabaseMapping)keyMapping).isPrivateOwned()){ Object key = ((Map.Entry)object).getKey(); ((DatabaseMapping)keyMapping).getReferenceDescriptor().getObjectBuilder().recordPrivateOwnedRemovals(key, uow, false); } super.recordPrivateOwnedRemovals(((Map.Entry)object).getValue(), referenceDescriptor, uow); }
/** * INTERNAL: * Add the provided object to the deleted objects list on the commit manager. * This may be overridden by subclasses to process a composite object. */ @Override public void postCalculateChanges(Object key, Object value, ClassDescriptor referenceDescriptor, DatabaseMapping mapping, UnitOfWorkImpl uow) { if (((DatabaseMapping)getKeyMapping()).isForeignReferenceMapping() && ((DatabaseMapping)getKeyMapping()).isPrivateOwned()) { uow.addDeletedPrivateOwnedObjects((DatabaseMapping)getKeyMapping(), key); } super.postCalculateChanges(key, value, referenceDescriptor, mapping, uow); }
/** * INTERNAL: * Add the provided object to the deleted objects list on the commit manager. * This may be overridden by subclasses to process a composite object. */ @Override public void postCalculateChanges(Object key, Object value, ClassDescriptor referenceDescriptor, DatabaseMapping mapping, UnitOfWorkImpl uow) { if (((DatabaseMapping)getKeyMapping()).isForeignReferenceMapping() && ((DatabaseMapping)getKeyMapping()).isPrivateOwned()) { uow.addDeletedPrivateOwnedObjects((DatabaseMapping)getKeyMapping(), key); } super.postCalculateChanges(key, value, referenceDescriptor, mapping, uow); }
/** * INTERNAL: * Add the provided object to the deleted objects list on the commit manager. * This may be overridden by subclasses to process a composite object. */ @Override public void postCalculateChanges(ObjectChangeSet ocs, ClassDescriptor referenceDescriptor, DatabaseMapping mapping, UnitOfWorkImpl uow) { if (((DatabaseMapping)getKeyMapping()).isForeignReferenceMapping() && ((DatabaseMapping)getKeyMapping()).isPrivateOwned()) { Object key = ocs.getOldKey(); uow.addDeletedPrivateOwnedObjects((DatabaseMapping)getKeyMapping(), key); } super.postCalculateChanges(ocs, referenceDescriptor, mapping, uow); }