Package org.nuxeo.ecm.core.bulk.message
Class BulkCommand.Builder
- java.lang.Object
-
- org.nuxeo.ecm.core.bulk.message.BulkCommand.Builder
-
- Enclosing class:
- BulkCommand
public static class BulkCommand.Builder extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected String
action
protected int
batchSize
protected int
bucketSize
protected Boolean
externalScroller
protected Boolean
genericScroller
protected Map<String,Serializable>
params
protected String
query
protected Long
queryLimit
protected String
repository
protected String
scroller
protected String
username
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description BulkCommand.Builder
batch(int size)
The number of documents processed by action within a transactionBulkCommand.Builder
bucket(int size)
The size of a bucket of documents id that fits into a recordBulkCommand
build()
protected void
checkScrollerType()
BulkCommand.Builder
param(String key, Serializable value)
Add an action parameterBulkCommand.Builder
params(Map<String,Serializable> params)
Set all action parametersBulkCommand.Builder
queryLimit(long limit)
Limits the query result.BulkCommand.Builder
queryUnlimited()
Unlimited query results, this will override the action defaultQueryLimit.BulkCommand.Builder
repository(String name)
Use a non default document repositoryBulkCommand.Builder
scroller(String scrollerName)
Sets scroller name used to materialized the document setBulkCommand.Builder
useDocumentScroller()
Uses a document scroller, the query must be a valid NXQL query.BulkCommand.Builder
useExternalScroller()
Uses an external scroller.BulkCommand.Builder
useGenericScroller()
Uses a generic scroller, the query syntax depends on scroller implementation.BulkCommand.Builder
user(String name)
Deprecated.since 11.1, useBuilder(String, String, String)
constructor with username instead
-
-
-
Field Detail
-
queryLimit
protected Long queryLimit
-
repository
protected String repository
-
bucketSize
protected int bucketSize
-
batchSize
protected int batchSize
-
genericScroller
protected Boolean genericScroller
-
externalScroller
protected Boolean externalScroller
-
params
protected Map<String,Serializable> params
-
-
Constructor Detail
-
Builder
public Builder(String action, String query, String username)
BulkCommand builder- Parameters:
action
- the registered bulk action namequery
- by default an NXQL query that represents the document set to apply the action. When using a generic scroller the query syntax is a convention with the scroller implementation. When using an external scroller the field is null.username
- the user with whose rights the computation will be executed- Since:
- 11.1
-
Builder
@Deprecated public Builder(String action, String nxqlQuery)
Deprecated.since 11.1, useBuilder(String, String, String)
constructor with username insteadBulkCommand builder- Parameters:
action
- the registered bulk action namenxqlQuery
- the query that represent the document set to apply the action
-
-
Method Detail
-
repository
public BulkCommand.Builder repository(String name)
Use a non default document repository
-
queryLimit
public BulkCommand.Builder queryLimit(long limit)
Limits the query result.- Since:
- 11.4
-
queryUnlimited
public BulkCommand.Builder queryUnlimited()
Unlimited query results, this will override the action defaultQueryLimit.- Since:
- 11.4
-
user
@Deprecated public BulkCommand.Builder user(String name)
Deprecated.since 11.1, useBuilder(String, String, String)
constructor with username insteadUser running the bulk action
-
bucket
public BulkCommand.Builder bucket(int size)
The size of a bucket of documents id that fits into a record
-
batch
public BulkCommand.Builder batch(int size)
The number of documents processed by action within a transaction
-
param
public BulkCommand.Builder param(String key, Serializable value)
Add an action parameter
-
params
public BulkCommand.Builder params(Map<String,Serializable> params)
Set all action parameters
-
scroller
public BulkCommand.Builder scroller(String scrollerName)
Sets scroller name used to materialized the document set
-
useGenericScroller
public BulkCommand.Builder useGenericScroller()
Uses a generic scroller, the query syntax depends on scroller implementation.- Since:
- 11.1
-
useDocumentScroller
public BulkCommand.Builder useDocumentScroller()
Uses a document scroller, the query must be a valid NXQL query. This is the default.- Since:
- 11.1
-
useExternalScroller
public BulkCommand.Builder useExternalScroller()
Uses an external scroller.- Since:
- 11.3
-
checkScrollerType
protected void checkScrollerType()
-
build
public BulkCommand build()
-
-