|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.store.rdbms.sql.SQLText
public class SQLText
Representation of a snippet of an SQL statement. May contain parameters. A 'parameter' in this context is an input parameter to the query (which will map on to a JDBC '?' in the resultant SQL). Call "applyParametersToStatement()" to set the parameter values in the PreparedStatement.
| Constructor Summary | |
|---|---|
SQLText()
Constructor |
|
SQLText(java.lang.String initialStatementText)
Constructor |
|
| Method Summary | |
|---|---|
SQLText |
append(char c)
Append a char |
SQLText |
append(SQLExpression expr)
Append an SQLExpression. |
SQLText |
append(SQLStatement stmt)
Append an SQLStatement. |
SQLText |
append(SQLText st)
Append a StatementText |
SQLText |
append(java.lang.String s)
Append a char |
SQLText |
appendParameter(org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping,
java.lang.Object value)
Append a parameter. |
void |
applyParametersToStatement(org.datanucleus.ObjectManager om,
java.sql.PreparedStatement ps)
Method to set the parameters in the supplied PreparedStatement using their mappings and provided values. |
void |
clearStatement()
Convenience method to reset the SQL for the statement. |
void |
encloseInParentheses()
Whether to enclose this statement within parentheses |
SQLText |
postpend(java.lang.String s)
Set a String to the end of the statement. |
java.lang.String |
toSQL()
Accessor for the SQL of the statement. |
java.lang.String |
toString()
Accessor for the string form of the statement. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SQLText()
public SQLText(java.lang.String initialStatementText)
initialStatementText - | Method Detail |
|---|
public void clearStatement()
public void encloseInParentheses()
public SQLText postpend(java.lang.String s)
s - the string
public SQLText append(char c)
c - the char
public SQLText append(java.lang.String s)
s - the String
public SQLText append(SQLStatement stmt)
stmt - the SQL Statement
public SQLText append(SQLText st)
st - the StatementText
public SQLText append(SQLExpression expr)
expr - the SQLExpression
public SQLText appendParameter(org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping,
java.lang.Object value)
mapping - the mappingvalue - the parameter value
public void applyParametersToStatement(org.datanucleus.ObjectManager om,
java.sql.PreparedStatement ps)
om - ObjectManagerps - The PreparedStatementpublic java.lang.String toSQL()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||