java.lang.Object
net.datenwerke.rs.incubator.service.versioning.entities.Revision
All Implemented Interfaces:
Serializable, Comparable<Revision>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

public class Revision extends Object implements Comparable<Revision>, Serializable
Hibernate Envers revision entity.

This entity represents a single revision entry persisted by Hibernate Envers and contains contextual information, such as the identifier of the user who triggered the revision.

See Also:
  • Constructor Details

    • Revision

      public Revision()
  • Method Details

    • getId

      public long getId()
    • setId

      public void setId(long id)
    • getRevisionDate

      public Date getRevisionDate()
    • getTimestamp

      public long getTimestamp()
    • setTimestamp

      public void setTimestamp(long timestamp)
    • getUserId

      public long getUserId()
    • setUserId

      public void setUserId(long userId)
    • equals

      public boolean equals(Object o)
      Compares this revision entity with another object.

      Two revision entities are considered equal if both their revision id and timestamp are equal.

      Overrides:
      equals in class Object
      Parameters:
      o - the object to compare with
      Returns:
      true if the objects represent the same revision, false otherwise
    • hashCode

      public int hashCode()
      Returns the hash code for this revision entity.

      The hash code is computed based on the revision id and timestamp.

      Overrides:
      hashCode in class Object
      Returns:
      the hash code value
    • toString

      public String toString()
      Returns a string representation of this revision entity.
      Overrides:
      toString in class Object
      Returns:
      a human-readable string containing the revision id and date
    • compareTo

      public int compareTo(Revision o)
      Specified by:
      compareTo in interface Comparable<Revision>