public class Query
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected Connection |
connection |
protected EClassifier |
context |
static java.lang.String |
CONTEXT_PROPERTY_NAME |
protected QueryDelegate |
delegate |
static java.lang.String |
DELEGATE_PROPERTY_NAME |
protected QueryDelegate.Factory |
factory |
protected int |
maxRows |
protected java.lang.String |
queryText |
protected QuerySpecification |
specification |
protected EClassifier |
type |
static java.lang.String |
TYPE_PROPERTY_NAME |
protected java.util.Map<java.lang.String,EClassifier> |
variables |
static java.lang.String |
VARIABLES_PROPERTY_NAME |
| Modifier | Constructor and Description |
|---|---|
protected |
Query(Connection connection) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
assertPrepared()
Asserts that this query has been prepared.
|
protected void |
assertSpecified()
Asserts that a specification has been provided for this query.
|
void |
cancel() |
void |
clearInParameters() |
void |
close() |
IResultSet |
executeQuery() |
int |
findInParameter(java.lang.String parameterName) |
protected EList<java.lang.Object> |
getAllObjectsByType(EList<java.lang.Object> objects,
EClassifier type) |
java.lang.String |
getEffectiveQueryText() |
int |
getMaxRows() |
IResultSetMetaData |
getMetaData() |
IParameterMetaData |
getParameterMetaData() |
protected EList<java.lang.Object> |
getResults(EList<java.lang.Object> results,
QueryDelegate delegate,
EList<java.lang.Object> targets,
java.util.Map<java.lang.String,java.lang.Object> arguments,
EClassifier type) |
SortSpec |
getSortSpec() |
QuerySpecification |
getSpecification() |
protected java.util.Map<java.lang.String,EClassifier> |
getVariables()
Returns the expression variables specified for this query.
|
void |
prepare(java.lang.String queryText) |
void |
setAppContext(java.lang.Object context) |
void |
setBigDecimal(int parameterId,
java.math.BigDecimal value) |
void |
setBigDecimal(java.lang.String parameterName,
java.math.BigDecimal value) |
void |
setBoolean(int parameterId,
boolean value) |
void |
setBoolean(java.lang.String parameterName,
boolean value) |
void |
setDate(int parameterId,
java.sql.Date value) |
void |
setDate(java.lang.String parameterName,
java.sql.Date value) |
void |
setDouble(int parameterId,
double value) |
void |
setDouble(java.lang.String parameterName,
double value) |
void |
setInt(int parameterId,
int value) |
void |
setInt(java.lang.String parameterName,
int value) |
void |
setMaxRows(int max) |
void |
setNull(int parameterId) |
void |
setNull(java.lang.String parameterName) |
void |
setObject(int parameterId,
java.lang.Object value) |
void |
setObject(java.lang.String parameterName,
java.lang.Object value) |
void |
setProperty(java.lang.String name,
java.lang.String value) |
void |
setSortSpec(SortSpec sortBy) |
void |
setSpecification(QuerySpecification querySpec) |
void |
setString(int parameterId,
java.lang.String value) |
void |
setString(java.lang.String parameterName,
java.lang.String value) |
void |
setTime(int parameterId,
java.sql.Time value) |
void |
setTime(java.lang.String parameterName,
java.sql.Time value) |
void |
setTimestamp(int parameterId,
java.sql.Timestamp value) |
void |
setTimestamp(java.lang.String parameterName,
java.sql.Timestamp value) |
public static final java.lang.String DELEGATE_PROPERTY_NAME
public static final java.lang.String CONTEXT_PROPERTY_NAME
public static final java.lang.String VARIABLES_PROPERTY_NAME
public static final java.lang.String TYPE_PROPERTY_NAME
protected final Connection connection
protected QuerySpecification specification
protected QueryDelegate.Factory factory
protected QueryDelegate delegate
protected EClassifier context
protected java.util.Map<java.lang.String,EClassifier> variables
protected EClassifier type
protected java.lang.String queryText
protected int maxRows
protected Query(Connection connection)
protected void assertSpecified()
throws OdaException
OdaException - if a specification has not been providedprotected void assertPrepared()
throws OdaException
OdaException - if the query has not been preparedprotected java.util.Map<java.lang.String,EClassifier> getVariables() throws OdaException
OdaException - if a specification has not been providedpublic void prepare(java.lang.String queryText)
throws OdaException
OdaExceptionpublic void setAppContext(java.lang.Object context)
throws OdaException
OdaExceptionpublic void close()
throws OdaException
OdaExceptionpublic IResultSetMetaData getMetaData()
throws OdaException
OdaExceptionprotected EList<java.lang.Object> getAllObjectsByType(EList<java.lang.Object> objects, EClassifier type)
protected EList<java.lang.Object> getResults(EList<java.lang.Object> results, QueryDelegate delegate, EList<java.lang.Object> targets, java.util.Map<java.lang.String,java.lang.Object> arguments, EClassifier type) throws java.lang.reflect.InvocationTargetException
java.lang.reflect.InvocationTargetExceptionpublic IResultSet executeQuery()
throws OdaException
OdaExceptionpublic void setProperty(java.lang.String name,
java.lang.String value)
throws OdaException
OdaExceptionpublic void setMaxRows(int max)
throws OdaException
OdaExceptionpublic int getMaxRows()
throws OdaException
OdaExceptionpublic void clearInParameters()
throws OdaException
OdaExceptionpublic void setInt(java.lang.String parameterName,
int value)
throws OdaException
OdaExceptionpublic void setInt(int parameterId,
int value)
throws OdaException
OdaExceptionpublic void setDouble(java.lang.String parameterName,
double value)
throws OdaException
OdaExceptionpublic void setDouble(int parameterId,
double value)
throws OdaException
OdaExceptionpublic void setBigDecimal(java.lang.String parameterName,
java.math.BigDecimal value)
throws OdaException
OdaExceptionpublic void setBigDecimal(int parameterId,
java.math.BigDecimal value)
throws OdaException
OdaExceptionpublic void setString(java.lang.String parameterName,
java.lang.String value)
throws OdaException
OdaExceptionpublic void setString(int parameterId,
java.lang.String value)
throws OdaException
OdaExceptionpublic void setDate(java.lang.String parameterName,
java.sql.Date value)
throws OdaException
OdaExceptionpublic void setDate(int parameterId,
java.sql.Date value)
throws OdaException
OdaExceptionpublic void setTime(java.lang.String parameterName,
java.sql.Time value)
throws OdaException
OdaExceptionpublic void setTime(int parameterId,
java.sql.Time value)
throws OdaException
OdaExceptionpublic void setTimestamp(java.lang.String parameterName,
java.sql.Timestamp value)
throws OdaException
OdaExceptionpublic void setTimestamp(int parameterId,
java.sql.Timestamp value)
throws OdaException
OdaExceptionpublic void setBoolean(java.lang.String parameterName,
boolean value)
throws OdaException
OdaExceptionpublic void setBoolean(int parameterId,
boolean value)
throws OdaException
OdaExceptionpublic void setObject(java.lang.String parameterName,
java.lang.Object value)
throws OdaException
OdaExceptionpublic void setObject(int parameterId,
java.lang.Object value)
throws OdaException
OdaExceptionpublic void setNull(java.lang.String parameterName)
throws OdaException
OdaExceptionpublic void setNull(int parameterId)
throws OdaException
OdaExceptionpublic int findInParameter(java.lang.String parameterName)
throws OdaException
OdaExceptionpublic IParameterMetaData getParameterMetaData()
throws OdaException
OdaExceptionpublic void setSortSpec(SortSpec sortBy)
throws OdaException
OdaExceptionpublic SortSpec getSortSpec()
throws OdaException
OdaExceptionpublic void setSpecification(QuerySpecification querySpec)
throws OdaException,
java.lang.UnsupportedOperationException
OdaExceptionjava.lang.UnsupportedOperationExceptionpublic QuerySpecification getSpecification()
public java.lang.String getEffectiveQueryText()
public void cancel()
throws OdaException,
java.lang.UnsupportedOperationException
OdaExceptionjava.lang.UnsupportedOperationException