com.mizar.persistence.jpa.facade
Class QueryBuilder

java.lang.Object
  extended by com.mizar.persistence.jpa.facade.QueryBuilder
Direct Known Subclasses:
TrinidadQueryBuilder

public class QueryBuilder
extends java.lang.Object

This class will be used to provide a generalized set of methods to feed ExpressionBuilder


Field Summary
static int AND
           
static int BEGINS
           
static int BETWEEN
           
static int BEYOND
           
static int CONTAINS
           
static int CURRENCY
           
static int DATE
           
static int ENDS
           
static int EQ
           
static int FLOAT
           
static int GT
           
static int GTEQ
           
static int IGNORE
           
static int LIKE
           
static int LIST
           
static java.util.HashMap<java.lang.Integer,java.lang.String> listTestShortDesc
           
static int LONG
           
static int LT
           
static int LTEQ
           
static int NE
           
static java.util.HashMap<java.lang.Integer,java.lang.String> numericTestShortDesc
           
static int OMITS
           
static java.util.ArrayList<java.lang.String> operators
           
static int OR
           
static int STRING
           
static java.util.HashMap<java.lang.Integer,java.lang.String> stringTestShortDesc
           
 
Constructor Summary
QueryBuilder()
           
QueryBuilder(java.lang.Class beanClass)
           
QueryBuilder(java.lang.Class beanClass, oracle.spatial.geometry.JGeometry searchArea)
           
QueryBuilder(java.lang.String title)
           
 
Method Summary
 QueryFragment addFragment(QueryFragment fragment)
           
 QueryFragment addFragment(java.lang.String propertyName)
           
 QueryFragment addFragment(java.lang.String propertyName, boolean forceUpperCase, boolean forceTrailingWildCard)
           
 QueryFragment addFragment(java.lang.String propertyName, int test)
           
 QueryFragment addFragment(java.lang.String propertyName, int test, java.lang.Object value)
           
 QueryFragment addFragment(java.lang.String propertyName, int test, java.lang.Object value1, java.lang.Object value2)
           
 QueryFragment addFragment(java.lang.String label, java.lang.String propertyName)
           
 QueryFragment addFragment(java.lang.String label, java.lang.String propertyName, int test)
           
 QueryFragment addFragment(java.lang.String label, java.lang.String propertyName, int test, java.lang.Object value)
           
 QueryFragment addFragment(java.lang.String label, java.lang.String propertyName, int test, java.lang.Object value1, java.lang.Object value2)
           
 void applyCurrentRowValues(java.lang.Object bean)
           
 org.eclipse.persistence.expressions.Expression buildExpression()
           
protected  int dataType(QueryFragment fragment)
           
 org.eclipse.persistence.expressions.Expression getBaseExpression()
           
 java.lang.Class getBeanClass()
           
 int getCount()
           
 java.util.HashMap<java.lang.String,QueryFragment> getFragmentMap()
           
 java.util.ArrayList<QueryFragment> getFragments()
           
static java.util.HashMap<java.lang.Integer,java.lang.String> getNumericTestShortDesc()
           
 int getOperator()
           
static java.util.ArrayList<java.lang.String> getOperators()
           
 java.lang.String getOrderProperty()
           
 java.lang.Class getReturnType(java.lang.Class beanClass, java.lang.String property)
           
 oracle.spatial.geometry.JGeometry getSearchArea()
           
static java.util.HashMap<java.lang.Integer,java.lang.String> getStringTestShortDesc()
           
 java.lang.String getTitle()
           
 boolean isAllFragmentsIgnorable()
           
 void removeFragment(QueryFragment fragment)
           
 void removeFragment(java.lang.String propertyName)
           
 void resetValues()
           
 void setBaseExpression(org.eclipse.persistence.expressions.Expression baseExpression)
           
 void setBeanClass(java.lang.Class beanClass)
           
 void setFragments(java.util.ArrayList<QueryFragment> fragments)
           
 void setOperator(int operator)
           
 void setOrderProperty(java.lang.String orderProperty)
           
 void setSearchArea(oracle.spatial.geometry.JGeometry searchArea)
           
 void setTitle(java.lang.String title)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IGNORE

public static final int IGNORE
See Also:
Constant Field Values

EQ

public static final int EQ
See Also:
Constant Field Values

NE

public static final int NE
See Also:
Constant Field Values

LT

public static final int LT
See Also:
Constant Field Values

LTEQ

public static final int LTEQ
See Also:
Constant Field Values

GT

public static final int GT
See Also:
Constant Field Values

GTEQ

public static final int GTEQ
See Also:
Constant Field Values

BETWEEN

public static final int BETWEEN
See Also:
Constant Field Values

BEYOND

public static final int BEYOND
See Also:
Constant Field Values

LIKE

public static final int LIKE
See Also:
Constant Field Values

BEGINS

public static final int BEGINS
See Also:
Constant Field Values

ENDS

public static final int ENDS
See Also:
Constant Field Values

CONTAINS

public static final int CONTAINS
See Also:
Constant Field Values

OMITS

public static final int OMITS
See Also:
Constant Field Values

numericTestShortDesc

public static final java.util.HashMap<java.lang.Integer,java.lang.String> numericTestShortDesc

stringTestShortDesc

public static final java.util.HashMap<java.lang.Integer,java.lang.String> stringTestShortDesc

listTestShortDesc

public static final java.util.HashMap<java.lang.Integer,java.lang.String> listTestShortDesc

AND

public static final int AND
See Also:
Constant Field Values

OR

public static final int OR
See Also:
Constant Field Values

operators

public static final java.util.ArrayList<java.lang.String> operators

STRING

public static final int STRING
See Also:
Constant Field Values

LONG

public static final int LONG
See Also:
Constant Field Values

FLOAT

public static final int FLOAT
See Also:
Constant Field Values

CURRENCY

public static final int CURRENCY
See Also:
Constant Field Values

DATE

public static final int DATE
See Also:
Constant Field Values

LIST

public static final int LIST
See Also:
Constant Field Values
Constructor Detail

QueryBuilder

public QueryBuilder()

QueryBuilder

public QueryBuilder(java.lang.String title)

QueryBuilder

public QueryBuilder(java.lang.Class beanClass)

QueryBuilder

public QueryBuilder(java.lang.Class beanClass,
                    oracle.spatial.geometry.JGeometry searchArea)
Method Detail

setTitle

public void setTitle(java.lang.String title)

getTitle

public java.lang.String getTitle()

setOrderProperty

public void setOrderProperty(java.lang.String orderProperty)

getOrderProperty

public java.lang.String getOrderProperty()

getReturnType

public java.lang.Class getReturnType(java.lang.Class beanClass,
                                     java.lang.String property)

isAllFragmentsIgnorable

public boolean isAllFragmentsIgnorable()
Returns:
true if none of the fragments have a test

buildExpression

public org.eclipse.persistence.expressions.Expression buildExpression()

setBeanClass

public void setBeanClass(java.lang.Class beanClass)

getBeanClass

public java.lang.Class getBeanClass()

setBaseExpression

public void setBaseExpression(org.eclipse.persistence.expressions.Expression baseExpression)

getBaseExpression

public org.eclipse.persistence.expressions.Expression getBaseExpression()

setSearchArea

public void setSearchArea(oracle.spatial.geometry.JGeometry searchArea)

getSearchArea

public oracle.spatial.geometry.JGeometry getSearchArea()

setFragments

public void setFragments(java.util.ArrayList<QueryFragment> fragments)

getFragments

public java.util.ArrayList<QueryFragment> getFragments()

getFragmentMap

public java.util.HashMap<java.lang.String,QueryFragment> getFragmentMap()

dataType

protected int dataType(QueryFragment fragment)

addFragment

public QueryFragment addFragment(QueryFragment fragment)

addFragment

public QueryFragment addFragment(java.lang.String propertyName)

addFragment

public QueryFragment addFragment(java.lang.String propertyName,
                                 boolean forceUpperCase,
                                 boolean forceTrailingWildCard)

addFragment

public QueryFragment addFragment(java.lang.String propertyName,
                                 int test)

addFragment

public QueryFragment addFragment(java.lang.String propertyName,
                                 int test,
                                 java.lang.Object value)

addFragment

public QueryFragment addFragment(java.lang.String propertyName,
                                 int test,
                                 java.lang.Object value1,
                                 java.lang.Object value2)

addFragment

public QueryFragment addFragment(java.lang.String label,
                                 java.lang.String propertyName)

addFragment

public QueryFragment addFragment(java.lang.String label,
                                 java.lang.String propertyName,
                                 int test)

addFragment

public QueryFragment addFragment(java.lang.String label,
                                 java.lang.String propertyName,
                                 int test,
                                 java.lang.Object value)

addFragment

public QueryFragment addFragment(java.lang.String label,
                                 java.lang.String propertyName,
                                 int test,
                                 java.lang.Object value1,
                                 java.lang.Object value2)

removeFragment

public void removeFragment(java.lang.String propertyName)

removeFragment

public void removeFragment(QueryFragment fragment)

getNumericTestShortDesc

public static java.util.HashMap<java.lang.Integer,java.lang.String> getNumericTestShortDesc()

getStringTestShortDesc

public static java.util.HashMap<java.lang.Integer,java.lang.String> getStringTestShortDesc()

getOperators

public static java.util.ArrayList<java.lang.String> getOperators()

setOperator

public void setOperator(int operator)

getOperator

public int getOperator()

getCount

public int getCount()

resetValues

public void resetValues()

applyCurrentRowValues

public void applyCurrentRowValues(java.lang.Object bean)