org.apache.openjpa.jdbc.kernel.exps
Class JDBCExpressionFactory
java.lang.Object
   org.apache.openjpa.jdbc.kernel.exps.JDBCExpressionFactory
org.apache.openjpa.jdbc.kernel.exps.JDBCExpressionFactory
- All Implemented Interfaces: 
- java.io.Serializable, ExpressionFactory
- public class JDBCExpressionFactory 
- extends java.lang.Object- implements ExpressionFactory, java.io.Serializable
Expression factory implementation that can be used to execute queries
 via SQL.
- Author:
- Abe White
- See Also:
- Serialized Form
 
| Method Summary | 
|  Value | abs(Value val)
 | 
|  Value | add(Value v1,
    Value v2)
 | 
|  Value | all(Value val)
 | 
|  Expression | and(Expression exp1,
    Expression exp2)
 | 
|  Value | any(Value val)
 | 
|  Expression | asExpression(Value v)
 | 
|  Value | avg(Value val)
 | 
|  Expression | bindKeyVariable(Value var,
                Value val)
 | 
|  Expression | bindValueVariable(Value var,
                  Value val)
 | 
|  Expression | bindVariable(Value var,
             Value val)
 | 
|  Value | cast(Value val,
     java.lang.Class cls)
 | 
|  Value | concat(Value v1,
       Value v2)
 | 
|  Expression | contains(Value map,
         Value arg)
 | 
|  Expression | containsKey(Value map,
            Value arg)
 | 
|  Expression | containsValue(Value map,
              Value arg)
 | 
|  Value | count(Value val)
 | 
|  Value | distinct(Value val)
 | 
|  Value | divide(Value v1,
       Value v2)
 | 
|  Expression | emptyExpression()
 | 
|  Expression | endsWith(Value v1,
         Value v2)
 | 
|  Expression | equal(Value v1,
      Value v2)
 | 
|  Value | getCurrentDate()
 | 
|  Value | getCurrentTime()
 | 
|  Value | getCurrentTimestamp()
 | 
|  Value | getMapValue(Value map,
            Value arg)
 | 
|  Value | getNull()
 | 
|  Value | getObjectId(Value val)
 | 
|  SelectConstructor | getSelectConstructor()Use to create SQL select.
 | 
|  Value | getThis()
 | 
|  Expression | greaterThan(Value v1,
            Value v2)
 | 
|  Expression | greaterThanEqual(Value v1,
                 Value v2)
 | 
|  Value | indexOf(Value v1,
        Value v2)
 | 
|  Expression | isEmpty(Value val)
 | 
|  Expression | isInstance(Value val,
           java.lang.Class c)
 | 
|  Expression | isNotEmpty(Value val)
 | 
|  Expression | lessThan(Value v1,
         Value v2)
 | 
|  Expression | lessThanEqual(Value v1,
              Value v2)
 | 
|  Expression | matches(Value v1,
        Value v2,
        java.lang.String single,
        java.lang.String multi,
        java.lang.String esc)
 | 
|  Value | max(Value val)
 | 
|  Value | min(Value val)
 | 
|  Value | mod(Value v1,
    Value v2)
 | 
|  Value | multiply(Value v1,
         Value v2)
 | 
|  Value | newAggregate(AggregateListener listener,
             Value arg)
 | 
|  Arguments | newArgumentList(Value v1,
                Value v2)
 | 
|  Value | newBoundVariable(java.lang.String name,
                 java.lang.Class type)
 | 
|  Value | newExtension(FilterListener listener,
             Value target,
             Value arg)
 | 
|  Literal | newLiteral(java.lang.Object val,
           int ptype)
 | 
|  Parameter | newParameter(java.lang.String name,
             java.lang.Class type)
 | 
|  Path | newPath()
 | 
|  Path | newPath(Value val)
 | 
|  Subquery | newSubquery(ClassMetaData candidate,
            boolean subs,
            java.lang.String alias)
 | 
|  Value | newUnboundVariable(java.lang.String name,
                   java.lang.Class type)
 | 
|  Expression | not(Expression exp)
 | 
|  Expression | notEqual(Value v1,
         Value v2)
 | 
|  Expression | notMatches(Value v1,
           Value v2,
           java.lang.String single,
           java.lang.String multi,
           java.lang.String esc)
 | 
|  Expression | or(Expression exp1,
   Expression exp2)
 | 
|  Value | size(Value val)
 | 
|  Value | sqrt(Value val)
 | 
|  Expression | startsWith(Value v1,
           Value v2)
 | 
|  Value | stringLength(Value str)
 | 
|  Value | substring(Value v1,
          Value v2)
 | 
|  Value | subtract(Value v1,
         Value v2)
 | 
|  Value | sum(Value val)
 | 
|  Value | toLowerCase(Value val)
 | 
|  Value | toUpperCase(Value val)
 | 
|  Value | trim(Value str,
     Value trimChar,
     java.lang.Boolean where)
 | 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
JDBCExpressionFactory
public JDBCExpressionFactory(ClassMapping type)
- Constructor. Supply the type we're querying against.
 
getSelectConstructor
public SelectConstructor getSelectConstructor()
- Use to create SQL select.
 
- 
 
- 
 
emptyExpression
public Expression emptyExpression()
- 
- Specified by:
- emptyExpressionin interface- ExpressionFactory
 
- 
 
asExpression
public Expression asExpression(Value v)
- 
- Specified by:
- asExpressionin interface- ExpressionFactory
 
- 
 
equal
public Expression equal(Value v1,
                        Value v2)
- 
- Specified by:
- equalin interface- ExpressionFactory
 
- 
 
notEqual
public Expression notEqual(Value v1,
                           Value v2)
- 
- Specified by:
- notEqualin interface- ExpressionFactory
 
- 
 
lessThan
public Expression lessThan(Value v1,
                           Value v2)
- 
- Specified by:
- lessThanin interface- ExpressionFactory
 
- 
 
greaterThan
public Expression greaterThan(Value v1,
                              Value v2)
- 
- Specified by:
- greaterThanin interface- ExpressionFactory
 
- 
 
lessThanEqual
public Expression lessThanEqual(Value v1,
                                Value v2)
- 
- Specified by:
- lessThanEqualin interface- ExpressionFactory
 
- 
 
greaterThanEqual
public Expression greaterThanEqual(Value v1,
                                   Value v2)
- 
- Specified by:
- greaterThanEqualin interface- ExpressionFactory
 
- 
 
isEmpty
public Expression isEmpty(Value val)
- 
- Specified by:
- isEmptyin interface- ExpressionFactory
 
- 
 
isNotEmpty
public Expression isNotEmpty(Value val)
- 
- Specified by:
- isNotEmptyin interface- ExpressionFactory
 
- 
 
contains
public Expression contains(Value map,
                           Value arg)
- 
- Specified by:
- containsin interface- ExpressionFactory
 
- 
 
containsKey
public Expression containsKey(Value map,
                              Value arg)
- 
- Specified by:
- containsKeyin interface- ExpressionFactory
 
- 
 
containsValue
public Expression containsValue(Value map,
                                Value arg)
- 
- Specified by:
- containsValuein interface- ExpressionFactory
 
- 
 
isInstance
public Expression isInstance(Value val,
                             java.lang.Class c)
- 
- Specified by:
- isInstancein interface- ExpressionFactory
 
- 
 
and
public Expression and(Expression exp1,
                      Expression exp2)
- 
- Specified by:
- andin interface- ExpressionFactory
 
- 
 
or
public Expression or(Expression exp1,
                     Expression exp2)
- 
- Specified by:
- orin interface- ExpressionFactory
 
- 
 
not
public Expression not(Expression exp)
- 
- Specified by:
- notin interface- ExpressionFactory
 
- 
 
bindVariable
public Expression bindVariable(Value var,
                               Value val)
- 
- Specified by:
- bindVariablein interface- ExpressionFactory
 
- 
 
bindKeyVariable
public Expression bindKeyVariable(Value var,
                                  Value val)
- 
- Specified by:
- bindKeyVariablein interface- ExpressionFactory
 
- 
 
bindValueVariable
public Expression bindValueVariable(Value var,
                                    Value val)
- 
- Specified by:
- bindValueVariablein interface- ExpressionFactory
 
- 
 
startsWith
public Expression startsWith(Value v1,
                             Value v2)
- 
- Specified by:
- startsWithin interface- ExpressionFactory
 
- 
 
endsWith
public Expression endsWith(Value v1,
                           Value v2)
- 
- Specified by:
- endsWithin interface- ExpressionFactory
 
- 
 
notMatches
public Expression notMatches(Value v1,
                             Value v2,
                             java.lang.String single,
                             java.lang.String multi,
                             java.lang.String esc)
- 
- Specified by:
- notMatchesin interface- ExpressionFactory
 
- 
 
matches
public Expression matches(Value v1,
                          Value v2,
                          java.lang.String single,
                          java.lang.String multi,
                          java.lang.String esc)
- 
- Specified by:
- matchesin interface- ExpressionFactory
 
- 
 
newSubquery
public Subquery newSubquery(ClassMetaData candidate,
                            boolean subs,
                            java.lang.String alias)
- 
- Specified by:
- newSubqueryin interface- ExpressionFactory
 
- 
 
newPath
public Path newPath()
- 
- Specified by:
- newPathin interface- ExpressionFactory
 
- 
 
newPath
public Path newPath(Value val)
- 
- Specified by:
- newPathin interface- ExpressionFactory
 
- 
 
newLiteral
public Literal newLiteral(java.lang.Object val,
                          int ptype)
- 
- Specified by:
- newLiteralin interface- ExpressionFactory
 
- 
 
getThis
public Value getThis()
- 
- Specified by:
- getThisin interface- ExpressionFactory
 
- 
 
getNull
public Value getNull()
- 
- Specified by:
- getNullin interface- ExpressionFactory
 
- 
 
getCurrentDate
public Value getCurrentDate()
- 
- Specified by:
- getCurrentDatein interface- ExpressionFactory
 
- 
 
getCurrentTime
public Value getCurrentTime()
- 
- Specified by:
- getCurrentTimein interface- ExpressionFactory
 
- 
 
getCurrentTimestamp
public Value getCurrentTimestamp()
- 
- Specified by:
- getCurrentTimestampin interface- ExpressionFactory
 
- 
 
newParameter
public Parameter newParameter(java.lang.String name,
                              java.lang.Class type)
- 
- Specified by:
- newParameterin interface- ExpressionFactory
 
- 
 
newExtension
public Value newExtension(FilterListener listener,
                          Value target,
                          Value arg)
- 
- Specified by:
- newExtensionin interface- ExpressionFactory
 
- 
 
newAggregate
public Value newAggregate(AggregateListener listener,
                          Value arg)
- 
- Specified by:
- newAggregatein interface- ExpressionFactory
 
- 
 
newArgumentList
public Arguments newArgumentList(Value v1,
                                 Value v2)
- 
- Specified by:
- newArgumentListin interface- ExpressionFactory
 
- 
 
newUnboundVariable
public Value newUnboundVariable(java.lang.String name,
                                java.lang.Class type)
- 
- Specified by:
- newUnboundVariablein interface- ExpressionFactory
 
- 
 
newBoundVariable
public Value newBoundVariable(java.lang.String name,
                              java.lang.Class type)
- 
- Specified by:
- newBoundVariablein interface- ExpressionFactory
 
- 
 
cast
public Value cast(Value val,
                  java.lang.Class cls)
- 
- Specified by:
- castin interface- ExpressionFactory
 
- 
 
add
public Value add(Value v1,
                 Value v2)
- 
- Specified by:
- addin interface- ExpressionFactory
 
- 
 
subtract
public Value subtract(Value v1,
                      Value v2)
- 
- Specified by:
- subtractin interface- ExpressionFactory
 
- 
 
multiply
public Value multiply(Value v1,
                      Value v2)
- 
- Specified by:
- multiplyin interface- ExpressionFactory
 
- 
 
divide
public Value divide(Value v1,
                    Value v2)
- 
- Specified by:
- dividein interface- ExpressionFactory
 
- 
 
mod
public Value mod(Value v1,
                 Value v2)
- 
- Specified by:
- modin interface- ExpressionFactory
 
- 
 
abs
public Value abs(Value val)
- 
- Specified by:
- absin interface- ExpressionFactory
 
- 
 
indexOf
public Value indexOf(Value v1,
                     Value v2)
- 
- Specified by:
- indexOfin interface- ExpressionFactory
 
- 
 
concat
public Value concat(Value v1,
                    Value v2)
- 
- Specified by:
- concatin interface- ExpressionFactory
 
- 
 
stringLength
public Value stringLength(Value str)
- 
- Specified by:
- stringLengthin interface- ExpressionFactory
 
- 
 
trim
public Value trim(Value str,
                  Value trimChar,
                  java.lang.Boolean where)
- 
- Specified by:
- trimin interface- ExpressionFactory
 
- 
 
sqrt
public Value sqrt(Value val)
- 
- Specified by:
- sqrtin interface- ExpressionFactory
 
- 
 
substring
public Value substring(Value v1,
                       Value v2)
- 
- Specified by:
- substringin interface- ExpressionFactory
 
- 
 
toUpperCase
public Value toUpperCase(Value val)
- 
- Specified by:
- toUpperCasein interface- ExpressionFactory
 
- 
 
toLowerCase
public Value toLowerCase(Value val)
- 
- Specified by:
- toLowerCasein interface- ExpressionFactory
 
- 
 
avg
public Value avg(Value val)
- 
- Specified by:
- avgin interface- ExpressionFactory
 
- 
 
count
public Value count(Value val)
- 
- Specified by:
- countin interface- ExpressionFactory
 
- 
 
distinct
public Value distinct(Value val)
- 
- Specified by:
- distinctin interface- ExpressionFactory
 
- 
 
max
public Value max(Value val)
- 
- Specified by:
- maxin interface- ExpressionFactory
 
- 
 
min
public Value min(Value val)
- 
- Specified by:
- minin interface- ExpressionFactory
 
- 
 
sum
public Value sum(Value val)
- 
- Specified by:
- sumin interface- ExpressionFactory
 
- 
 
any
public Value any(Value val)
- 
- Specified by:
- anyin interface- ExpressionFactory
 
- 
 
all
public Value all(Value val)
- 
- Specified by:
- allin interface- ExpressionFactory
 
- 
 
size
public Value size(Value val)
- 
- Specified by:
- sizein interface- ExpressionFactory
 
- 
 
getObjectId
public Value getObjectId(Value val)
- 
- Specified by:
- getObjectIdin interface- ExpressionFactory
 
- 
 
getMapValue
public Value getMapValue(Value map,
                         Value arg)
- 
- Specified by:
- getMapValuein interface- ExpressionFactory
 
- 
 
Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.