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

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

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

Restrictions.gtProperty介绍

[英]Apply a "greater than" constraint to two properties
[中]对两个特性应用“大于”约束

代码示例

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/**
 * Creates a Criterion that tests if the first property is greater than 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 gtProperty(String propertyName, String otherPropertyName) {
  if (!validateSimpleExpression()) {
    throwRuntimeException(new IllegalArgumentException("Call to [gtProperty] with propertyName [" +
        propertyName + "] and other property name [" + otherPropertyName + "] not allowed here."));
  }
  propertyName = calculatePropertyName(propertyName);
  otherPropertyName = calculatePropertyName(otherPropertyName);
  addToCriteria(Restrictions.gtProperty(propertyName, otherPropertyName));
  return this;
}

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

/**
 * Creates a Criterion that tests if the first property is greater than 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 gtProperty(String propertyName, String otherPropertyName) {
  if (!validateSimpleExpression()) {
    throwRuntimeException(new IllegalArgumentException("Call to [gtProperty] with propertyName [" +
        propertyName + "] and other property name [" + otherPropertyName + "] not allowed here."));
  }
  propertyName = calculatePropertyName(propertyName);
  otherPropertyName = calculatePropertyName(otherPropertyName);
  addToCriteria(Restrictions.gtProperty(propertyName, otherPropertyName));
  return this;
}

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

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

相关文章