Class ObjectChangeSet
java.lang.Object
cz.cvut.kbss.jopa.sessions.change.ObjectChangeSet
- All Implemented Interfaces:
Change
-
Constructor Summary
ConstructorsConstructorDescriptionObjectChangeSet(Object changedObject, Object cloneObject, Descriptor descriptor) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChangeRecord(ChangeRecord record) Adds a new change record to this change set.Gets changes held in this change set.getClone()Gets the clone with changes.Gets descriptor of the changed object.Gets the original object.booleanWhether this change set contains any changes.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface cz.cvut.kbss.jopa.sessions.change.Change
getEntityContext, getObjectClass
-
Constructor Details
-
ObjectChangeSet
-
-
Method Details
-
addChangeRecord
Adds a new change record to this change set.If there was a change for attribute represented by the new record, it will be overwritten.
- Parameters:
record- The record to add
-
getChanges
Gets changes held in this change set.- Returns:
- Set of changes
-
hasChanges
public boolean hasChanges()Whether this change set contains any changes.- Returns:
trueif there are any changes in this change set,falseotherwise
-
getOriginal
Description copied from interface:ChangeGets the original object.- Specified by:
getOriginalin interfaceChange- Returns:
- Original
-
getClone
Description copied from interface:ChangeGets the clone with changes. -
getDescriptor
Description copied from interface:ChangeGets descriptor of the changed object.- Specified by:
getDescriptorin interfaceChange- Returns:
- Instance descriptor
-