org.hibernate.search.query.hibernate.impl

## Class LookupObjectInitializer

- java.lang.Object
- - org.hibernate.search.query.hibernate.impl.LookupObjectInitializer

- All Implemented Interfaces:
    ObjectInitializer

      public class LookupObjectInitializer
      extends Object
      implements ObjectInitializer

  Initializes objects using lookup by id. This approach is useful if a batch size has been set on the entity. Hibernate Session will load objects by batch reducing the number of database round trips. Note that the second level cache is naturally first checked in this approach.
  Author:
    Emmanuel Bernard

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static LookupObjectInitializer` | `INSTANCE`

    - ### Fields inherited from interface org.hibernate.search.query.hibernate.impl.ObjectInitializer

      `ENTITY_NOT_YET_INITIALIZED`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `initializeObjects(List<EntityInfo> entityInfos, LinkedHashMap<EntityInfoLoadKey,Object> idToObjectMap, ObjectInitializationContext objectInitializationContext)` Given a array of

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### INSTANCE

          public static final LookupObjectInitializer INSTANCE

  - ### Method Detail

    - #### initializeObjects

          public void initializeObjects(List<EntityInfo> entityInfos,
                                        LinkedHashMap<EntityInfoLoadKey,Object> idToObjectMap,
                                        ObjectInitializationContext objectInitializationContext)

      Description copied from interface: `ObjectInitializer`
      Given a array of
      Specified by:
        `initializeObjects` in interface `ObjectInitializer`
      Parameters:
        `entityInfos` - the `EntityInfo` instances to initialize
        `idToObjectMap` - map keeping to store the loaded entities in
        `objectInitializationContext` - gives access to the resources needed in the context of entity initialization

Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved