Class Revision
- java.lang.Object
-
- de.aristaflow.adept2.model.common.Revision
-
- All Implemented Interfaces:
Serializable
public class Revision extends Object implements Serializable
Entities are tracked by revisions, whereas each revision is identified by a system-wide unique count. Additionally, a revision has a timestamp from the time the corresponding revision has been created, the agent creating (releasing) a revision and an arbitrary comment for the revision.- Author:
- Ulrich Kreher
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Revision(long revision, long timestamp, QualifiedAgent agent, String comment)
Creates a new revision object with the designated revision count, the timestamp, the agent and the comment.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description QualifiedAgent
getAgent()
Gets the agent releasing this revision.String
getComment()
Gets the comment for this revision, that is arbitrary text provided by the releasing agent.long
getRevision()
Gets the revision count of this revision. 0 is for the initial revision, that is the corresponding entity is not versioned yet.long
getTimestamp()
Gets the timestamp of this revision, that is the time, this revision has been created. 0 is for the initial revision, that is the corresponding entity is not versioned yet.
-
-
-
Field Detail
-
revision
protected final long revision
The revision count of this revision.
-
timestamp
protected final long timestamp
The timestamp of this revision.
-
agent
protected final QualifiedAgent agent
The agent releasing this revision.
-
comment
protected final String comment
The comment for this revision.
-
-
Constructor Detail
-
Revision
public Revision(long revision, long timestamp, QualifiedAgent agent, String comment)
Creates a new revision object with the designated revision count, the timestamp, the agent and the comment.- Parameters:
revision
- The revision count of this revision.timestamp
- The timestamp of this revision.agent
- The agent releasing this revision.comment
- The comment for this revision.
-
-
Method Detail
-
getRevision
public long getRevision()
Gets the revision count of this revision. 0 is for the initial revision, that is the corresponding entity is not versioned yet.- Returns:
- The revision count of this revision.
-
getTimestamp
public long getTimestamp()
Gets the timestamp of this revision, that is the time, this revision has been created. 0 is for the initial revision, that is the corresponding entity is not versioned yet.- Returns:
- The timestamp of this revision.
-
getAgent
public QualifiedAgent getAgent()
Gets the agent releasing this revision.null
is for the initial revision, that is the corresponding entity is not versioned yet.- Returns:
- The agent releasing this revision.
-
getComment
public String getComment()
Gets the comment for this revision, that is arbitrary text provided by the releasing agent. The empty string is for the initial revision, that is the corresponding entity is not versioned yet.- Returns:
- The comment for this revision.
-
-