Package com.google.code.lightssh.common.dao

Examples of com.google.code.lightssh.common.dao.SearchCondition.equal()


  @Override
  public SystemParam getByName(String name) {
    ListPage<SystemParam> page = new ListPage<SystemParam>(1);
    SearchCondition sc = new SearchCondition();
    sc.equal("name", name );
    page = dao.list(page, sc);
   
    return (page.getList()==null||page.getList().isEmpty())
      ?null:page.getList().get(0);
  }
View Full Code Here


 
  @Override
  public SystemParam getByGroupAndName(String group, String name) {
    ListPage<SystemParam> page = new ListPage<SystemParam>(1);
    SearchCondition sc = new SearchCondition();
    sc.equal("name", name );
    sc.equal("group", group );
    page = dao.list(page, sc);
   
    return (page.getList()==null||page.getList().isEmpty())
      ?null:page.getList().get(0);
View Full Code Here

  @Override
  public SystemParam getByGroupAndName(String group, String name) {
    ListPage<SystemParam> page = new ListPage<SystemParam>(1);
    SearchCondition sc = new SearchCondition();
    sc.equal("name", name );
    sc.equal("group", group );
    page = dao.list(page, sc);
   
    return (page.getList()==null||page.getList().isEmpty())
      ?null:page.getList().get(0);
  }
View Full Code Here

  @Override
  public List<SystemParam> listByGroup(String group) {
    ListPage<SystemParam> page = new ListPage<SystemParam>( );
    SearchCondition sc = new SearchCondition();
    sc.equal("group", group );
    page = dao.list(page, sc);
   
    return page.getList();
  }
View Full Code Here

    String group = StringUtil.clean(param.getGroup())==null
      ?SystemParam.DEFAULT_GROUP_NAME:param.getGroup();
   
    ListPage<SystemParam> page = new ListPage<SystemParam>(1);
    SearchCondition sc = new SearchCondition();
    sc.equal("group", group ).equal("name",param.getName() );
    page = dao.list(page, sc);
   
    SystemParam exists = (page.getList()==null||page.getList().isEmpty())
      ?null:page.getList().get(0);
 
View Full Code Here

  @Override
  public int getJobQueueSize( String jobTypeId ){
    ListPage<JobQueue> page = new ListPage<JobQueue>(0);
    SearchCondition sc = new SearchCondition();
    if( !StringUtils.isEmpty(jobTypeId) ){
      sc.equal("type.id", jobTypeId.trim() );
    }
    page = dao.list(page, sc);
   
    return page.getAllSize();
  }
View Full Code Here

   
    SearchCondition sc = new SearchCondition();
    if( t != null ){
      if( t.getType() != null ){
        if( !StringUtils.isEmpty(t.getType().getId()) ){
          sc.equal("type.id", t.getType().getId().trim() );
        }
      }
     
      //...
    }
View Full Code Here

   */
  @Deprecated
  protected int getUnsuccessfulCount(String planId,String planDetailId ){
    ListPage<PlanDetail> page = new ListPage<PlanDetail>(0);
    SearchCondition sc = new SearchCondition();
    sc.equal("plan.id", planId);
    sc.notEqual("id", planDetailId);
    sc.notEqual("status", Status.SUCCESS );
   
    page = planDetailDao.list(page, sc);
   
View Full Code Here

    if( StringUtils.isEmpty(planId) )
      return null;
   
    ListPage<PlanDetail> page = new ListPage<PlanDetail>(Integer.MAX_VALUE);
    SearchCondition sc = new SearchCondition();
    sc.equal("plan.id", planId );
   
    page.addAscending("sequence");
    page = this.planDetailDao.list(page, sc);
   
    return page.getList();
View Full Code Here

    ifStringUtils.isEmpty(type) )
      return null;
   
    ListPage<Plan> page = new ListPage<Plan>(1);
    SearchCondition sc = new SearchCondition();
    sc.equal("type.id", type );
   
    page.addDescending("createdTime");
   
    return dao.list(page, sc).getFirst();
  }
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.