Examples of QueryCondition


Examples of org.objectquery.QueryCondition

  @Test
  public void conditionNestedAnd() {
    MockQueryBuilder tqb = new MockQueryBuilder();
    SelectQuery<Person> oq = new GenericSelectQuery<Person, Object>(tqb, Person.class);
    Person pers = oq.target();
    QueryCondition cond = oq.and();
    QueryCondition and1 = cond.and();
    and1.eq(pers.getName(), "mary");
    and1.eq(pers.getDog().getName(), "mary");
    QueryCondition and2 = cond.and();
    and2.eq(pers.getName(), "miry");
    and2.eq(pers.getDog().getName(), "miry");

    tqb.build();

    assertEquals(1, tqb.getConditionsString().size());
    assertEquals(" (  ( name EQUALS mary AND dog.name EQUALS mary )  AND  ( name EQUALS miry AND dog.name EQUALS miry )  ) ", tqb.getConditionsString()
View Full Code Here

Examples of org.objectquery.QueryCondition

  @Test
  public void conditionNestedOr() {
    MockQueryBuilder tqb = new MockQueryBuilder();
    SelectQuery<Person> oq = new GenericSelectQuery<Person, Object>(tqb, Person.class);
    Person pers = oq.target();
    QueryCondition cond = oq.or();
    QueryCondition and1 = cond.or();
    and1.eq(pers.getName(), "mary");
    and1.eq(pers.getDog().getName(), "mary");
    QueryCondition and2 = cond.or();
    and2.eq(pers.getName(), "miry");
    and2.eq(pers.getDog().getName(), "miry");

    tqb.build();

    assertEquals(1, tqb.getConditionsString().size());
    assertEquals(" (  ( name EQUALS mary OR dog.name EQUALS mary )  OR  ( name EQUALS miry OR dog.name EQUALS miry )  ) ", tqb.getConditionsString().get(0));
View Full Code Here

Examples of org.objectquery.QueryCondition

  @Test
  public void conditionNestedMixed() {
    MockQueryBuilder tqb = new MockQueryBuilder();
    SelectQuery<Person> oq = new GenericSelectQuery<Person, Object>(tqb, Person.class);
    Person pers = oq.target();
    QueryCondition cond = oq.or();
    QueryCondition and1 = cond.and();
    and1.eq(pers.getName(), "mary");
    and1.eq(pers.getDog().getName(), "mary");
    QueryCondition and2 = cond.and();
    and2.eq(pers.getName(), "miry");
    and2.eq(pers.getDog().getName(), "miry");

    tqb.build();

    assertEquals(1, tqb.getConditionsString().size());
    assertEquals(" (  ( name EQUALS mary AND dog.name EQUALS mary )  OR  ( name EQUALS miry AND dog.name EQUALS miry )  ) ",
View Full Code Here

Examples of org.objectquery.QueryCondition

  @Test
  public void conditionPlainOr() {
    MockQueryBuilder tqb = new MockQueryBuilder();
    SelectQuery<Person> oq = new GenericSelectQuery<Person, Object>(tqb, Person.class);
    Person pers = oq.target();
    QueryCondition cond = oq.or();
    cond.eq(pers.getName(), "mary");
    cond.eq(pers.getDog().getName(), "mary");
    tqb.build();

    assertEquals(1, tqb.getConditionsString().size());
    assertEquals(" ( name EQUALS mary OR dog.name EQUALS mary ) ", tqb.getConditionsString().get(0));
View Full Code Here

Examples of org.uengine.ui.list.datamodel.QueryCondition

      out.write("\r\n");

  /***********************************************************************/
  /*                            Define                                   */
  /***********************************************************************/
  QueryCondition condition = new QueryCondition();
  DataList dl = null;

  // Work List BF.
  //  WorkListBusinessFacade workListBF = null;

  int intPageCnt = 50;
  int nPagesetSize = 10;
  int currentPage = reqMap.getInt("CURRENTPAGE", 1);
  int totalCount = 0;
  int totalPageCount = 0;

  String strTarget = reqMap.getString("TARGETCOND", "procins.instancename");
  String strKeyword = reqMap.getString("KEYWORDCOND", "");
  String strDateKeyStart = reqMap.getString("INIT_START_DATE", "");
  String strDateKeyEnd = reqMap.getString("INIT_END_DATE", "");
  String strDefCategoryId = reqMap.getString("DEFCATEGORYID", "");
  String strDefTypeId = reqMap.getString("DEFTYPEID", "");

  String strSortColumn = reqMap.getString("SORT_COLUMN", "");
  String strSortCond = reqMap.getString("SORT_COND", "");
  String menuItemId = reqMap.getString("MENU_ITEMID", "item_bpm");
  //  String filtering = reqMap.getString("FILTERING","");
  //  RequestContext reqCtx = new RequestContext(request);
  //  User logdUser = reqCtx.getUser();
  //  loggedUserCompanyId=   logdUser.getCompanyId();

  /***********************************************************************/
  /*                            Check & Set Parameter                    */
  /***********************************************************************/
  condition.setMap(reqMap);
  condition.setOnePageCount(intPageCnt);
  condition.setPageNo(currentPage);

  HashMap colors = new HashMap(10);
  colors.put("Failed", "red");
  colors.put("Suspended", "yellow");
  colors.put("Skipped", "blue");
View Full Code Here

Examples of org.uengine.ui.list.datamodel.QueryCondition

      statusType = "(wl.status = 'COMPLETED')";
    } else if (filter.equals("3")) {
      statusType = "(wl.status = 'Cancelled')";
    }

    QueryCondition condition = new QueryCondition();
    condition.setOnePageCount(pageCount);
    condition.setPageNo(currentPage);

    int totalCount = 0;

    DataList dl = null;
    Connection con = null;
View Full Code Here

Examples of org.uengine.ui.list.datamodel.QueryCondition

        try {
            /***********************************************************************/
            /*                            Define                                   */
            /***********************************************************************/

            QueryCondition condition = new QueryCondition();
           
            int intPageCnt = 10;
            int currentPage = reqMap.getInt("CURRENTPAGE", 1);

            /***********************************************************************/
            /*                            Check & Set Parameter                    */
            /***********************************************************************/
            condition.setMap(reqMap);
            condition.setOnePageCount(intPageCnt);
            condition.setPageNo(currentPage);

            String pd = reqMap.getString("processDefinition", "");
            setProcessVersionId(reqMap.getString("definitionVersionId", ""));
            setProcessInstId(reqMap.getString("instanceId", ""));

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.