当前位置: 首页>>代码示例>>Java>>正文


Java SingleValuedPredicate.getPropertyPath方法代码示例

本文整理汇总了Java中org.kuali.rice.core.api.criteria.SingleValuedPredicate.getPropertyPath方法的典型用法代码示例。如果您正苦于以下问题:Java SingleValuedPredicate.getPropertyPath方法的具体用法?Java SingleValuedPredicate.getPropertyPath怎么用?Java SingleValuedPredicate.getPropertyPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.kuali.rice.core.api.criteria.SingleValuedPredicate的用法示例。


在下文中一共展示了SingleValuedPredicate.getPropertyPath方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addSingleValuePredicate

import org.kuali.rice.core.api.criteria.SingleValuedPredicate; //导入方法依赖的package包/类
/**
   * Adds a single valued predicate to a criteria.
   *
   * @param p the single valued predicate to add.
   * @param parent the parent criteria to add to.
   */
  protected void addSingleValuePredicate(SingleValuedPredicate p, C parent) {
final Object value = getVal(p.getValue());
      final String pp = p.getPropertyPath();
      if (p instanceof EqualPredicate) {
          addEqualTo(parent, pp, value);
      } else if (p instanceof EqualIgnoreCasePredicate) {
          addEqualToIgnoreCase(parent, pp, (String) value);
      } else if (p instanceof GreaterThanOrEqualPredicate) {
          addGreaterOrEqualTo(parent, pp, value);
      } else if (p instanceof GreaterThanPredicate) {
          addGreaterThan(parent, pp, value);
      } else if (p instanceof LessThanOrEqualPredicate) {
          addLessOrEqualTo(parent, pp, value);
      } else if (p instanceof LessThanPredicate) {
          addLessThan(parent, pp, value);
      } else if (p instanceof LikePredicate) {
          //no need to convert * or ? since ojb handles the conversion/escaping
          addLike(parent, pp, value);
      } else if(p instanceof LikeIgnoreCasePredicate){
          addLikeIgnoreCase(parent,pp,(String)value);
      } else if (p instanceof NotEqualPredicate) {
          addNotEqualTo(parent, pp, value);
      } else if (p instanceof NotEqualIgnoreCasePredicate) {
          addNotEqualToIgnoreCase(parent, pp, (String) value);
} else if (p instanceof NotLikeIgnoreCasePredicate) {
	addNotLikeIgnoreCase(parent, pp, (String) value);
      } else if (p instanceof NotLikePredicate) {
          addNotLike(parent, pp, value);
      } else {
          throw new UnsupportedPredicateException(p);
      }
  }
 
开发者ID:kuali,项目名称:kc-rice,代码行数:39,代码来源:QueryTranslatorBase.java

示例2: addSingleValuePredicate

import org.kuali.rice.core.api.criteria.SingleValuedPredicate; //导入方法依赖的package包/类
/** adds a single valued predicate to a Criteria. */
private void addSingleValuePredicate(SingleValuedPredicate p, Criteria parent) {
    final Object value = getVal(p.getValue());
    final String pp = p.getPropertyPath();
    if (p instanceof EqualPredicate) {
        parent.addEqualTo(pp, value);
    } else if (p instanceof EqualIgnoreCasePredicate) {
        parent.addEqualTo(genUpperFunc(pp), ((String) value).toUpperCase());
    } else if (p instanceof GreaterThanOrEqualPredicate) {
        parent.addGreaterOrEqualThan(pp, value);
    } else if (p instanceof GreaterThanPredicate) {
        parent.addGreaterThan(pp, value);
    } else if (p instanceof LessThanOrEqualPredicate) {
        parent.addLessOrEqualThan(pp, value);
    } else if (p instanceof LessThanPredicate) {
        parent.addLessThan(pp, value);
    } else if (p instanceof LikePredicate) {
        //no need to convert * or ? since ojb handles the conversion/escaping
        parent.addLike(genUpperFunc(pp), ((String) value).toUpperCase());
    } else if (p instanceof NotEqualPredicate) {
        parent.addNotEqualTo(pp, value);
    } else if (p instanceof NotEqualIgnoreCasePredicate) {
        parent.addNotEqualTo(genUpperFunc(pp), ((String) value).toUpperCase());
    } else if (p instanceof NotLikePredicate) {
        parent.addNotLike(pp, value);
    } else {
        throw new UnsupportedPredicateException(p);
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:30,代码来源:CriteriaLookupDaoOjb.java

示例3: addSingleValuePredicate

import org.kuali.rice.core.api.criteria.SingleValuedPredicate; //导入方法依赖的package包/类
/** adds a single valued predicate to a Criteria. */
private void addSingleValuePredicate(SingleValuedPredicate p, Criteria parent) {
    final Object value = getVal(p.getValue());
    final String pp = p.getPropertyPath();
    if (p instanceof EqualPredicate) {
        parent.eq(pp, value);
    } else if (p instanceof EqualIgnoreCasePredicate) {
        parent.eq(genUpperFunc(pp), ((String) value).toUpperCase());
    } else if (p instanceof GreaterThanOrEqualPredicate) {
        parent.gte(pp, value);
    } else if (p instanceof GreaterThanPredicate) {
        parent.gt(pp, value);
    } else if (p instanceof LessThanOrEqualPredicate) {
        parent.lte(pp, value);
    } else if (p instanceof LessThanPredicate) {
        parent.lt(pp, value);
    } else if (p instanceof LikePredicate) {
        //no need to convert * or ? since ojb handles the conversion/escaping
        parent.like(pp, value);
    } else if (p instanceof NotEqualPredicate) {
        parent.ne(pp, value);
    } else if (p instanceof NotEqualIgnoreCasePredicate) {
        parent.ne(genUpperFunc(pp), ((String) value).toUpperCase());
    } else if (p instanceof NotLikePredicate) {
        parent.notLike(pp, value);
    } else {
        throw new UnsupportedPredicateException(p);
    }
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:30,代码来源:CriteriaLookupDaoJpa.java


注:本文中的org.kuali.rice.core.api.criteria.SingleValuedPredicate.getPropertyPath方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。