Class VersionedObject<T>

  • Type Parameters:
    T - type of the object that's contained
    All Implemented Interfaces:
    Versioned
    Direct Known Subclasses:
    VersionedObjectWithHistory

    public class VersionedObject<T>
    extends java.lang.Object
    implements Versioned
    Simple container to hold a specific object and a correlating version for it.
    Author:
    Johannes Rabauer
    • Constructor Detail

      • VersionedObject

        public VersionedObject​(T actualObject)
        Parameters:
        actualObject - set the actual object which is versioned
    • Method Detail

      • setVersion

        public void setVersion​(MigrationVersion version)
        Specified by:
        setVersion in interface Versioned
        Parameters:
        version - to set the current version of the object
      • setObject

        public void setObject​(T actualObject)
        Parameters:
        actualObject - which is versioned
      • getObject

        public T getObject()
        Returns:
        the actual object which is versioned
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object