Пример #1
0
 /** Internal query to resolve the "munkaKepList" to-many relationship of Munka. */
 public synchronized List<MunkaKep> _queryMunka_MunkaKepList(Long munkaID) {
   if (munka_MunkaKepListQuery == null) {
     QueryBuilder<MunkaKep> queryBuilder = queryBuilder();
     queryBuilder.where(Properties.MunkaID.eq(munkaID));
     munka_MunkaKepListQuery = queryBuilder.build();
   } else {
     munka_MunkaKepListQuery.setParameter(0, munkaID);
   }
   return munka_MunkaKepListQuery.list();
 }
Пример #2
0
  public void testBuildTwice() {
    insert(3);
    String value = getSimpleString(1);

    QueryBuilder<TestEntity> builder = dao.queryBuilder().where(Properties.SimpleString.eq(value));
    Query<TestEntity> query1 = builder.build();
    Query<TestEntity> query2 = builder.build();
    List<TestEntity> list1 = query1.list();
    List<TestEntity> list2 = query2.list();
    assertEquals(1, list1.size());
    assertEquals(1, list2.size());
    assertEquals(list1.get(0).getId(), list2.get(0).getId());
  }