Search in sources :

Example 16 with DeploymentQuery

use of org.activiti.engine.repository.DeploymentQuery in project Activiti by Activiti.

the class DeploymentQueryEscapeClauseTest method testQueryByNameLike.

public void testQueryByNameLike() {
    DeploymentQuery query = repositoryService.createDeploymentQuery().deploymentNameLike("%\\%%");
    assertEquals("one%", query.singleResult().getName());
    assertEquals(1, query.list().size());
    assertEquals(1, query.count());
    query = repositoryService.createDeploymentQuery().deploymentNameLike("%\\_%");
    assertEquals("two_", query.singleResult().getName());
    assertEquals(1, query.list().size());
    assertEquals(1, query.count());
}
Also used : DeploymentQuery(org.activiti.engine.repository.DeploymentQuery)

Example 17 with DeploymentQuery

use of org.activiti.engine.repository.DeploymentQuery in project Activiti by Activiti.

the class DeploymentQueryEscapeClauseTest method testQueryByProcessDefinitionKeyLike.

public void testQueryByProcessDefinitionKeyLike() {
    DeploymentQuery query = repositoryService.createDeploymentQuery().processDefinitionKeyLike("%\\_%");
    assertEquals(1, query.list().size());
    assertEquals(1, query.count());
}
Also used : DeploymentQuery(org.activiti.engine.repository.DeploymentQuery)

Aggregations

DeploymentQuery (org.activiti.engine.repository.DeploymentQuery)17 ActivitiIllegalArgumentException (org.activiti.engine.ActivitiIllegalArgumentException)3 ActivitiException (org.activiti.engine.ActivitiException)2 HashSet (java.util.HashSet)1 Deployment (org.activiti.engine.repository.Deployment)1 ProcessDefinitionQuery (org.activiti.engine.repository.ProcessDefinitionQuery)1 DataResponse (org.activiti.rest.common.api.DataResponse)1 ClassPathXmlApplicationContext (org.springframework.context.support.ClassPathXmlApplicationContext)1 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)1