Codota Logo
DeploymentQuery.count
Code IndexAdd Codota to your IDE (free)

How to use
count
method
in
org.camunda.bpm.engine.repository.DeploymentQuery

Best Java code snippets using org.camunda.bpm.engine.repository.DeploymentQuery.count (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: camunda/camunda-bpm-platform

private DeploymentQuery setUpMockDeploymentQuery(List<Deployment> mockedDeployments) {
 DeploymentQuery sampleDeploymentQuery = mock(DeploymentQuery.class);
 when(sampleDeploymentQuery.list()).thenReturn(mockedDeployments);
 when(sampleDeploymentQuery.count()).thenReturn((long) mockedDeployments.size());
 when(processEngine.getRepositoryService().createDeploymentQuery()).thenReturn(sampleDeploymentQuery);
 return sampleDeploymentQuery;
}
origin: camunda/camunda-bpm-platform

public CountResultDto getDeploymentsCount(UriInfo uriInfo) {
 DeploymentQueryDto queryDto = new DeploymentQueryDto(getObjectMapper(), uriInfo.getQueryParameters());
 ProcessEngine engine = getProcessEngine();
 DeploymentQuery query = queryDto.toQuery(engine);
 long count = query.count();
 CountResultDto result = new CountResultDto();
 result.setCount(count);
 return result;
}
origin: camunda/camunda-bpm-platform

public void testQueryAuthenticatedTenants() {
 identityService.setAuthentication("user", null, Arrays.asList(TENANT_ONE, TENANT_TWO));
 DeploymentQuery query = repositoryService.createDeploymentQuery();
 assertThat(query.count(), is(3L));
 assertThat(query.tenantIdIn(TENANT_ONE).count(), is(1L));
 assertThat(query.tenantIdIn(TENANT_TWO).count(), is(1L));
 assertThat(query.withoutTenantId().count(), is(1L));
}
origin: camunda/camunda-bpm-platform

public void testQueryAuthenticatedTenant() {
 identityService.setAuthentication("user", null, Arrays.asList(TENANT_ONE));
 DeploymentQuery query = repositoryService.createDeploymentQuery();
 assertThat(query.count(), is(2L));
 assertThat(query.tenantIdIn(TENANT_ONE).count(), is(1L));
 assertThat(query.tenantIdIn(TENANT_TWO).count(), is(0L));
 assertThat(query.tenantIdIn(TENANT_ONE, TENANT_TWO).includeDeploymentsWithoutTenantId().count(), is(2L));
}
origin: camunda/camunda-bpm-platform

public void testQueryByTenantId() {
 DeploymentQuery query = repositoryService
   .createDeploymentQuery()
   .tenantIdIn(TENANT_ONE);
 assertThat(query.count(), is(1L));
 query = repositoryService
   .createDeploymentQuery()
   .tenantIdIn(TENANT_TWO);
 assertThat(query.count(), is(1L));
}
origin: camunda/camunda-bpm-platform

public void testQueryWithoutTenantId() {
 DeploymentQuery query = repositoryService
   .createDeploymentQuery()
   .withoutTenantId();
 assertThat(query.count(), is(1L));
}
origin: camunda/camunda-bpm-platform

public void testQueryByTenantIds() {
 DeploymentQuery query = repositoryService
   .createDeploymentQuery()
   .tenantIdIn(TENANT_ONE, TENANT_TWO);
 assertThat(query.count(), is(2L));
}
origin: camunda/camunda-bpm-platform

public void testQueryNoAuthenticatedTenants() {
 identityService.setAuthentication("user", null, null);
 DeploymentQuery query = repositoryService.createDeploymentQuery();
 assertThat(query.count(), is(1L));
}
origin: camunda/camunda-bpm-platform

@Test
public void testQueryCount() {
 expect().statusCode(Status.OK.getStatusCode())
  .body("count", equalTo(1))
  .when().get(DEPLOYMENT_COUNT_QUERY_URL);
 verify(mockedQuery).count();
}
origin: camunda/camunda-bpm-platform

public void testQueryDisabledTenantCheck() {
 processEngineConfiguration.setTenantCheckEnabled(false);
 identityService.setAuthentication("user", null, null);
 DeploymentQuery query = repositoryService.createDeploymentQuery();
 assertThat(query.count(), is(3L));
}
origin: camunda/camunda-bpm-platform

@Test
public void createDeploymentWithAuthenticatedTenant() {
 identityService.setAuthentication("user", null, Arrays.asList(TENANT_ONE));
 repositoryService.createDeployment().addModelInstance("emptyProcess.bpmn", emptyProcess)
  .tenantId(TENANT_ONE).deploy();
 identityService.clearAuthentication();
 DeploymentQuery query = repositoryService.createDeploymentQuery();
 assertThat(query.count(), is(1L));
 assertThat(query.tenantIdIn(TENANT_ONE).count(), is(1L));
}
origin: camunda/camunda-bpm-platform

public void testQueryByNullSource() {
 DeploymentQuery query = repositoryService
   .createDeploymentQuery()
   .deploymentSource(null);
 assertEquals(1, query.list().size());
 assertEquals(1, query.count());
}
origin: camunda/camunda-bpm-platform

public void testQueryBySource() {
 DeploymentQuery query = repositoryService
   .createDeploymentQuery()
   .deploymentSource(ProcessApplicationDeployment.PROCESS_APPLICATION_DEPLOYMENT_SOURCE);
 assertEquals(1, query.list().size());
 assertEquals(1, query.count());
}
origin: camunda/camunda-bpm-platform

@Test
public void createDeploymentForAnotherTenant() {
 identityService.setAuthentication("user", null, null);
 repositoryService.createDeployment().addModelInstance("emptyProcess.bpmn", emptyProcess)
  .tenantId(TENANT_ONE).deploy();
 identityService.clearAuthentication();
 DeploymentQuery query = repositoryService.createDeploymentQuery();
 assertThat(query.count(), is(1L));
 assertThat(query.tenantIdIn(TENANT_ONE).count(), is(1L));
}
origin: camunda/camunda-bpm-platform

@Test
public void createDeploymentDisabledTenantCheck() {
 processEngineConfiguration.setTenantCheckEnabled(false);
 identityService.setAuthentication("user", null, null);
 repositoryService.createDeployment().addModelInstance("emptyProcessOne", emptyProcess).tenantId(TENANT_ONE).deploy();
 repositoryService.createDeployment().addModelInstance("emptyProcessTwo", startEndProcess).tenantId(TENANT_TWO).deploy();
 DeploymentQuery query = repositoryService.createDeploymentQuery();
 assertThat(query.count(), is(2L));
 assertThat(query.tenantIdIn(TENANT_ONE).count(), is(1L));
 assertThat(query.tenantIdIn(TENANT_TWO).count(), is(1L));
}
origin: camunda/camunda-bpm-platform

public void testQueryByName() {
 DeploymentQuery query = repositoryService.createDeploymentQuery().deploymentName("org/camunda/bpm/engine/test/repository/two_.bpmn20.xml");
 assertNotNull(query.singleResult());
 assertEquals(1, query.list().size());
 assertEquals(1, query.count());
}
origin: camunda/camunda-bpm-platform

public void testQueryByDeploymentId() {
 DeploymentQuery query = repositoryService.createDeploymentQuery().deploymentId(deploymentOneId);
 assertNotNull(query.singleResult());
 assertEquals(1, query.list().size());
 assertEquals(1, query.count());
}
origin: camunda/camunda-bpm-platform

@Test
@OperateOnDeployment("checker")
public void test() {
 
 // make sure the deployment of the first app was rolled back
 
 long count = processEngine.getRepositoryService()
  .createDeploymentQuery()
  .count();
 
 Assert.assertEquals(1, count);
   }

origin: camunda/camunda-bpm-platform

public void testQueryByInvalidDeploymentId() {
 DeploymentQuery query = repositoryService.createDeploymentQuery().deploymentId("invalid");
 assertNull(query.singleResult());
 assertEquals(0, query.list().size());
 assertEquals(0, query.count());
 try {
  repositoryService.createDeploymentQuery().deploymentId(null);
  fail();
 } catch (ProcessEngineException e) {}
}
origin: camunda/camunda-bpm-platform

public void testQueryByInvalidNameLike() {
 DeploymentQuery query = repositoryService.createDeploymentQuery().deploymentNameLike("invalid");
 assertNull(query.singleResult());
 assertEquals(0, query.list().size());
 assertEquals(0, query.count());
 try {
  repositoryService.createDeploymentQuery().deploymentNameLike(null);
  fail();
 } catch (ProcessEngineException e) {}
}
org.camunda.bpm.engine.repositoryDeploymentQuerycount

Popular methods of DeploymentQuery

  • list
  • singleResult
  • deploymentId
    Only select deployments with the given deployment id.
  • deploymentName
    Only select deployments with the given name.
  • deploymentAfter
    Only select deployments deployed after the given date
  • deploymentBefore
    Only select deployments deployed before the given date
  • deploymentNameLike
    Only select deployments with a name like the given string.
  • deploymentSource
    If the given source is null, then deployments are returned where source is equal to null. Otherwise
  • includeDeploymentsWithoutTenantId
    Select deployments which have no tenant id. Can be used in combination with #tenantIdIn(String...).
  • orderByDeploymentId
    Order by deployment id (needs to be followed by #asc() or #desc()).
  • orderByDeploymentName
    Order by deployment name (needs to be followed by #asc() or #desc()).
  • orderByDeploymentTime
    Order by deployment time (needs to be followed by #asc() or #desc()).
  • orderByDeploymentName,
  • orderByDeploymentTime,
  • orderByTenantId,
  • tenantIdIn,
  • withoutTenantId,
  • listPage,
  • asc,
  • desc,
  • orderByDeploymenTime

Popular in Java

  • Reading from database using SQL prepared statement
  • getSystemService (Context)
  • setContentView (Activity)
  • runOnUiThread (Activity)
  • InputStreamReader (java.io)
    An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • DataSource (javax.sql)
    A factory for connections to the physical data source that this DataSource object represents. An alt
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now