Search in sources :

Example 11 with ListQueryParameterObject

use of org.camunda.bpm.engine.impl.db.ListQueryParameterObject in project camunda-bpm-platform by camunda.

the class EventSubscriptionManager method findConditionalStartEventSubscription.

/**
 * @return the conditional start event subscriptions (from any tenant)
 */
@SuppressWarnings("unchecked")
public List<EventSubscriptionEntity> findConditionalStartEventSubscription() {
    ListQueryParameterObject parameter = new ListQueryParameterObject();
    configurParameterObject(parameter);
    return getDbEntityManager().selectList("selectConditionalStartEventSubscription", parameter);
}
Also used : ListQueryParameterObject(org.camunda.bpm.engine.impl.db.ListQueryParameterObject)

Example 12 with ListQueryParameterObject

use of org.camunda.bpm.engine.impl.db.ListQueryParameterObject in project camunda-bpm-platform by camunda.

the class HistoricBatchManager method findHistoricBatchIdsForCleanup.

@SuppressWarnings("unchecked")
public List<String> findHistoricBatchIdsForCleanup(Integer batchSize, Map<String, Integer> batchOperationsForHistoryCleanup) {
    Map<String, Object> queryParameters = new HashMap<String, Object>();
    queryParameters.put("currentTimestamp", ClockUtil.getCurrentTime());
    queryParameters.put("map", batchOperationsForHistoryCleanup);
    ListQueryParameterObject parameterObject = new ListQueryParameterObject();
    parameterObject.setParameter(queryParameters);
    parameterObject.getOrderingProperties().add(new QueryOrderingProperty(new QueryPropertyImpl("END_TIME_"), Direction.ASCENDING));
    parameterObject.setFirstResult(0);
    parameterObject.setMaxResults(batchSize);
    return (List<String>) getDbEntityManager().selectList("selectHistoricBatchIdsForCleanup", parameterObject);
}
Also used : ListQueryParameterObject(org.camunda.bpm.engine.impl.db.ListQueryParameterObject) HashMap(java.util.HashMap) QueryPropertyImpl(org.camunda.bpm.engine.impl.QueryPropertyImpl) ListQueryParameterObject(org.camunda.bpm.engine.impl.db.ListQueryParameterObject) QueryOrderingProperty(org.camunda.bpm.engine.impl.QueryOrderingProperty) List(java.util.List)

Aggregations

ListQueryParameterObject (org.camunda.bpm.engine.impl.db.ListQueryParameterObject)12 HashMap (java.util.HashMap)6 AuthorizationCheck (org.camunda.bpm.engine.impl.db.AuthorizationCheck)6 Test (org.junit.Test)6 QueryOrderingProperty (org.camunda.bpm.engine.impl.QueryOrderingProperty)3 QueryPropertyImpl (org.camunda.bpm.engine.impl.QueryPropertyImpl)2 List (java.util.List)1 DbEntityManager (org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager)1