Class GenericBaseModel<T>

    • Constructor Detail

      • GenericBaseModel

        public GenericBaseModel()
    • Method Detail

      • getObject

        public T getObject()
        Description copied from interface: IModel
        Gets the model object.
        Specified by:
        getObject in interface IModel<T>
        Returns:
        The model object
      • setObject

        public void setObject​(T object)
        Set the model object. The contents must be serializable, as they are stored in the session
        Specified by:
        setObject in interface IModel<T>
        Parameters:
        object - the model object
        See Also:
        IModel.setObject(Object)
      • createSerializableVersionOf

        protected abstract T createSerializableVersionOf​(T object)
        Creates a serializable version of the object. The object is usually a collection.
        Parameters:
        object -
        Returns:
        serializable version of object
      • detach

        public void detach()
        Description copied from interface: IDetachable
        Detaches model after use. This is generally used to null out transient references that can be re-attached later.
        Specified by:
        detach in interface IDetachable
        Specified by:
        detach in interface IModel<T>
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object