当前位置: 首页>>代码示例>>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;未经允许,请勿转载。