Package org.javers.core.metamodel.object
Class CdoSnapshot
java.lang.Object
org.javers.core.graph.Cdo
org.javers.core.metamodel.object.CdoSnapshot
Historical state of a domain object captured as the property->value Map.
Values and primitives are stored 'by value'.
Referenced Entities and ValueObjects are stored 'by reference' using
GlobalId-
Method Summary
Modifier and TypeMethodDescriptionList of propertyNames changed with this snapshot (comparing to latest from repository).getPropertyValue(String propertyName) getPropertyValue(Property property) returns default values for null primitivesgetState()getType()longObject version number.
Initial snapshot of given object has version 1, next has version 2.booleanhasChangeAt(String propertyName) booleanbooleanbooleanbooleanbooleanbooleanbooleanisUpdate()booleanintsize()booleanOriginal state enriched with default primitive values (likeboolean false).toString()Methods inherited from class org.javers.core.graph.Cdo
equals, getManagedType, hashCode
-
Method Details
-
getWrappedCdo
- Specified by:
getWrappedCdoin classCdo- Returns:
Optional.EMPTY
-
getGlobalId
- Specified by:
getGlobalIdin classCdo
-
size
public int size() -
getPropertyValue
- Specified by:
getPropertyValuein classCdo
-
getPropertyValue
returns default values for null primitives- Specified by:
getPropertyValuein classCdo
-
getChanged
List of propertyNames changed with this snapshot (comparing to latest from repository).
For initial snapshot, returns all properties. -
hasChangeAt
-
isFirstVersion
public boolean isFirstVersion() -
isNull
-
getCommitId
-
getCommitMetadata
-
stateEquals
-
getState
-
isInitial
public boolean isInitial() -
isInstance
public boolean isInstance() -
isTerminal
public boolean isTerminal() -
isUpdate
public boolean isUpdate() -
getType
-
getVersion
public long getVersion()Object version number.
Initial snapshot of given object has version 1, next has version 2.
Warning! Version field was added in JaVers v. 1.4.4. All snapshots persisted in JaversRepository before this release have version 0.
If it isn't OK for you, run manual DB update. See release-notes for v. 1.4.4- Since:
- 1.4.4
-
toString
-
stateWithAllPrimitives
Original state enriched with default primitive values (likeboolean false). -
isValueObject
public boolean isValueObject() -
isTerminalVO
public boolean isTerminalVO()
-