org.hibernate.criterion.Restrictions.leProperty()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(6.3k)|赞(0)|评价(0)|浏览(121)

本文整理了Java中org.hibernate.criterion.Restrictions.leProperty方法的一些代码示例,展示了Restrictions.leProperty的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Restrictions.leProperty方法的具体详情如下:
包路径:org.hibernate.criterion.Restrictions
类名称:Restrictions
方法名:leProperty

Restrictions.leProperty介绍

[英]Apply a "less than or equal" constraint to two properties
[中]对两个特性应用“小于或等于”约束

代码示例

代码示例来源:origin: hibernate/hibernate-orm

/**
 * Creates a less-than-or-equal-to restriction between 2 properties
 *
 * @param other The other property to compare against
 *
 * @return The restriction
 *
 * @see Restrictions#leProperty(String, String)
 */
@SuppressWarnings("UnusedDeclaration")
public PropertyExpression leProperty(String other) {
  return Restrictions.leProperty( getPropertyName(), other );
}

代码示例来源:origin: hibernate/hibernate-orm

/**
 * Creates a less-than-or-equal-to restriction between 2 properties
 *
 * @param other The other property to compare against
 *
 * @return The restriction
 *
 * @see Restrictions#leProperty(String, String)
 */
@SuppressWarnings("UnusedDeclaration")
public PropertyExpression leProperty(Property other) {
  return Restrictions.leProperty( getPropertyName(), other.getPropertyName() );
}

代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all

public PropertyExpression leProperty(String other) {
  return Restrictions.leProperty( getPropertyName(), other );
}

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core

public PropertyExpression leProperty(String other) {
  return Restrictions.leProperty( getPropertyName(), other );
}

代码示例来源:origin: hibernate/hibernate

public PropertyExpression leProperty(String other) {
  return Restrictions.leProperty( getPropertyName(), other );
}

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate

public PropertyExpression leProperty(String other) {
  return Restrictions.leProperty( getPropertyName(), other );
}

代码示例来源:origin: org.grails/grails-hibernate

@Override
  public org.hibernate.criterion.Criterion toHibernateCriterion(HibernateQuery hibernateQuery, Query.Criterion criterion, String alias) {
    Query.LessThanEqualsProperty eq = (Query.LessThanEqualsProperty) criterion;
    return Restrictions.leProperty(calculatePropertyName(eq.getProperty(), alias), eq.getOtherProperty());
  }
});

代码示例来源:origin: com.arsframework/ars-database

/**
 * 获取属性小于或等于匹配条件
 *
 * @param property 属性名
 * @param other    属性名
 * @return 条件匹配对象
 */
protected Criterion getPropertyLessEqualCriterion(String property, String other) {
  return Restrictions.leProperty(this.getCriteriaAlias(property), this.getCriteriaAlias(other));
}

代码示例来源:origin: org.grails/grails-datastore-gorm-hibernate-core

@Override
  public Criterion toHibernateCriterion(AbstractHibernateQuery hibernateQuery, Query.LessThanEqualsProperty criterion, String alias) {
    String propertyName = getPropertyName(criterion, alias);
    return Restrictions.leProperty(propertyName, criterion.getOtherProperty());
  }
});

代码示例来源:origin: com.atlassian.hibernate/hibernate.adapter

private static org.hibernate.criterion.Criterion adaptPropertyExpr(final PropertyExpression criterion) {
  final String propertyName = PropertyExpressionV2Reflection.getPropertyName(criterion);
  final String otherPropertyName = PropertyExpressionV2Reflection.getOtherPropertyName(criterion);
  if (criterion instanceof EqPropertyExpression)
    return org.hibernate.criterion.Restrictions.eqProperty(propertyName, otherPropertyName);
  if (criterion instanceof LtPropertyExpression)
    return org.hibernate.criterion.Restrictions.ltProperty(propertyName, otherPropertyName);
  if (criterion instanceof LePropertyExpression)
    return org.hibernate.criterion.Restrictions.leProperty(propertyName, otherPropertyName);
  throw new IllegalArgumentException("Unexpected PropertyExpression criterion: " + criterion.getClass().getName());
}

代码示例来源:origin: hibernate/hibernate

public PropertyExpression leProperty(Property other) {
  return Restrictions.leProperty( getPropertyName(), other.getPropertyName() );
}

代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all

public PropertyExpression leProperty(Property other) {
  return Restrictions.leProperty( getPropertyName(), other.getPropertyName() );
}

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate

public PropertyExpression leProperty(Property other) {
  return Restrictions.leProperty( getPropertyName(), other.getPropertyName() );
}

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core

public PropertyExpression leProperty(Property other) {
  return Restrictions.leProperty( getPropertyName(), other.getPropertyName() );
}

代码示例来源:origin: org.grails/grails-hibernate

/**
 * Creates a Criterion that tests if the first property is less than or equal to the second property
 * @param propertyName The first property name
 * @param otherPropertyName The second property name
 * @return A Criterion instance
 */
public org.grails.datastore.mapping.query.api.Criteria leProperty(String propertyName, String otherPropertyName) {
  if (!validateSimpleExpression()) {
    throwRuntimeException(new IllegalArgumentException("Call to [leProperty] with propertyName [" +
        propertyName + "] and other property name [" + otherPropertyName + "] not allowed here."));
  }
  propertyName = calculatePropertyName(propertyName);
  otherPropertyName = calculatePropertyName(otherPropertyName);
  addToCriteria(Restrictions.leProperty(propertyName, otherPropertyName));
  return this;
}

代码示例来源:origin: org.grails/grails-datastore-gorm-hibernate-core

/**
 * Creates a Criterion that tests if the first property is less than or equal to the second property
 * @param propertyName The first property name
 * @param otherPropertyName The second property name
 * @return A Criterion instance
 */
public org.grails.datastore.mapping.query.api.Criteria leProperty(String propertyName, String otherPropertyName) {
  if (!validateSimpleExpression()) {
    throwRuntimeException(new IllegalArgumentException("Call to [leProperty] with propertyName [" +
        propertyName + "] and other property name [" + otherPropertyName + "] not allowed here."));
  }
  propertyName = calculatePropertyName(propertyName);
  otherPropertyName = calculatePropertyName(otherPropertyName);
  addToCriteria(Restrictions.leProperty(propertyName, otherPropertyName));
  return this;
}

代码示例来源:origin: org.fornax.cartridges/fornax-cartridges-sculptor-framework

return Restrictions.ltProperty(makePathWithAlias(crit.getPropertyFullName()), (String) crit.getFirstOperant());
} else if (Operator.LessThanOrEqualProperty.equals(operator)) {
  return Restrictions.leProperty(makePathWithAlias(crit.getPropertyFullName()), (String) crit.getFirstOperant());
} else if (Operator.GreatThanProperty.equals(operator)) {
  return Restrictions.gtProperty(makePathWithAlias(crit.getPropertyFullName()), (String) crit.getFirstOperant());

相关文章