/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2013, Red Hat Inc. or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors. All third-party contributions are
* distributed under license by Red Hat Inc.
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.jpa.criteria.predicate;
import javax.persistence.criteria.Predicate;
import org.hibernate.jpa.criteria.CriteriaBuilderImpl;
import org.hibernate.jpa.criteria.Renderable;
import org.hibernate.jpa.criteria.compile.RenderingContext;
Author: Steve Ebersole
/**
* @author Steve Ebersole
*/
public interface PredicateImplementor extends Predicate, Renderable {
Access to the CriteriaBuilder
Returns: The CriteriaBuilder
/**
* Access to the CriteriaBuilder
*
* @return The CriteriaBuilder
*/
public CriteriaBuilderImpl criteriaBuilder();
Is this a conjunction or disjunction?
Returns: true
if this predicate is a junction (AND/OR); false
otherwise
/**
* Is this a conjunction or disjunction?
*
* @return {@code true} if this predicate is a junction (AND/OR); {@code false} otherwise
*/
public boolean isJunction();
Form of Renderable.render
used when the predicate is wrapped in a negated wrapper. Allows passing down the negation flag.
Note that this form is no-op in compound (junction) predicates. The reason being that compound predicates
are more complex and the negation is applied during its creation.
Params: - isNegated – Should the predicate be negated.
- renderingContext – The context for rendering
Returns: The rendered predicate fragment.
/**
* Form of {@link Renderable#render} used when the predicate is wrapped in a negated wrapper. Allows passing
* down the negation flag.
* <p/>
* Note that this form is no-op in compound (junction) predicates. The reason being that compound predicates
* are more complex and the negation is applied during its creation.
*
* @param isNegated Should the predicate be negated.
* @param renderingContext The context for rendering
*
* @return The rendered predicate fragment.
*/
public String render(boolean isNegated, RenderingContext renderingContext);
}