Exemplo n.º 1
0
 @Override
 protected DictionaryQuery<Dictionary> createQuery() throws Exception {
   DictionaryObjectQuery q = new DictionaryObjectQuery();
   q.setCondition(StringCondition.getInstance(StringCondition.C_REGEXP));
   q.setValue("Endpoints");
   return q;
 }
Exemplo n.º 2
0
 @Test
 public void test() throws Exception {
   DictionarySubjectQuery qf = new DictionarySubjectQuery();
   qf.setValue("Endpoints");
   qf.setCondition(StringCondition.getInstance("="));
   qf.setId(1);
   Assert.assertEquals(
       String.format(DictionaryQuery.SQL, qf.getFieldname(), qf.getCondition()), qf.getSQL());
   List<QueryParam> params = qf.getParameters();
   Assert.assertNotNull(params);
   Assert.assertEquals(1, params.size());
   Assert.assertEquals(String.class, params.get(0).getType());
   Assert.assertEquals("Endpoints", params.get(0).getValue());
 }