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 TypeMethodDescriptionvoid
addChangeRecord
(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.boolean
Whether this change set contains any changes.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
true
if there are any changes in this change set,false
otherwise
-
getOriginal
Description copied from interface:Change
Gets the original object.- Specified by:
getOriginal
in interfaceChange
- Returns:
- Original
-
getClone
Description copied from interface:Change
Gets the clone with changes. -
getDescriptor
Description copied from interface:Change
Gets descriptor of the changed object.- Specified by:
getDescriptor
in interfaceChange
- Returns:
- Instance descriptor
-