|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.store.rdbms.sql.expression.SQLExpressionFactory
public class SQLExpressionFactory
Factory for creating SQL expressions/literals. These are typically called when we are building up an SQL statement and we want to impose conditions using the fields of a class, and values for the field.
| Field Summary | |
|---|---|
protected static org.datanucleus.util.Localiser |
LOCALISER
Localiser for messages |
| Constructor Summary | |
|---|---|
SQLExpressionFactory(RDBMSStoreManager storeMgr)
Constructor for an SQLExpressionFactory. |
|
| Method Summary | |
|---|---|
org.datanucleus.store.mapped.mapping.JavaTypeMapping |
getMappingForType(Class cls,
boolean useCached)
Accessor for a mapping to use in a query expression. |
SQLExpression |
invokeMethod(SQLStatement stmt,
String className,
String methodName,
SQLExpression expr,
List args)
Accessor for the result of a method call on the supplied expression with the supplied args. |
SQLExpression |
invokeOperation(String name,
SQLExpression expr,
SQLExpression expr2)
Accessor for the result of an operation call on the supplied expression with the supplied args. |
SQLExpression |
newExpression(SQLStatement stmt,
SQLTable sqlTbl,
org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping)
Factory for an expression representing a mapping on a table. |
SQLExpression |
newExpression(SQLStatement stmt,
SQLTable sqlTbl,
org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping,
org.datanucleus.store.mapped.mapping.JavaTypeMapping parentMapping)
Factory for an expression representing a mapping on a table. |
SQLExpression |
newLiteral(SQLStatement stmt,
org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping,
Object value)
Factory for a literal representing a value. |
SQLExpression |
newLiteralParameter(SQLStatement stmt,
org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping,
Object value,
String paramName)
Factory for a literal as an input parameter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.datanucleus.util.Localiser LOCALISER
| Constructor Detail |
|---|
public SQLExpressionFactory(RDBMSStoreManager storeMgr)
storeMgr - RDBMS Manager| Method Detail |
|---|
public SQLExpression newExpression(SQLStatement stmt,
SQLTable sqlTbl,
org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping)
stmt - The statementsqlTbl - The tablemapping - The mapping
public SQLExpression newExpression(SQLStatement stmt,
SQLTable sqlTbl,
org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping,
org.datanucleus.store.mapped.mapping.JavaTypeMapping parentMapping)
stmt - The statementsqlTbl - The tablemapping - The mappingparentMapping - Optional parent mapping of this mapping (e.g when handling impl of an interface)
public SQLExpression newLiteral(SQLStatement stmt,
org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping,
Object value)
stmt - The statementmapping - The mappingvalue - The value
public SQLExpression newLiteralParameter(SQLStatement stmt,
org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping,
Object value,
String paramName)
stmt - The statementmapping - The mappingvalue - Value of the literal (if known)paramName - The parameter name
public SQLExpression invokeMethod(SQLStatement stmt,
String className,
String methodName,
SQLExpression expr,
List args)
stmt - SQLStatement that this relates toclassName - Class we are invoking the method onmethodName - Name of the methodexpr - The expression we invoke the method onargs - Any arguments to the method call
public SQLExpression invokeOperation(String name,
SQLExpression expr,
SQLExpression expr2)
name - Operation to be invokedexpr - The first expression to perform the operation onexpr2 - The second expression to perform the operation on
UnsupportedOperationException - if the operation is not specified
public org.datanucleus.store.mapped.mapping.JavaTypeMapping getMappingForType(Class cls,
boolean useCached)
cls - The class that the mapping should represent.useCached - Whether to use any cached mapping (if available)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||