Package org.dataloader
Class BatchLoaderEnvironment
java.lang.Object
org.dataloader.BatchLoaderEnvironment
This object is passed to a batch loader as calling context. It could contain security credentials
of the calling users for example or database parameters that allow the data layer call to succeed.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescription<T> @Nullable T
Returns the overall context object provided byBatchLoaderContextProvider
Each call toDataLoader.load(Object, Object)
orDataLoader.loadMany(java.util.List, java.util.List)
can be given a context object when it is invoked.Each call toDataLoader.load(Object, Object)
orDataLoader.loadMany(java.util.List, java.util.List)
can be given a context object when it is invoked.
-
Method Details
-
getContext
public <T> @Nullable T getContext()Returns the overall context object provided byBatchLoaderContextProvider
- Type Parameters:
T
- the type you would like the object to be- Returns:
- a context object or null if there isn't one
-
getKeyContexts
Each call toDataLoader.load(Object, Object)
orDataLoader.loadMany(java.util.List, java.util.List)
can be given a context object when it is invoked. A map of them is present by this method.- Returns:
- a map of key context objects
-
getKeyContextsList
Each call toDataLoader.load(Object, Object)
orDataLoader.loadMany(java.util.List, java.util.List)
can be given a context object when it is invoked. A list of them is present by this method.- Returns:
- a list of key context objects in the order they were encountered
-
newBatchLoaderEnvironment
-