/** * INTERNAL: * This method must be included in any locking policy. * Put the initial writelock value into the modifyRow. */ public void setupWriteFieldsForInsert(ObjectLevelModifyQuery query) { Object lockValue = getInitialWriteValue(query.getSession()); ObjectChangeSet objectChangeSet = query.getObjectChangeSet(); if (objectChangeSet != null) { objectChangeSet.setInitialWriteLockValue(lockValue); } updateWriteLockValueForWrite(query, lockValue); }
/** * INTERNAL: * This method must be included in any locking policy. * Put the initial writelock value into the modifyRow. */ public void setupWriteFieldsForInsert(ObjectLevelModifyQuery query) { Object lockValue = getInitialWriteValue(query.getSession()); ObjectChangeSet objectChangeSet = query.getObjectChangeSet(); if (objectChangeSet != null) { objectChangeSet.setInitialWriteLockValue(lockValue); } updateWriteLockValueForWrite(query, lockValue); }
/** * INTERNAL: * This method must be included in any locking policy. * Put the initial writelock value into the modifyRow. */ public void setupWriteFieldsForInsert(ObjectLevelModifyQuery query) { Object lockValue = getInitialWriteValue(query.getSession()); ObjectChangeSet objectChangeSet = query.getObjectChangeSet(); if (objectChangeSet != null) { objectChangeSet.setInitialWriteLockValue(lockValue); } updateWriteLockValueForWrite(query, lockValue); }
/** * INTERNAL: * This method updates the modify row, and the domain object * with the new lock value. */ public void updateRowAndObjectForUpdate(ObjectLevelModifyQuery query, Object domainObject) { Object lockValue = getNewLockValue(query); if (isStoredInCache()) { query.getSession().getIdentityMapAccessor().updateWriteLockValue(query.getPrimaryKey(), domainObject.getClass(), lockValue); } updateWriteLockValueForWrite(query, lockValue); }
/** * INTERNAL: * This method updates the modify row, and the domain object * with the new lock value. */ public void updateRowAndObjectForUpdate(ObjectLevelModifyQuery query, Object domainObject) { Object lockValue = getNewLockValue(query); if (isStoredInCache()) { query.getSession().getIdentityMapAccessor().updateWriteLockValue(query.getPrimaryKey(), domainObject.getClass(), lockValue); } updateWriteLockValueForWrite(query, lockValue); }
/** * INTERNAL: * This method updates the modify row, and the domain object * with the new lock value. */ public void updateRowAndObjectForUpdate(ObjectLevelModifyQuery query, Object domainObject) { Object lockValue = getNewLockValue(query); if (isStoredInCache()) { query.getSession().getIdentityMapAccessor().updateWriteLockValue(query.getPrimaryKey(), domainObject.getClass(), lockValue); } updateWriteLockValueForWrite(query, lockValue); }