當前位置: 首頁>>代碼示例>>Java>>正文


Java HistoricBatchQuery類代碼示例

本文整理匯總了Java中org.camunda.bpm.engine.batch.history.HistoricBatchQuery的典型用法代碼示例。如果您正苦於以下問題:Java HistoricBatchQuery類的具體用法?Java HistoricBatchQuery怎麽用?Java HistoricBatchQuery使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


HistoricBatchQuery類屬於org.camunda.bpm.engine.batch.history包,在下文中一共展示了HistoricBatchQuery類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: applyFilters

import org.camunda.bpm.engine.batch.history.HistoricBatchQuery; //導入依賴的package包/類
protected void applyFilters(HistoricBatchQuery query) {
  if (batchId != null) {
    query.batchId(batchId);
  }
  if (type != null) {
    query.type(type);
  }
  if (completed != null) {
    query.completed(completed);
  }
  if (Boolean.TRUE.equals(withoutTenantId)) {
    query.withoutTenantId();
  }
  if (tenantIds != null && !tenantIds.isEmpty()) {
    query.tenantIdIn(tenantIds.toArray(new String[tenantIds.size()]));
  }
}
 
開發者ID:camunda,項目名稱:camunda-bpm-platform,代碼行數:18,代碼來源:HistoricBatchQueryDto.java

示例2: getHistoricBatches

import org.camunda.bpm.engine.batch.history.HistoricBatchQuery; //導入依賴的package包/類
@SuppressWarnings("unchecked")
@Override
public List<HistoricBatchDto> getHistoricBatches(UriInfo uriInfo, Integer firstResult, Integer maxResults) {
  HistoricBatchQueryDto queryDto = new HistoricBatchQueryDto(objectMapper, uriInfo.getQueryParameters());
  HistoricBatchQuery query = queryDto.toQuery(processEngine);

  List<HistoricBatch> matchingBatches;
  if (firstResult != null || maxResults != null) {
    matchingBatches = (List<HistoricBatch>) executePaginatedQuery(query, firstResult, maxResults);
  }
  else {
    matchingBatches = query.list();
  }

  List<HistoricBatchDto> batchResults = new ArrayList<HistoricBatchDto>();
  for (HistoricBatch matchingBatch : matchingBatches) {
    batchResults.add(HistoricBatchDto.fromBatch(matchingBatch));
  }
  return batchResults;
}
 
開發者ID:camunda,項目名稱:camunda-bpm-platform,代碼行數:21,代碼來源:HistoricBatchRestServiceImpl.java

示例3: testGetNonExistingHistoricBatch

import org.camunda.bpm.engine.batch.history.HistoricBatchQuery; //導入依賴的package包/類
@Test
public void testGetNonExistingHistoricBatch() {
  String nonExistingId = MockProvider.NON_EXISTING_ID;
  HistoricBatchQuery historicBatchQuery = mock(HistoricBatchQuery.class);
  when(historicBatchQuery.batchId(nonExistingId)).thenReturn(historicBatchQuery);
  when(historicBatchQuery.singleResult()).thenReturn(null);
  when(historyServiceMock.createHistoricBatchQuery()).thenReturn(historicBatchQuery);

  given()
    .pathParam("id", nonExistingId)
  .then().expect()
    .statusCode(Status.NOT_FOUND.getStatusCode())
    .body("type", equalTo(InvalidRequestException.class.getSimpleName()))
    .body("message", equalTo("Historic batch with id '" + nonExistingId + "' does not exist"))
  .when()
    .get(HISTORIC_SINGLE_BATCH_RESOURCE_URL);
}
 
開發者ID:camunda,項目名稱:camunda-bpm-platform,代碼行數:18,代碼來源:HistoricBatchRestServiceInteractionTest.java

示例4: applySortBy

import org.camunda.bpm.engine.batch.history.HistoricBatchQuery; //導入依賴的package包/類
protected void applySortBy(HistoricBatchQuery query, String sortBy, Map<String, Object> parameters, ProcessEngine engine) {
  if (sortBy.equals(SORT_BY_BATCH_ID_VALUE)) {
    query.orderById();
  }
  if (sortBy.equals(SORT_BY_BATCH_START_TIME_VALUE)) {
    query.orderByStartTime();
  }
  if (sortBy.equals(SORT_BY_BATCH_END_TIME_VALUE)) {
    query.orderByEndTime();
  }
  if (sortBy.equals(SORT_BY_TENANT_ID_VALUE)) {
    query.orderByTenantId();
  }
}
 
開發者ID:camunda,項目名稱:camunda-bpm-platform,代碼行數:15,代碼來源:HistoricBatchQueryDto.java

示例5: getHistoricBatchesCount

import org.camunda.bpm.engine.batch.history.HistoricBatchQuery; //導入依賴的package包/類
@Override
public CountResultDto getHistoricBatchesCount(UriInfo uriInfo) {
  HistoricBatchQueryDto queryDto = new HistoricBatchQueryDto(objectMapper, uriInfo.getQueryParameters());
  HistoricBatchQuery query = queryDto.toQuery(processEngine);

  long count = query.count();
  return new CountResultDto(count);
}
 
開發者ID:camunda,項目名稱:camunda-bpm-platform,代碼行數:9,代碼來源:HistoricBatchRestServiceImpl.java

示例6: setUpHistoricBatchQueryMock

import org.camunda.bpm.engine.batch.history.HistoricBatchQuery; //導入依賴的package包/類
@Before
public void setUpHistoricBatchQueryMock() {
  List<HistoricBatch> mockHistoricBatches = MockProvider.createMockHistoricBatches();
  queryMock = mock(HistoricBatchQuery.class);

  when(queryMock.list()).thenReturn(mockHistoricBatches);
  when(queryMock.count()).thenReturn((long) mockHistoricBatches.size());

  when(processEngine.getHistoryService().createHistoricBatchQuery()).thenReturn(queryMock);
}
 
開發者ID:camunda,項目名稱:camunda-bpm-platform,代碼行數:11,代碼來源:HistoricBatchRestServiceQueryTest.java

示例7: setUpHistoricBatchQueryMock

import org.camunda.bpm.engine.batch.history.HistoricBatchQuery; //導入依賴的package包/類
@Before
public void setUpHistoricBatchQueryMock() {
  HistoricBatch historicBatchMock = MockProvider.createMockHistoricBatch();

  queryMock = mock(HistoricBatchQuery.class);
  when(queryMock.batchId(eq(MockProvider.EXAMPLE_BATCH_ID))).thenReturn(queryMock);
  when(queryMock.singleResult()).thenReturn(historicBatchMock);

  historyServiceMock = mock(HistoryService.class);
  when(historyServiceMock.createHistoricBatchQuery()).thenReturn(queryMock);

  when(processEngine.getHistoryService()).thenReturn(historyServiceMock);
}
 
開發者ID:camunda,項目名稱:camunda-bpm-platform,代碼行數:14,代碼來源:HistoricBatchRestServiceInteractionTest.java

示例8: HistoricBatchQueryMock

import org.camunda.bpm.engine.batch.history.HistoricBatchQuery; //導入依賴的package包/類
public HistoricBatchQueryMock() {
 super(HistoricBatchQuery.class, HistoryService.class);
}
 
開發者ID:camunda,項目名稱:camunda-bpm-mockito,代碼行數:4,代碼來源:HistoricBatchQueryMock.java

示例9: createHistoricBatchQuery

import org.camunda.bpm.engine.batch.history.HistoricBatchQuery; //導入依賴的package包/類
public HistoricBatchQuery createHistoricBatchQuery() {
  return new HistoricBatchQueryImpl(commandExecutor);
}
 
開發者ID:camunda,項目名稱:camunda-bpm-platform,代碼行數:4,代碼來源:HistoryServiceImpl.java

示例10: tenantIdIn

import org.camunda.bpm.engine.batch.history.HistoricBatchQuery; //導入依賴的package包/類
public HistoricBatchQuery tenantIdIn(String... tenantIds) {
  ensureNotNull("tenantIds", (Object[]) tenantIds);
  this.tenantIds = tenantIds;
  isTenantIdSet = true;
  return this;
}
 
開發者ID:camunda,項目名稱:camunda-bpm-platform,代碼行數:7,代碼來源:HistoricBatchQueryImpl.java

示例11: withoutTenantId

import org.camunda.bpm.engine.batch.history.HistoricBatchQuery; //導入依賴的package包/類
public HistoricBatchQuery withoutTenantId() {
  this.tenantIds = null;
  isTenantIdSet = true;
  return this;
}
 
開發者ID:camunda,項目名稱:camunda-bpm-platform,代碼行數:6,代碼來源:HistoricBatchQueryImpl.java

示例12: orderById

import org.camunda.bpm.engine.batch.history.HistoricBatchQuery; //導入依賴的package包/類
public HistoricBatchQuery orderById() {
  return orderBy(HistoricBatchQueryProperty.ID);
}
 
開發者ID:camunda,項目名稱:camunda-bpm-platform,代碼行數:4,代碼來源:HistoricBatchQueryImpl.java

示例13: orderByStartTime

import org.camunda.bpm.engine.batch.history.HistoricBatchQuery; //導入依賴的package包/類
public HistoricBatchQuery orderByStartTime() {
  return orderBy(HistoricBatchQueryProperty.START_TIME);
}
 
開發者ID:camunda,項目名稱:camunda-bpm-platform,代碼行數:4,代碼來源:HistoricBatchQueryImpl.java

示例14: orderByEndTime

import org.camunda.bpm.engine.batch.history.HistoricBatchQuery; //導入依賴的package包/類
public HistoricBatchQuery orderByEndTime() {
  return orderBy(HistoricBatchQueryProperty.END_TIME);
}
 
開發者ID:camunda,項目名稱:camunda-bpm-platform,代碼行數:4,代碼來源:HistoricBatchQueryImpl.java

示例15: orderByTenantId

import org.camunda.bpm.engine.batch.history.HistoricBatchQuery; //導入依賴的package包/類
@Override
public HistoricBatchQuery orderByTenantId() {
  return orderBy(HistoricBatchQueryProperty.TENANT_ID);
}
 
開發者ID:camunda,項目名稱:camunda-bpm-platform,代碼行數:5,代碼來源:HistoricBatchQueryImpl.java


注:本文中的org.camunda.bpm.engine.batch.history.HistoricBatchQuery類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。