Class 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
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected QualifiedAgent agent
      The agent releasing this revision.
      protected String comment
      The comment for this revision.
      protected long revision
      The revision count of this revision.
      protected long timestamp
      The timestamp of this revision.
    • 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.
    • 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.