Class SerializableModel<T extends java.io.Serializable>

    • Constructor Detail

      • SerializableModel

        public SerializableModel​(T object)
        Instantiates a new SerializableModel.
        Parameters:
        object - the object
      • SerializableModel

        public SerializableModel()
    • Method Detail

      • of

        public static <T extends java.io.Serializable> IModel<T> of()
        Factory methods for IModel which uses type inference to make code shorter. Equivalent to new SerializableModel<TypeOfObject>().
        Type Parameters:
        T - the generic type
        Returns:
        IModel that contains object
      • of

        public static <T> IModel<T> of​(IModel<?> model)
        Supresses generics warning when converting model types.
        Type Parameters:
        T - the generic type
        Parameters:
        model - the model
        Returns:
        model
      • of

        public static <T extends java.io.Serializable> IModel<T> of​(T object)
        Factory methods for IModel which uses type inference to make code shorter. Equivalent to new IModel<TypeOfObject>(object).
        Type Parameters:
        T - the generic type
        Parameters:
        object - the object
        Returns:
        IModel that contains object
      • setObject

        public void setObject​(T object)
        Set the model object; calls setObject(java.io.Serializable). The model object must be serializable, as it is stored in the session
        Specified by:
        setObject in interface IModel<T extends java.io.Serializable>
        Overrides:
        setObject in class GenericModel<T extends java.io.Serializable>
        Parameters:
        object - the model object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class GenericModel<T extends java.io.Serializable>
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class GenericModel<T extends java.io.Serializable>
      • canEqual

        protected boolean canEqual​(java.lang.Object other)
        Overrides:
        canEqual in class GenericModel<T extends java.io.Serializable>
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class GenericModel<T extends java.io.Serializable>