Module io.ebean.api
Package io.ebean

Class Version<T>


  • public class Version<T>
    extends Object
    Wraps a version of a @History bean.
    • Field Detail

      • bean

        protected T bean
        The version of the bean.
      • start

        protected Timestamp start
        The effective start date time of this version.
      • end

        protected Timestamp end
        The effective end date time of this version.
    • Constructor Detail

      • Version

        public Version​(T bean,
                       Timestamp start,
                       Timestamp end)
        Construct with bean and an effective date time range.
      • Version

        public Version()
        Default constructor - useful for JSON tools such as Jackson.
    • Method Detail

      • getBean

        public T getBean()
        Return the bean instance for this version.
      • setBean

        public void setBean​(T bean)
        Set the bean instance for this version.
      • getStart

        public Timestamp getStart()
        Return the effective start date time of this version.
      • setStart

        public void setStart​(Timestamp start)
        Set the effective start date time of this version.
      • getEnd

        public Timestamp getEnd()
        Return the effective end date time of this version.
      • setEnd

        public void setEnd​(Timestamp end)
        Set the effective end date time of this version.
      • setDiff

        public void setDiff​(Map<String,​ValuePair> diff)
        Set the map of differences from this bean to the prior version.
      • getDiff

        public Map<String,​ValuePair> getDiff()
        Return the map of differences from this bean to the prior version.