public class HqlInClauseBatchHelper extends Object
Consumer
instances for applying various parameters for Hibernate Query.
Default batch size is 1000 elements provided to "in" clause, which can be overwritten using "crowd.query.in.batch.size" system property
Sample usage:
final List<String> parameters = Lists.newArrayList("param1", "param2")
HqlInClauseBatchHelper
.ofNamedQuery(session, "removeInternalUserAttributesById")
.executeUpdate("parametersNames", parameters);
Modifier and Type | Class and Description |
---|---|
static class |
HqlInClauseBatchHelper.HqlInClauseBatchHelperBuilder |
Modifier and Type | Method and Description |
---|---|
<T> void |
executeUpdate(String inClauseParameterName,
Iterable<T> inClauseObjects)
Executes HQL query in batches
|
static HqlInClauseBatchHelper.HqlInClauseBatchHelperBuilder |
ofHqlQuery(org.hibernate.Session session,
String query)
Constructs a new builder for HQL "in" clause helper with supplied hibernate session object and HQL query
|
static HqlInClauseBatchHelper.HqlInClauseBatchHelperBuilder |
ofNamedQuery(org.hibernate.Session session,
String queryName)
Constructs a new builder for HQL "in" clause helper with supplied hibernate session object and query name
|
<T> List<T> |
query(String inClauseParameterName,
Iterable<?> inClauseObjects) |
public static HqlInClauseBatchHelper.HqlInClauseBatchHelperBuilder ofNamedQuery(org.hibernate.Session session, String queryName)
session
- hibernate session objectqueryName
- name of the HQL querypublic static HqlInClauseBatchHelper.HqlInClauseBatchHelperBuilder ofHqlQuery(org.hibernate.Session session, String query)
session
- hibernate session objectquery
- the HQL querypublic <T> void executeUpdate(String inClauseParameterName, Iterable<T> inClauseObjects)
T
- represents a type of objects supplied to the queryinClauseParameterName
- name of the in clause parameter in queryinClauseObjects
- list of parameters that will be supplied to in cluase parameter in queryCopyright © 2019 Atlassian. All rights reserved.