Example: Creating a custom client-based JPA loader
The ClientLoader.load method in the Loader interface provides a client load function that satisfies most scenarios. However, if you want to load data without the ClientLoader.load method, you can implement your own preload utility.
Custom loader template
Use the following template to develop your loader:// Get the StateManager
StateManager stateMgr = StateManagerFactory.getStateManager();
// Set ObjectGrid state to PRELOAD before calling ClientLoader.loader
stateMgr.setObjectGridState(AvailabilityState.PRELOAD, objectGrid);
// Load the data
...<your preload utility implementation>...
// Set ObjectGrid state back to ONLINE
stateMgr.setObjectGridState(AvailabilityState.ONLINE, objectGrid);