Class QueryBasedCreationData.Builder
- java.lang.Object
-
- de.hybris.platform.processing.distributed.simple.data.QueryBasedCreationData.Builder
-
- Enclosing class:
- QueryBasedCreationData
public static class QueryBasedCreationData.Builder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description QueryBasedCreationDatabuild()QueryBasedCreationData.BuilderuseDatabasePaging()Tells whether thisProcessCreationDataimplementation should use Database level paging or in-memory paging.QueryBasedCreationData.BuilderwithBatchSize(int batchSize)Allows to provide custom batch size.QueryBasedCreationData.BuilderwithBeforeQueryHook(QueryBasedCreationData.QueryHook beforeQueryHook)Allows to provide logic which will be executed before FlexibleSearchQuery is executed.QueryBasedCreationData.BuilderwithFlexibleSearchQuery(FlexibleSearchQuery flexibleSearchQuery)Allows to provide fullFlexibleSearchQueryobject.QueryBasedCreationData.BuilderwithHandlerId(java.lang.String handlerId)Allows to provide Spring Bean ID of a SimpleDistributedProcessHandler.QueryBasedCreationData.BuilderwithNodeGroup(java.lang.String nodeGroup)Allows to provide name of the NodeGroup which will execute process.QueryBasedCreationData.BuilderwithNumOfRetries(int numOfRetries)Allows to provide custom number of retries for Batch.QueryBasedCreationData.BuilderwithProcessId(java.lang.String processId)Allows to setup custom processId.QueryBasedCreationData.BuilderwithProcessModelClass(java.lang.Class<? extends SimpleDistributedProcessModel> processModelClass)Allows to provide custom process model class.QueryBasedCreationData.BuilderwithQuery(java.lang.String query)Allows to provide FlexibleSrarch query String.QueryBasedCreationData.BuilderwithQueryParams(java.util.Map<java.lang.String,java.lang.Object> queryParams)Allows to provide query parameters when String based query is used.QueryBasedCreationData.BuilderwithResultClasses(java.util.List<java.lang.Class<?>> resultClasses)Allows to provide result classes when String based query is used.QueryBasedCreationData.BuilderwithScriptCode(java.lang.String scriptCode)Allows to provide Script code which will act as aSimpleBatchProcessorimplementation.
-
-
-
Method Detail
-
withHandlerId
public QueryBasedCreationData.Builder withHandlerId(java.lang.String handlerId)
Allows to provide Spring Bean ID of a SimpleDistributedProcessHandler.
-
withProcessId
public QueryBasedCreationData.Builder withProcessId(java.lang.String processId)
Allows to setup custom processId. Note that processId must be unique in the whole system.
-
withNodeGroup
public QueryBasedCreationData.Builder withNodeGroup(java.lang.String nodeGroup)
Allows to provide name of the NodeGroup which will execute process.
-
withBatchSize
public QueryBasedCreationData.Builder withBatchSize(int batchSize)
Allows to provide custom batch size. If not used default 100 will be chosen.
-
withNumOfRetries
public QueryBasedCreationData.Builder withNumOfRetries(int numOfRetries)
Allows to provide custom number of retries for Batch. If not used default 3 will be chosen.
-
withQuery
public QueryBasedCreationData.Builder withQuery(java.lang.String query)
Allows to provide FlexibleSrarch query String.
-
withQueryParams
public QueryBasedCreationData.Builder withQueryParams(java.util.Map<java.lang.String,java.lang.Object> queryParams)
Allows to provide query parameters when String based query is used.
-
withResultClasses
public QueryBasedCreationData.Builder withResultClasses(java.util.List<java.lang.Class<?>> resultClasses)
Allows to provide result classes when String based query is used.
-
withScriptCode
public QueryBasedCreationData.Builder withScriptCode(java.lang.String scriptCode)
Allows to provide Script code which will act as aSimpleBatchProcessorimplementation. When this option is chosenwithHandlerId(String)has no effect.
-
withFlexibleSearchQuery
public QueryBasedCreationData.Builder withFlexibleSearchQuery(FlexibleSearchQuery flexibleSearchQuery)
Allows to provide fullFlexibleSearchQueryobject. When this option is chosenwithQuery(String),withQueryParams(Map),withResultClasses(List)have no effect.
-
withBeforeQueryHook
public QueryBasedCreationData.Builder withBeforeQueryHook(QueryBasedCreationData.QueryHook beforeQueryHook)
Allows to provide logic which will be executed before FlexibleSearchQuery is executed. Usually useful to set session settings.
-
useDatabasePaging
public QueryBasedCreationData.Builder useDatabasePaging()
Tells whether thisProcessCreationDataimplementation should use Database level paging or in-memory paging. In-memory paging is the default. Please note that if you want to use Database level paging you must provide query with proper ORDER BY clause.
-
withProcessModelClass
public QueryBasedCreationData.Builder withProcessModelClass(java.lang.Class<? extends SimpleDistributedProcessModel> processModelClass)
Allows to provide custom process model class.
-
build
public QueryBasedCreationData build()
-
-