Tabnine Logo
PropertyExpression
Code IndexAdd Tabnine to your IDE (free)

How to use
PropertyExpression
in
org.hibernate.criterion

Best Java code snippets using org.hibernate.criterion.PropertyExpression (Showing top 20 results out of 315)

origin: hibernate/hibernate-orm

/**
 * Apply a "greater than or equal" constraint to two properties
 *
 * @param propertyName One property name
 * @param otherPropertyName The other property name
 *
 * @return The Criterion
 *
 * @see PropertyExpression
 */
public static PropertyExpression geProperty(String propertyName, String otherPropertyName) {
  return new PropertyExpression( propertyName, otherPropertyName, ">=" );
}
origin: hibernate/hibernate-orm

@Override
public String toString() {
  return propertyName + getOp() + otherPropertyName;
}
origin: hibernate/hibernate-orm

/**
 * Apply an "equal" constraint to two properties
 *
 * @param propertyName One property name
 * @param otherPropertyName The other property name
 *
 * @return The Criterion
 *
 * @see PropertyExpression
 */
public static PropertyExpression eqProperty(String propertyName, String otherPropertyName) {
  return new PropertyExpression( propertyName, otherPropertyName, "=" );
}
origin: hibernate/hibernate-orm

@Override
public String toSqlString(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException {
  final String[] lhsColumns = criteriaQuery.findColumns( propertyName, criteria );
  final String[] rhsColumns = criteriaQuery.findColumns( otherPropertyName, criteria );
  final String[] comparisons = StringHelper.add( lhsColumns, getOp(), rhsColumns );
  if ( comparisons.length > 1 ) {
    return '(' + String.join( " and ", comparisons ) + ')';
  }
  else {
    return comparisons[0];
  }
}
origin: hibernate/hibernate-orm

/**
 * Apply a "less than" constraint to two properties
 *
 * @param propertyName One property name
 * @param otherPropertyName The other property name
 *
 * @return The Criterion
 *
 * @see PropertyExpression
 */
public static PropertyExpression ltProperty(String propertyName, String otherPropertyName) {
  return new PropertyExpression( propertyName, otherPropertyName, "<" );
}
origin: hibernate/hibernate

public String toString() {
  return propertyName + getOp() + otherPropertyName;
}
origin: hibernate/hibernate-orm

/**
 * Apply a "not equal" constraint to two properties
 *
 * @param propertyName One property name
 * @param otherPropertyName The other property name
 *
 * @return The Criterion
 *
 * @see PropertyExpression
 */
public static PropertyExpression neProperty(String propertyName, String otherPropertyName) {
  return new PropertyExpression( propertyName, otherPropertyName, "<>" );
}
origin: org.hibernate/com.springsource.org.hibernate

public String toString() {
  return propertyName + getOp() + otherPropertyName;
}
origin: hibernate/hibernate-orm

/**
 * Apply a "greater than" constraint to two properties
 *
 * @param propertyName One property name
 * @param otherPropertyName The other property name
 *
 * @return The Criterion
 *
 * @see PropertyExpression
 */
public static PropertyExpression gtProperty(String propertyName, String otherPropertyName) {
  return new PropertyExpression( propertyName, otherPropertyName, ">" );
}
origin: jboss.jboss-embeddable-ejb3/hibernate-all

public String toString() {
  return propertyName + getOp() + otherPropertyName;
}
origin: hibernate/hibernate-orm

/**
 * Apply a "less than or equal" constraint to two properties
 *
 * @param propertyName One property name
 * @param otherPropertyName The other property name
 *
 * @return The Criterion
 *
 * @see PropertyExpression
 */
public static PropertyExpression leProperty(String propertyName, String otherPropertyName) {
  return new PropertyExpression( propertyName, otherPropertyName, "<=" );
}
origin: org.hibernate/com.springsource.org.hibernate.core

public String toString() {
  return propertyName + getOp() + otherPropertyName;
}
origin: jboss.jboss-embeddable-ejb3/hibernate-all

/**
 * Apply a "greater than or equal" constraint to two properties
 */
public static PropertyExpression geProperty(String propertyName, String otherPropertyName) {
  return new PropertyExpression(propertyName, otherPropertyName, ">=");
}
/**
origin: jboss.jboss-embeddable-ejb3/hibernate-all

public String toSqlString(Criteria criteria, CriteriaQuery criteriaQuery) 
throws HibernateException {
  String[] xcols = criteriaQuery.getColumnsUsingProjection(criteria, propertyName);
  String[] ycols = criteriaQuery.getColumnsUsingProjection(criteria, otherPropertyName);
  String result = StringHelper.join(
    " and ",
    StringHelper.add(xcols, getOp(), ycols)
  );
  if (xcols.length>1) result = '(' + result + ')';
  return result;
  //TODO: get SQL rendering out of this package!
}
origin: org.hibernate/com.springsource.org.hibernate

/**
 * Apply a "less than or equal" constraint to two properties
 */
public static PropertyExpression leProperty(String propertyName, String otherPropertyName) {
  return new PropertyExpression(propertyName, otherPropertyName, "<=");
}
/**
origin: org.hibernate/com.springsource.org.hibernate.core

public String toSqlString(Criteria criteria, CriteriaQuery criteriaQuery) 
throws HibernateException {
  String[] xcols = criteriaQuery.findColumns(propertyName, criteria);
  String[] ycols = criteriaQuery.findColumns(otherPropertyName, criteria);
  String result = StringHelper.join(
    " and ",
    StringHelper.add( xcols, getOp(), ycols )
  );
  if (xcols.length>1) result = '(' + result + ')';
  return result;
  //TODO: get SQL rendering out of this package!
}
origin: org.hibernate/com.springsource.org.hibernate.core

/**
 * Apply a "greater than" constraint to two properties
 */
public static PropertyExpression gtProperty(String propertyName, String otherPropertyName) {
  return new PropertyExpression(propertyName, otherPropertyName, ">");
}
/**
origin: hibernate/hibernate

public String toSqlString(Criteria criteria, CriteriaQuery criteriaQuery) 
throws HibernateException {
  String[] xcols = criteriaQuery.getColumnsUsingProjection(criteria, propertyName);
  String[] ycols = criteriaQuery.getColumnsUsingProjection(criteria, otherPropertyName);
  String result = StringHelper.join(
    " and ",
    StringHelper.add(xcols, getOp(), ycols)
  );
  if (xcols.length>1) result = '(' + result + ')';
  return result;
  //TODO: get SQL rendering out of this package!
}
origin: hibernate/hibernate

/**
 * Apply an "equal" constraint to two properties
 */
public static PropertyExpression eqProperty(String propertyName, String otherPropertyName) {
  return new PropertyExpression(propertyName, otherPropertyName, "=");
}
/**
origin: org.hibernate/com.springsource.org.hibernate

public String toSqlString(Criteria criteria, CriteriaQuery criteriaQuery) 
throws HibernateException {
  String[] xcols = criteriaQuery.findColumns(propertyName, criteria);
  String[] ycols = criteriaQuery.findColumns(otherPropertyName, criteria);
  String result = StringHelper.join(
    " and ",
    StringHelper.add( xcols, getOp(), ycols )
  );
  if (xcols.length>1) result = '(' + result + ')';
  return result;
  //TODO: get SQL rendering out of this package!
}
org.hibernate.criterionPropertyExpression

Javadoc

superclass for comparisons between two properties (with SQL binary operators)

Most used methods

  • <init>
  • getOp

Popular in Java

  • Parsing JSON documents to java classes using gson
  • startActivity (Activity)
  • onCreateOptionsMenu (Activity)
  • runOnUiThread (Activity)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Top 15 Vim Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now