Class OBInstantiator

  • All Implemented Interfaces:
    Serializable, org.hibernate.tuple.Instantiator

    public class OBInstantiator
    extends Object
    implements org.hibernate.tuple.Instantiator
    This class is used by Hibernate. Instantiates a Openbravo business object and sets the Entity in this new instance. There is one OBInstantiator instance per Entity in the system. Its main use is to support dynamic business objects which can handle runtime model changes.
    See Also:
    Serialized Form
    • Constructor Detail

      • OBInstantiator

        public OBInstantiator()
      • OBInstantiator

        public OBInstantiator​(org.hibernate.mapping.PersistentClass mappingInfo)
    • Method Detail

      • instantiate

        public Object instantiate()
        Instantiate a new instance of the entity.
        Specified by:
        instantiate in interface org.hibernate.tuple.Instantiator
      • instantiate

        public Object instantiate​(Serializable id)
        Instantiate an instance and set its id using the parameter. Used by Hibernate when loading existing instances from the database.
        Specified by:
        instantiate in interface org.hibernate.tuple.Instantiator
        id - the id to set in the instance
      • isInstance

        public boolean isInstance​(Object object)
        Returns true if the object is an instance of the Entity handled by the OBInstantiator.
        Specified by:
        isInstance in interface org.hibernate.tuple.Instantiator
        object - the object to compare with the Entity managed here
        true if the object is an Entity managed by this class