Package org.activiti.engine.repository

Examples of org.activiti.engine.repository.ModelQuery


    assertEquals(0, query.list().size());
    assertEquals(0, query.count());
  }
 
  public void testQueryByNameLike() throws Exception {
    ModelQuery query = repositoryService.createModelQuery().modelNameLike("%model%");
    Model model = query.singleResult();
    assertNotNull(model);
    assertEquals("bytes", new String(repositoryService.getModelEditorSource(model.getId()), "utf-8"));
    assertEquals(1, query.list().size());
    assertEquals(1, query.count());
  }
View Full Code Here


    assertEquals(1, query.list().size());
    assertEquals(1, query.count());
  }
 
  public void testQueryByInvalidNameLike() {
    ModelQuery query = repositoryService.createModelQuery().modelNameLike("%invalid%");
    assertNull(query.singleResult());
    assertEquals(0, query.list().size());
    assertEquals(0, query.count());
  }
View Full Code Here

    assertEquals(0, query.list().size());
    assertEquals(0, query.count());
  }
 
  public void testQueryByKey() {
    ModelQuery query = repositoryService.createModelQuery().modelName("my model").modelKey("someKey");
    Model model = query.singleResult();
    assertNotNull(model);
    assertEquals(1, query.list().size());
    assertEquals(1, query.count());
  }
View Full Code Here

    assertEquals(1, query.list().size());
    assertEquals(1, query.count());
  }
 
  public void testQueryByNameAndKey() {
    ModelQuery query = repositoryService.createModelQuery().modelKey("someKey");
    Model model = query.singleResult();
    assertNotNull(model);
    assertEquals(1, query.list().size());
    assertEquals(1, query.count());
  }
View Full Code Here

    assertEquals(1, query.list().size());
    assertEquals(1, query.count());
  }
 
  public void testQueryByInvalidKey() {
    ModelQuery query = repositoryService.createModelQuery().modelKey("invalid");
    assertNull(query.singleResult());
    assertEquals(0, query.list().size());
    assertEquals(0, query.count());
  }
View Full Code Here

    assertEquals(0, query.list().size());
    assertEquals(0, query.count());
  }
 
  public void testQueryByCategory() {
    ModelQuery query = repositoryService.createModelQuery().modelCategory("test");
    assertEquals(1, query.list().size());
    assertEquals(1, query.count());
  }
View Full Code Here

    assertEquals(1, query.list().size());
    assertEquals(1, query.count());
  }
 
  public void testQueryByInvalidCategory() {
    ModelQuery query = repositoryService.createModelQuery().modelCategory("invalid");
    assertNull(query.singleResult());
    assertEquals(0, query.list().size());
    assertEquals(0, query.count());
  }
View Full Code Here

    assertEquals(0, query.list().size());
    assertEquals(0, query.count());
  }
 
  public void testQueryByCategoryLike() {
    ModelQuery query = repositoryService.createModelQuery().modelCategoryLike("%te%");
    assertEquals(1, query.list().size());
    assertEquals(1, query.count());
  }
View Full Code Here

    assertEquals(1, query.list().size());
    assertEquals(1, query.count());
  }
 
  public void testQueryByInvalidCategoryLike() {
    ModelQuery query = repositoryService.createModelQuery().modelCategoryLike("%invalid%");
    assertNull(query.singleResult());
    assertEquals(0, query.list().size());
    assertEquals(0, query.count());
  }
View Full Code Here

    assertEquals(0, query.list().size());
    assertEquals(0, query.count());
  }
 
  public void testQueryByCategoryNotEquals() {
    ModelQuery query = repositoryService.createModelQuery().modelCategoryNotEquals("aap");
    assertEquals(1, query.list().size());
    assertEquals(1, query.count());
  }
View Full Code Here

TOP

Related Classes of org.activiti.engine.repository.ModelQuery

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.