/** * INTERNAL: * Directly build a change record without comparison */ @Override public ChangeRecord buildChangeRecord(Object clone, ObjectChangeSet owner, AbstractSession session) { return internalBuildChangeRecord(getAttributeValueFromObject(clone), null, owner); }
/** * INTERNAL: * Directly build a change record without comparison */ @Override public ChangeRecord buildChangeRecord(Object clone, ObjectChangeSet owner, AbstractSession session) { return internalBuildChangeRecord(getAttributeValueFromObject(clone), null, owner); }
/** * INTERNAL: * Directly build a change record without comparison */ public ChangeRecord buildChangeRecord(Object clone, ObjectChangeSet owner, AbstractSession session) { return internalBuildChangeRecord(getAttributeValueFromObject(clone), owner); }
/** * INTERNAL: * Compare the clone and backup clone values and return a change record if the value changed. */ @Override public ChangeRecord compareForChange(Object clone, Object backUp, ObjectChangeSet owner, AbstractSession session) { // same code as write from object into row for update if (owner.isNew()) { return internalBuildChangeRecord(getAttributeValueFromObject(clone), null, owner); } else if (!compareObjects(backUp, clone, session)) { Object oldValue = null; if (backUp != null && clone != backUp) { oldValue = getAttributeValueFromObject(backUp); } return internalBuildChangeRecord(getAttributeValueFromObject(clone), oldValue, owner); } return null; }
/** * INTERNAL: * Compare the clone and backup clone values and return a change record if the value changed. */ @Override public ChangeRecord compareForChange(Object clone, Object backUp, ObjectChangeSet owner, AbstractSession session) { // same code as write from object into row for update if (owner.isNew()) { return internalBuildChangeRecord(getAttributeValueFromObject(clone), null, owner); } else if (!compareObjects(backUp, clone, session)) { Object oldValue = null; if (backUp != null && clone != backUp) { oldValue = getAttributeValueFromObject(backUp); } return internalBuildChangeRecord(getAttributeValueFromObject(clone), oldValue, owner); } return null; }
/** * INTERNAL: * Either create a new change record or update with the new value. This is used * by attribute change tracking. */ @Override public void updateChangeRecord(Object clone, Object newValue, Object oldValue, ObjectChangeSet objectChangeSet, UnitOfWorkImpl uow) { DirectToFieldChangeRecord changeRecord = (DirectToFieldChangeRecord)objectChangeSet.getChangesForAttributeNamed(this.getAttributeName()); if (changeRecord == null) { objectChangeSet.addChange(internalBuildChangeRecord(newValue, oldValue, objectChangeSet)); } else { changeRecord.setNewValue(newValue); } }
/** * INTERNAL: * Either create a new change record or update with the new value. This is used * by attribute change tracking. */ public void updateChangeRecord(Object clone, Object newValue, Object oldValue, ObjectChangeSet objectChangeSet, UnitOfWorkImpl uow) { DirectToFieldChangeRecord changeRecord = (DirectToFieldChangeRecord)objectChangeSet.getChangesForAttributeNamed(this.getAttributeName()); if (changeRecord == null) { objectChangeSet.addChange(internalBuildChangeRecord(newValue, objectChangeSet)); } else { changeRecord.setNewValue(newValue); } }
/** * INTERNAL: * Either create a new change record or update with the new value. This is used * by attribute change tracking. */ @Override public void updateChangeRecord(Object clone, Object newValue, Object oldValue, ObjectChangeSet objectChangeSet, UnitOfWorkImpl uow) { DirectToFieldChangeRecord changeRecord = (DirectToFieldChangeRecord)objectChangeSet.getChangesForAttributeNamed(this.getAttributeName()); if (changeRecord == null) { objectChangeSet.addChange(internalBuildChangeRecord(newValue, oldValue, objectChangeSet)); } else { changeRecord.setNewValue(newValue); } }
changeRecord = (DirectToFieldChangeRecord)((AbstractDirectMapping)mapping).internalBuildChangeRecord(attributeValue, oldAttributeValue, changeSet); changeSet.addChange(changeRecord); } else {
changeRecord = (DirectToFieldChangeRecord)((AbstractDirectMapping)mapping).internalBuildChangeRecord(attributeValue, oldAttributeValue, changeSet); changeSet.addChange(changeRecord); } else {