org.hibernate.envers.tools.query
Class Parameters

java.lang.Object
  extended by org.hibernate.envers.tools.query.Parameters

public class Parameters
extends Object

Parameters of a query, built using QueryBuilder.

Author:
Adam Warski (adam at warski dot org)

Field Summary
static String AND
           
static String OR
           
 
Method Summary
 Parameters addNegatedParameters()
          Adds negated parameters, by default with the "and" connective.
 void addNotNullRestriction(String propertyName, boolean addAlias)
          Adds IS NOT NULL restriction.
 void addNullRestriction(String propertyName, boolean addAlias)
          Adds IS NULL restriction.
 Parameters addSubParameters(String newConnective)
          Adds sub-parameters with a new connective.
 void addWhere(String left, boolean addAlias, String op, QueryBuilder right)
           
 void addWhere(String left, boolean addAliasLeft, String op, String right, boolean addAliasRight)
           
 void addWhere(String left, String op, QueryBuilder right)
           
 void addWhere(String left, String op, String right)
           
 void addWhereWithNamedParam(String left, boolean addAlias, String op, String paramName)
           
 void addWhereWithNamedParam(String left, String op, String paramName)
           
 void addWhereWithParam(String left, boolean addAlias, String op, Object paramValue)
           
 void addWhereWithParam(String left, String op, Object paramValue)
           
 void addWhereWithParams(String left, String opStart, Object[] paramValues, String opEnd)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AND

public static final String AND
See Also:
Constant Field Values

OR

public static final String OR
See Also:
Constant Field Values
Method Detail

addSubParameters

public Parameters addSubParameters(String newConnective)
Adds sub-parameters with a new connective. That is, the parameters will be grouped in parentheses in the generated query, e.g.: ... and (exp1 or exp2) and ..., assuming the old connective is "and", and the new connective is "or".

Parameters:
newConnective - New connective of the parameters.
Returns:
Sub-parameters with the given connective.

addNegatedParameters

public Parameters addNegatedParameters()
Adds negated parameters, by default with the "and" connective. These paremeters will be grouped in parentheses in the generated query and negated, e.g. ... not (exp1 and exp2) ...

Returns:
Negated sub paremters.

addWhere

public void addWhere(String left,
                     String op,
                     String right)

addNullRestriction

public void addNullRestriction(String propertyName,
                               boolean addAlias)
Adds IS NULL restriction.

Parameters:
propertyName - Property name.
addAlias - Positive if an alias to property name shall be added.

addNotNullRestriction

public void addNotNullRestriction(String propertyName,
                                  boolean addAlias)
Adds IS NOT NULL restriction.

Parameters:
propertyName - Property name.
addAlias - Positive if an alias to property name shall be added.

addWhere

public void addWhere(String left,
                     boolean addAliasLeft,
                     String op,
                     String right,
                     boolean addAliasRight)

addWhereWithParam

public void addWhereWithParam(String left,
                              String op,
                              Object paramValue)

addWhereWithParam

public void addWhereWithParam(String left,
                              boolean addAlias,
                              String op,
                              Object paramValue)

addWhereWithNamedParam

public void addWhereWithNamedParam(String left,
                                   String op,
                                   String paramName)

addWhereWithNamedParam

public void addWhereWithNamedParam(String left,
                                   boolean addAlias,
                                   String op,
                                   String paramName)

addWhereWithParams

public void addWhereWithParams(String left,
                               String opStart,
                               Object[] paramValues,
                               String opEnd)

addWhere

public void addWhere(String left,
                     String op,
                     QueryBuilder right)

addWhere

public void addWhere(String left,
                     boolean addAlias,
                     String op,
                     QueryBuilder right)


Copyright © 2001-2010 Red Hat, Inc. All Rights Reserved.