Program guide > Programming for JPA integration > Client-based JPA preload utility overview > Implement JPA preload

Parameters for load method with ClientLoader

The load method for ClientLoader allows you various configuring for the requirements.

  1. objectGrid : The ObjectGrid instance. It is a client-side ObjectGrid instance.

  2. "CUSTOMER" : The map to be loaded. Since the Customer has a cascade-all relation with Order entities, the Order entities will be loaded too.

  3. "custPU" : The JPA persistence unit name for the Customer and Order entities.

  4. null : The persistenceProps map is null, which means the default persistence properties configured in the persistence.xml will be used.

  5. null : The entityClass is configured as null. It will be set to the entity class configured in the ObjectGrid entity meta-data descriptor XML for the map "CUSTOMER", in this case, Customer.class.

  6. null : The loadSql is null, which means the default "select o from CUSTOMER o" will be used to query the JPA entities.

  7. null : The query parameter map is null.

  8. true : This indicates the data loading mode is preload. Therefore, clear operations will be called to both the CUSTOMER and ORDER maps to clear all the data before loading due to the cascade-remove relation between them.

  9. null : The ClientLoaderCallback is null.

For more information about the required parameters, see ClientLoader API.

Parent topic:

Implement client-based JPA preload utility