public class DTXQuery
extends java.lang.Object
... WHERE foo.id = $2 AND bar.name = $1 ...then the statement bind(1, 12) will bind the value 12 to the first parameter, even though it's named "$2." This may or may not be changed in future releases.
| Modifier and Type | Field and Description |
|---|---|
protected java.util.HashMap |
_classes |
protected ClassMapping |
_clsMapping |
protected java.util.HashMap |
_cols |
protected DTXEngine |
_eng |
protected org.xml.sax.DocumentHandler |
_handler |
protected java.util.ArrayList |
_ids |
protected int |
_lastCol |
protected java.io.PrintWriter |
_logWriter |
protected java.lang.String |
_objName |
protected java.lang.String |
_objType |
protected java.sql.PreparedStatement |
_stmt |
| Constructor and Description |
|---|
DTXQuery() |
| Modifier and Type | Method and Description |
|---|---|
void |
bind(int param,
boolean value)
Binds a boolean value to a parameter in the query.
|
void |
bind(int param,
double value)
Binds a double value to a parameter in the query.
|
void |
bind(int param,
float value)
Binds a float value to a parameter in the query.
|
void |
bind(int param,
int value)
Binds an integer value to a parameter in the query.
|
void |
bind(int param,
long value)
Binds a long integer value to a parameter in the query.
|
void |
bind(int param,
java.lang.Object value)
Binds an Object value to a parameter in the query.
|
void |
bind(int param,
java.lang.String value)
Binds an String value to a parameter in the query.
|
protected void |
emitSaxEvents(java.sql.ResultSet rs) |
protected boolean |
emitSaxInt(java.sql.ResultSet rs,
int idIndex) |
void |
execute()
This method executes the query.
|
protected void |
initQuery(ClassMapping clsMapping,
QueryExpression expr) |
protected java.lang.String |
parseOQL(java.lang.String oql) |
(package private) void |
prepare(java.lang.String oql) |
(package private) void |
setEngine(DTXEngine eng) |
void |
setHandler(org.xml.sax.DocumentHandler handler)
Set the DocumentHandler that will receive the results (as SAX
events) for this query.
|
void |
setLogWriter(java.io.PrintWriter logWriter)
Set the log writer.
|
protected DTXEngine _eng
protected org.xml.sax.DocumentHandler _handler
protected java.io.PrintWriter _logWriter
protected java.sql.PreparedStatement _stmt
protected java.lang.String _objName
protected java.lang.String _objType
protected ClassMapping _clsMapping
protected java.util.ArrayList _ids
protected int _lastCol
protected java.util.HashMap _cols
protected java.util.HashMap _classes
public void setHandler(org.xml.sax.DocumentHandler handler)
handler - The DocumentHandler to use.public void setLogWriter(java.io.PrintWriter logWriter)
logWriter - The log writer to use.public void bind(int param,
java.lang.Object value)
throws DTXException
param - 1-based index of the param (see note above).value - Object to bind.DTXExceptionpublic void bind(int param,
java.lang.String value)
throws DTXException
param - 1-based index of the param (see note above).value - String to bind.DTXExceptionpublic void bind(int param,
int value)
throws DTXException
param - 1-based index of the param (see note above).value - int to bind.DTXExceptionpublic void bind(int param,
long value)
throws DTXException
param - 1-based index of the param (see note above).value - long integer to bind.DTXExceptionpublic void bind(int param,
float value)
throws DTXException
param - 1-based index of the param (see note above).value - float to bind.DTXExceptionpublic void bind(int param,
double value)
throws DTXException
param - 1-based index of the param (see note above).value - double to bind.DTXExceptionpublic void bind(int param,
boolean value)
throws DTXException
param - 1-based index of the param (see note above).value - boolean to bind.DTXExceptionpublic void execute()
throws DTXException
DTXExceptionvoid setEngine(DTXEngine eng)
void prepare(java.lang.String oql)
throws DTXException
DTXExceptionprotected void emitSaxEvents(java.sql.ResultSet rs)
throws DTXException
DTXExceptionprotected boolean emitSaxInt(java.sql.ResultSet rs,
int idIndex)
throws DTXException
DTXExceptionprotected java.lang.String parseOQL(java.lang.String oql)
throws DTXException
DTXExceptionprotected void initQuery(ClassMapping clsMapping, QueryExpression expr) throws DTXException
DTXExceptionIntalio Inc. (C) 1999-2006. All rights reserved http://www.intalio.com