Examples of Criteria


Examples of com.cloud.server.Criteria

    private List<CapacityVO> sumCapacities(List<? extends Capacity> hostCapacities) {
        Map<String, Long> totalCapacityMap = new HashMap<String, Long>();
        Map<String, Long> usedCapacityMap = new HashMap<String, Long>();

        Set<Long> poolIdsToIgnore = new HashSet<Long>();
        Criteria c = new Criteria();
        // TODO: implement
        List<? extends StoragePoolVO> allStoragePools = ApiDBUtils.searchForStoragePools(c);
        for (StoragePoolVO pool : allStoragePools) {
            StoragePoolType poolType = pool.getPoolType();
            if (!(poolType.isShared())) {// All the non shared storages
View Full Code Here

Examples of com.datasalt.pangool.tuplemr.Criteria

    if(isMultipleSources) {
      int schemaId1 = tupleMRConf.getSchemaIdByName(w1.getSchema().getName());
      int schemaId2 = tupleMRConf.getSchemaIdByName(w2.getSchema().getName());
      int[] indexes1 = serInfo.getCommonSchemaIndexTranslation(schemaId1);
      int[] indexes2 = serInfo.getCommonSchemaIndexTranslation(schemaId2);
      Criteria c = tupleMRConf.getCommonCriteria();
      int comparison = compare(serInfo.getCommonSchema(), c, w1, indexes1, w2, indexes2,serInfo.getCommonSchemaSerializers());
      if(comparison != 0) {
        return comparison;
      } else if(schemaId1 != schemaId2) {
        int r = schemaId1 - schemaId2;
        return (tupleMRConf.getSchemasOrder() == Order.ASC) ? r : -r;
      }
      int schemaId = schemaId1;
      c = tupleMRConf.getSpecificOrderBys().get(schemaId);
      if(c != null) {
        int[] indexes = serInfo.getSpecificSchemaIndexTranslation(schemaId);
        return compare(serInfo.getSpecificSchema(schemaId), c, w1, indexes, w2, indexes,serInfo.getSpecificSchemaSerializers().get(schemaId));
      } else {
        return 0;
      }
    } else {
      int[] indexes = serInfo.getCommonSchemaIndexTranslation(0);
      Criteria c = tupleMRConf.getCommonCriteria();
      return compare(serInfo.getCommonSchema(), c, w1, indexes, w2, indexes,serInfo.getCommonSchemaSerializers());
    }

  }
View Full Code Here

Examples of com.dotmarketing.business.query.Criteria

        } catch (Exception e) {
            Logger.error(ESContentFactoryImpl.class,e.getMessage(),e);
            throw new DotDataException(e.getMessage(), e);
        }
        List<Map<String, Serializable>> res = new ArrayList<Map<String,Serializable>>();
        Criteria c = query.getCriteria();
        StringBuilder bob = new StringBuilder();
        List<Object> params = null;

        bob.append("SELECT ");
        if(UtilMethods.isSet(query.getSelectAttributes())){
View Full Code Here

Examples of com.eatle.persistent.pojo.customer.CustomerCriteria.Criteria

  @Override
  public Pagination findPagination(Map<String, Object> queryMap,
      int currentPage, int pageSize) throws ParseException
  {
    CustomerCriteria customerCriteria = new CustomerCriteria();
     Criteria criteria = customerCriteria.createCriteria();
    // 设置搜索条件参数
    if (queryMap != null)
    {
      if (queryMap.containsKey("loginEmail"))
      {
        criteria.andLoginEmailLike("%" + (String) queryMap.get("loginEmail") + "%");
      }
      if (queryMap.containsKey("mobilePhone"))
      {
        criteria.andMobilePhoneLike("%" + (String) queryMap.get("mobilePhone") + "%");
      }
      if (queryMap.containsKey("isEnabled"))
      {
        criteria.andIsEnabledEqualTo(Short.parseShort((String) queryMap.get("isEnabled")));
      }
      if (queryMap.containsKey("startTime"))
      {
        if(queryMap.containsKey("endTime"))
        {
          criteria.andRegisterTimeBetween(
            new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse((String) queryMap.get("startTime")),
            new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse((String) queryMap.get("endTime")));
        }
        else
        {
          criteria.andRegisterTimeBetween(
            new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse((String) queryMap.get("startTime")),
            new Date());
        }
      }
    }
View Full Code Here

Examples of com.eatle.persistent.pojo.foundation.business.FeedbackCriteria.Criteria

  @Override
  public Pagination findPagination(Map<String, Object> queryMap,
      int currentPage, int pageSize) throws ParseException
  {
    FeedbackCriteria feedbackCriteria = new FeedbackCriteria();
    Criteria criteria = feedbackCriteria.createCriteria();
    // 设置搜索条件参数
    if (queryMap != null)
    {
      if (queryMap != null)
      {
        if (queryMap.containsKey("startTime"))
        {
          if(queryMap.containsKey("endTime"))
          {
            criteria.andSubTimeBetween(
              new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse((String) queryMap.get("startTime")),
              new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse((String) queryMap.get("endTime")));
          }
          else
          {
            criteria.andSubTimeBetween(
              new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse((String) queryMap.get("startTime")),
              new Date());
          }
        }
        if(queryMap.containsKey("handleStatus"))
        {
          criteria.andHandleStatusEqualTo(Short.parseShort((String) queryMap.get("handleStatus")));
        }
        if(queryMap.containsKey("identifyType"))
        {
          criteria.andIdentifyTypeEqualTo(Short.parseShort((String) queryMap.get("identifyType")));
        }
      }
    }
    // 设置分页参数
    feedbackCriteria.setPageSize(pageSize);
View Full Code Here

Examples of com.eatle.persistent.pojo.foundation.business.JoinInformationCriteria.Criteria

  @Override
  public Pagination findPagination(Map<String, Object> queryMap,
      int currentPage, int pageSize) throws ParseException
  {
    JoinInformationCriteria joinInformationCriteria = new JoinInformationCriteria();
    Criteria criteria = joinInformationCriteria.createCriteria();
    // 设置搜索条件参数
    if (queryMap != null)
    {
      if (queryMap != null)
      {
        if (queryMap.containsKey("shopName"))
        {
          criteria.andShopNameLike("%" + (String) queryMap.get("shopName") + "%");
        }
        if (queryMap.containsKey("linkMan"))
        {
          criteria.andLinkManLike("%" + (String) queryMap.get("linkMan") + "%");
        }
        if (queryMap.containsKey("startTime"))
        {
          if(queryMap.containsKey("endTime"))
          {
            criteria.andSubTimeBetween(
              new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse((String) queryMap.get("startTime")),
              new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse((String) queryMap.get("endTime")));
          }
          else
          {
            criteria.andSubTimeBetween(
              new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse((String) queryMap.get("startTime")),
              new Date());
          }
        }
        if(queryMap.containsKey("auditStatus"))
        {
          criteria.andAuditStatusEqualTo(Short.parseShort((String) queryMap.get("auditStatus")));
        }
      }
    }
    // 设置分页参数
    joinInformationCriteria.setPageSize(pageSize);
View Full Code Here

Examples of com.eatle.persistent.pojo.foundation.business.RecommendMerchantCriteria.Criteria

  @Override
  public Pagination findPagination(Map<String, Object> queryMap,
      int currentPage, int pageSize) throws ParseException
  {
    RecommendMerchantCriteria recommendMerchantCriteria = new RecommendMerchantCriteria();
    Criteria criteria = recommendMerchantCriteria.createCriteria();
    // 设置搜索条件参数
    if (queryMap != null)
    {
      if (queryMap != null)
      {
        if (queryMap.containsKey("shopName"))
        {
          criteria.andShopNameLike("%" + (String) queryMap.get("shopName") + "%");
        }
        if (queryMap.containsKey("startTime"))
        {
          if(queryMap.containsKey("endTime"))
          {
            criteria.andSubTimeBetween(
              new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse((String) queryMap.get("startTime")),
              new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse((String) queryMap.get("endTime")));
          }
          else
          {
            criteria.andSubTimeBetween(
              new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse((String) queryMap.get("startTime")),
              new Date());
          }
        }
        if(queryMap.containsKey("handleStatus"))
        {
          criteria.andHandleStatusEqualTo(Short.parseShort((String) queryMap.get("handleStatus")));
        }
      }
    }
    // 设置分页参数
    recommendMerchantCriteria.setPageSize(pageSize);
View Full Code Here

Examples of com.eatle.persistent.pojo.foundation.dictionary.MenuFeatureCriteria.Criteria

  @Override
  public Pagination findPagination(Map<String, Object> queryMap,
      int currentPage, int pageSize)
  {
    MenuFeatureCriteria menuFeatureCriteria = new MenuFeatureCriteria();
    Criteria criteria = menuFeatureCriteria.createCriteria();
    // 设置搜索条件参数
    if (queryMap != null)
    {
      if (queryMap.containsKey("feature"))
      {
        criteria.andFeatureLike("%" + (String) queryMap.get("feature") + "%");
      }
    }
    // 设置分页参数
    menuFeatureCriteria.setPageSize(pageSize);
    menuFeatureCriteria.setStartIndex((currentPage - 1) * pageSize);
 
View Full Code Here

Examples of com.eatle.persistent.pojo.foundation.dictionary.SendRemarkCriteria.Criteria

  @Override
  public Pagination findPagination(Map<String, Object> queryMap,
      int currentPage, int pageSize)
  {
    SendRemarkCriteria sendRemarkCriteria = new SendRemarkCriteria();
    Criteria criteria = sendRemarkCriteria.createCriteria();
    // 设置搜索条件参数
    if (queryMap != null)
    {
      if (queryMap.containsKey("word"))
      {
        criteria.andWordLike("%" + (String) queryMap.get("word") + "%");
      }
    }
    // 设置分页参数
    sendRemarkCriteria.setPageSize(pageSize);
    sendRemarkCriteria.setStartIndex((currentPage - 1) * pageSize);
 
View Full Code Here

Examples of com.eatle.persistent.pojo.foundation.dictionary.ShopTypeCriteria.Criteria

  public int add(ShopType shopType)
  {
    int result = Constants.Base.FAIL;
   
    ShopTypeCriteria shopTypeCriteria = new ShopTypeCriteria();
    Criteria criteria = shopTypeCriteria.createCriteria();
    criteria.andTypeIdentifyEqualTo(shopType.getTypeIdentify());
    List<ShopType> shopTypes = shopTypeMapper.selectByCriteria(shopTypeCriteria);
    if (shopTypes.size() < 1)
    {
      if(shopTypeMapper.insert(shopType) > 0)
      {
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.