Package org.hibernate.ejb.criteria.predicate

Examples of org.hibernate.ejb.criteria.predicate.CompoundPredicate


  /**
   * {@inheritDoc}
   */
  public Predicate and(Expression<Boolean> x, Expression<Boolean> y) {
    return new CompoundPredicate( this, Predicate.BooleanOperator.AND, x, y );
  }
View Full Code Here


  /**
   * {@inheritDoc}
   */
  public Predicate or(Expression<Boolean> x, Expression<Boolean> y) {
    return new CompoundPredicate( this, Predicate.BooleanOperator.OR, x, y );
  }
View Full Code Here

  /**
   * {@inheritDoc}
   */
  public Predicate and(Predicate... restrictions) {
    return new CompoundPredicate( this, Predicate.BooleanOperator.AND, restrictions );
  }
View Full Code Here

  /**
   * {@inheritDoc}
   */
  public Predicate or(Predicate... restrictions) {
    return new CompoundPredicate( this, Predicate.BooleanOperator.OR, restrictions );
  }
View Full Code Here

  /**
   * {@inheritDoc}
   */
  public Predicate conjunction() {
    return new CompoundPredicate( this, Predicate.BooleanOperator.AND );
  }
View Full Code Here

  /**
   * {@inheritDoc}
   */
  public Predicate disjunction() {
    return new CompoundPredicate( this, Predicate.BooleanOperator.OR );
  }
View Full Code Here

  /**
   * {@inheritDoc}
   */
  public Predicate isTrue(Expression<Boolean> expression) {
    if ( CompoundPredicate.class.isInstance( expression ) ) {
      final CompoundPredicate predicate = (CompoundPredicate) expression;
      if ( predicate.getExpressions().size() == 0 ) {
        return new BooleanStaticAssertionPredicate(
            this,
            predicate.getOperator() == Predicate.BooleanOperator.AND
        );
      }
      return predicate;
    }
    else if ( Predicate.class.isInstance( expression ) ) {
View Full Code Here

  /**
   * {@inheritDoc}
   */
  public Predicate isFalse(Expression<Boolean> expression) {
    if ( CompoundPredicate.class.isInstance( expression ) ) {
      final CompoundPredicate predicate = (CompoundPredicate) expression;
      if ( predicate.getExpressions().size() == 0 ) {
        return new BooleanStaticAssertionPredicate(
            this,
            predicate.getOperator() == Predicate.BooleanOperator.OR
        );
      }
      predicate.not();
      return predicate;
    }
    else if ( Predicate.class.isInstance( expression ) ) {
      final Predicate predicate = (Predicate) expression;
      predicate.not();
      return predicate;
    }
    return new BooleanAssertionPredicate( this, expression, Boolean.FALSE );
  }
View Full Code Here

  /**
   * {@inheritDoc}
   */
  public Predicate and(Expression<Boolean> x, Expression<Boolean> y) {
    return new CompoundPredicate( this, Predicate.BooleanOperator.AND, x, y );
  }
View Full Code Here

  /**
   * {@inheritDoc}
   */
  public Predicate or(Expression<Boolean> x, Expression<Boolean> y) {
    return new CompoundPredicate( this, Predicate.BooleanOperator.OR, x, y );
  }
View Full Code Here

TOP

Related Classes of org.hibernate.ejb.criteria.predicate.CompoundPredicate

Copyright © 2018 www.massapicom. 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.