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

Examples of com.google.code.lightssh.common.dao.SearchCondition


  /**
   * 查询执行计划明细
   */
  public List<PlanDetail> listDetail( Object[] ids ){
    ListPage<PlanDetail> page = new ListPage<PlanDetail>(Integer.MAX_VALUE);
    SearchCondition sc = new SearchCondition();
    sc.in("id",ids);
   
    page.addAscending("sequence");
    this.planDetailDao.list(page,sc);
   
    return page.getList();
View Full Code Here


  public Plan getLastByType(String type){
    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

   
    return ec;
  }
 
  public ListPage<EmailContent> list(ListPage<EmailContent> page,EmailContent t ) {
    SearchCondition sc = new SearchCondition();
    if( t != null ){
      if( t.getType() != null)
        sc.equal("type",t.getType() );
     
      if( t.getStatus() != null )
        sc.equal("status",t.getStatus() );
     
      if( !StringUtils.isEmpty(t.getAddressee()) )
        sc.like("addressee",t.getAddressee() );
       
    }
   
    if(page == null )
      page = new ListPage<EmailContent>();
View Full Code Here

  public int publish( ReceiveType type,String value,String msgId ){
    return getDao().publish(type, value, msgId);
  }
 
  public ListPage<Publish> list(ListPage<Publish> page ,Publish t){
    SearchCondition sc = new SearchCondition();
    if( t != null ){
      if( t.getUser() != null && t.getUser().getId() != null ){
        sc.equal("user.id", t.getUser().getId() );
      }
     
      if( t.getPeriod() != null ){
        Calendar cal = Calendar.getInstance();
        Date start = t.getPeriod().getStart();
        Date end = t.getPeriod().getEnd();
       
        if( start != null ){
          cal.setTime(start);
          sc.greateThanOrEqual("createdTime",cal);
        }
       
        if( end != null ){
          Calendar cal_end = Calendar.getInstance();
          cal_end.setTime(end);
          cal_end.add(Calendar.DAY_OF_MONTH, 1);
          cal_end.add(Calendar.SECOND, -1);
          sc.lessThanOrEqual("createdTime",cal_end);
        }
      }
     
      if( t.getRead() != null ){
        if( Boolean.TRUE.equals( t.getRead() ) )
          sc.isNotNull("readTime");
        else
          sc.isNull("readTime");
      }
     
      if( t.getMessage() != null ){
        Message msg = t.getMessage();
       
        if( StringUtils.isNotEmpty( msg.getTitle() ) ){
          sc.like("message.title", msg.getTitle().trim() );
        }
       
        if( StringUtils.isNotEmpty( msg.getCreator() ) ){
          sc.equal("message.creator", msg.getCreator().trim() );
        }
      }
    }
   
    return dao.list(page, sc);
View Full Code Here

  public ColumnTableDao getDao( ){
    return (ColumnTableDao)this.dao;
  }
 
  public ListPage<ColumnTable> list( ListPage<ColumnTable> page, ColumnTable t){
    SearchCondition sc = new SearchCondition();
    if( t != null ){
      if( StringUtils.isNotEmpty(t.getId()) )
        sc.like("id", t.getId().trim() );
     
      if( StringUtils.isNotEmpty(t.getName()) )
        sc.like("name", t.getName().trim() );
    }
   
    return super.list(page, sc);
  }
View Full Code Here

   */
  public List<ColumnItem> listItems( String colTabId ){
    if( StringUtils.isEmpty(colTabId) )
      return null;
   
    SearchCondition sc = new SearchCondition();
    ListPage<ColumnItem> page = new ListPage<ColumnItem>(Integer.MAX_VALUE);
    sc.equal("table.id", colTabId.trim() );
    page = columnItemDao.list(page,sc);
   
    return page.getList();
  }
View Full Code Here

  public List<LoginAccount> listByIds(Object[] ids ){
    if( ids == null )
      return null;
   
    ListPage<LoginAccount> page = new ListPage<LoginAccount>(100);
    SearchCondition sc = new SearchCondition();
    sc.in("id", ids);
   
    return getDao().list(page, sc).getList();
  }
View Full Code Here

    loginAccountChangeManager.updateStatus(change.getId()
        ,EntityChange.Status.NEW,EntityChange.Status.FINISHED);
  }
 
  public ListPage<LoginAccountAudit> list(ListPage<LoginAccountAudit> page,LoginAccountAudit t){
    SearchCondition sc = new SearchCondition();
    if( t != null ){
      if( t.getLoginAccountChange() != null ){
        LoginAccount account = t.getLoginAccountChange().getLoginAccount();
        if( account != null ){
          if( !StringUtils.isEmpty(account.getLoginName()) ){
            sc.like("loginAccountChange.loginAccount.loginName", account.getLoginName().trim());
          }
        }
      }
    }
   
View Full Code Here

    super.dao = dao;
  }

  public ListPage<LoginLog> list(ListPage<LoginLog> page,LoginLog t ) {
    page.addDescending("createdTime");
    SearchCondition sc = new SearchCondition();
    if( t != null ){
      if( StringUtil.clean(t.getOperator()) != null )
        sc.like("operator",t.getOperator() );
     
      if( StringUtil.clean(t.getIp()) != null )
        sc.like("ip",t.getIp() );
     
      if( t.get_period() != null ){
        Calendar cal = Calendar.getInstance();
        Date start = t.get_period().getStart();
        Date end = t.get_period().getEnd();
       
        if( start != null ){
          cal.setTime(start);
          sc.greateThanOrEqual("createdTime",cal);
        }
       
        if( end != null ){
          Calendar cal_end = Calendar.getInstance();
          cal_end.setTime(end);
          cal_end.add(Calendar.DAY_OF_MONTH, 1);
          cal_end.add(Calendar.SECOND, -1);
          sc.lessThanOrEqual("createdTime",cal_end);
        }
      }
    }
    return dao.list(page,sc);
  }
View Full Code Here

  /**
   * 待审核列表
   */
  public ListPage<Role> listTodoAudit(ListPage<Role> page,Role role){
    SearchCondition sc = new SearchCondition();
    if( role != null ){
      if( !StringUtils.isEmpty(role.getName()) ){
        sc.like("name", role.getName());
      }
     
    }
    //sc.in("status",Role.Status.NEW.name(),Role.Status.AUDIT_REJECT.name());
    sc.equal("status",AuditStatus.NEW);
   
    return getRoleDao().list(page,sc);
  }
View Full Code Here

TOP

Related Classes of com.google.code.lightssh.common.dao.SearchCondition

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.