Package com.iisigroup.cap.dao.utils

Examples of com.iisigroup.cap.dao.utils.ISearch


  }// ;

  @SuppressWarnings({ "rawtypes" })
  private IResult getGridData(Method method, IRequest params) {
    ISearch search = createSearchTemplete();
    boolean pages = params.containsParamsKey(IGridEnum.PAGE.getCode());
    int page = 0, pageRows = 0, startRow = 0;
    if (pages) {
      page = params.getParamsAsInteger(IGridEnum.PAGE.getCode());
      pageRows = params.getParamsAsInteger(IGridEnum.PAGEROWS.getCode());
      startRow = (page - 1) * pageRows;
      search.setFirstResult(startRow).setMaxResults(pageRows);
    }
    boolean sort = params.containsParamsKey(IGridEnum.SORTCOLUMN.getCode())
        && !CapString
            .isEmpty(params.get(IGridEnum.SORTCOLUMN.getCode()));
    if (sort) {
      String[] sortBy = params.get(IGridEnum.SORTCOLUMN.getCode()).split(
          "\\|");
      String[] isAscAry = params.get(IGridEnum.SORTTYPE.getCode(), "asc")
          .split("\\|");
      for (int i = 0; i < sortBy.length; i++) {
        String isAsc = (i < isAscAry.length) ? isAscAry[i] : "asc";
        search.addOrderBy(sortBy[i], !IGridEnum.SORTASC.getCode()
            .equals(isAsc));
      }
    }
    IGridResult result = null;
    try {
View Full Code Here


@Repository
public class CaseInfoDaoImpl extends GenericDao<CaseInfo> implements CaseInfoDao {

  @Override
  public CaseInfo findByCaseNo(String caseNo) {
    ISearch search = createSearchTemplete();
    search.addSearchModeParameters(SearchMode.EQUALS, "divCtItmNo", caseNo);
    return findUniqueOrNone(search);
  }
View Full Code Here

    return findUniqueOrNone(search);
  }
 
  @Override
  public List<CaseInfo> findCaseInfosByGrpUppId(String[] grpUppId) {
    ISearch search = createSearchTemplete();
    search.addSearchModeParameters(SearchMode.EQUALS, "grpUppId", grpUppId);
    search.setFirstResult(0).setMaxResults(Integer.MAX_VALUE);
    search.addOrderBy("casNo");
    return find(search);
  }
View Full Code Here

    return find(search);
  }
 
  @Override
  public List<CaseInfo> findNoneDispatchCaseInfoOrderByCaseNo() {
    ISearch search = createSearchTemplete();
    search.addSearchModeParameters(SearchMode.IS_NULL, "docStatus", true);
    search.setFirstResult(0).setMaxResults(Integer.MAX_VALUE);
    search.addOrderBy("casNo");
    return find(search);
  }
View Full Code Here

@Repository
public class DivCtDtlDaoImpl extends GenericDao<DivCtDtl> implements DivCtDtlDao {

  @Override
  public DivCtDtl findByConditionNo(String conditionNo) {
    ISearch search = createSearchTemplete();
    search.addSearchModeParameters(SearchMode.EQUALS, "divCtNo", conditionNo);
    return findUniqueOrNone(search);
  }
View Full Code Here

    return findUniqueOrNone(search);
  }
 
  @Override
  public List<DivCtDtl> findCtDtlsByCtNoAndSort(String conditionNo) {
    ISearch search = createSearchTemplete();
    search.addSearchModeParameters(SearchMode.EQUALS, "divCtNo", conditionNo);
    search.setFirstResult(0).setMaxResults(Integer.MAX_VALUE);
    search.addOrderBy("divCtSor");
    return find(search);
  }
View Full Code Here

    return find(search);
  }

  @Override
  public List<DivCtDtl> findByConditionNos(String[] conditionNos) {
    ISearch search = createSearchTemplete();
    search.addSearchModeParameters(SearchMode.EQUALS, "divCtNo", conditionNos);
    search.setFirstResult(0).setMaxResults(Integer.MAX_VALUE);
    search.addOrderBy("divCtSor");
    return find(search);
  }
View Full Code Here

@Repository
public class CodeTypeDaoImpl extends GenericDao<CodeType> implements CodeTypeDao {

  @Override
  public List<CodeType> findByCodeType(String codetype, String locale) {
    ISearch search = createSearchTemplete();
    search.addSearchModeParameters(SearchMode.EQUALS, "locale", locale);
    search.addSearchModeParameters(SearchMode.EQUALS, "codeType", codetype);
    search.setFirstResult(0).setMaxResults(Integer.MAX_VALUE);
    search.addOrderBy("codeOrder");
    List<CodeType> list = find(search);
    return list;
  }
View Full Code Here

  }

  @Override
  public CodeType findByCodeTypeAndCodeValue(String cType, String cValue,
      String locale) {
    ISearch search = createSearchTemplete();
    search.addSearchModeParameters(SearchMode.EQUALS, "locale", locale);
    search.addSearchModeParameters(SearchMode.EQUALS, "codeType", cType);
    search.addSearchModeParameters(SearchMode.EQUALS, "codeValue", cValue);
    search.setFirstResult(0).setMaxResults(Integer.MAX_VALUE);
    return findUniqueOrNone(search);
  }
View Full Code Here

    return findUniqueOrNone(search);
  }

  @Override
  public List<CodeType> findByCodeType(String[] codetypes, String locale) {
    ISearch search = createSearchTemplete();
    search.addSearchModeParameters(SearchMode.EQUALS, "locale", locale);
    search.addSearchModeParameters(SearchMode.IN, "codeType", codetypes);
    search.setFirstResult(0).setMaxResults(Integer.MAX_VALUE);
    search.addOrderBy("codeOrder");
    return find(search);
  }
View Full Code Here

TOP

Related Classes of com.iisigroup.cap.dao.utils.ISearch

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.