Class AbstractEntityLoader

    • Field Detail

      • uniqueKeyType

        protected final Type uniqueKeyType
      • entityName

        protected final java.lang.String entityName
    • Method Detail

      • load

        public java.lang.Object load​(java.io.Serializable id,
                                     java.lang.Object optionalObject,
                                     SharedSessionContractImplementor session)
        Description copied from interface: UniqueEntityLoader
        Load an entity instance. If optionalObject is supplied, load the entity state into the given (uninitialized) object.
        Specified by:
        load in interface UniqueEntityLoader
      • load

        public java.lang.Object load​(java.io.Serializable id,
                                     java.lang.Object optionalObject,
                                     SharedSessionContractImplementor session,
                                     LockOptions lockOptions)
        Description copied from interface: UniqueEntityLoader
        Load an entity instance by id. If optionalObject is supplied (non-null, the entity state is loaded into that object instance instead of instantiating a new one.
        Specified by:
        load in interface UniqueEntityLoader
        Parameters:
        id - The id to be loaded
        optionalObject - The (optional) entity instance in to which to load the state
        session - The session from which the request originated
        lockOptions - The lock options.
        Returns:
        The loaded entity
      • isSingleRowLoader

        protected boolean isSingleRowLoader()
        Description copied from class: Loader
        Return false is this loader is a batch entity loader
        Overrides:
        isSingleRowLoader in class Loader