Package org.javers.core.commit
Class Commit
java.lang.Object
org.javers.core.commit.Commit
JaVers commit is a similar concept to GIT commit.
It records snapshots of changed domain objects.
One commit can affect one or more domain objects.
Commit holds following data:
One commit can affect one or more domain objects.
Commit holds following data:
- who did change the data -
CommitMetadata.getAuthor() - when the change was made -
CommitMetadata.getCommitDate() - list of atomic changes between two domain object graphs -
getChanges() - list of Snapshots of affected objects -
getSnapshots()
-
Method Details
-
getId
Monotonically increasing id, e.g. 1.0, 2.0, ... -
getAuthor
-
getProperties
-
getCommitDate
Commit creation timestamp in local time zone -
getCommitDateInstant
Commit creation timestamp in UTC.
Since 5.1, commitDateInstant is persisted in JaversRepository to provide reliable chronological ordering, especially whenCommitIdGenerator.RANDOMis used.
Commits persisted by JaVers older then 5.1 have commitDateInstant guessed from commitDate and currentTimeZone- Since:
- 5.1
-
getSnapshots
- Returns:
- unmodifiableList
-
getChanges
- Returns:
- unmodifiableList
-
toString
-
equals
-
hashCode
public int hashCode()
-