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
OdaException
public void setAppContext(java.lang.Object context) throws OdaException
OdaException
public void close() throws OdaException
OdaException
public IResultSetMetaData getMetaData() throws OdaException
OdaException
protected 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.InvocationTargetException
public IResultSet executeQuery() throws OdaException
OdaException
public void setProperty(java.lang.String name, java.lang.String value) throws OdaException
OdaException
public void setMaxRows(int max) throws OdaException
OdaException
public int getMaxRows() throws OdaException
OdaException
public void clearInParameters() throws OdaException
OdaException
public void setInt(java.lang.String parameterName, int value) throws OdaException
OdaException
public void setInt(int parameterId, int value) throws OdaException
OdaException
public void setDouble(java.lang.String parameterName, double value) throws OdaException
OdaException
public void setDouble(int parameterId, double value) throws OdaException
OdaException
public void setBigDecimal(java.lang.String parameterName, java.math.BigDecimal value) throws OdaException
OdaException
public void setBigDecimal(int parameterId, java.math.BigDecimal value) throws OdaException
OdaException
public void setString(java.lang.String parameterName, java.lang.String value) throws OdaException
OdaException
public void setString(int parameterId, java.lang.String value) throws OdaException
OdaException
public void setDate(java.lang.String parameterName, java.sql.Date value) throws OdaException
OdaException
public void setDate(int parameterId, java.sql.Date value) throws OdaException
OdaException
public void setTime(java.lang.String parameterName, java.sql.Time value) throws OdaException
OdaException
public void setTime(int parameterId, java.sql.Time value) throws OdaException
OdaException
public void setTimestamp(java.lang.String parameterName, java.sql.Timestamp value) throws OdaException
OdaException
public void setTimestamp(int parameterId, java.sql.Timestamp value) throws OdaException
OdaException
public void setBoolean(java.lang.String parameterName, boolean value) throws OdaException
OdaException
public void setBoolean(int parameterId, boolean value) throws OdaException
OdaException
public void setObject(java.lang.String parameterName, java.lang.Object value) throws OdaException
OdaException
public void setObject(int parameterId, java.lang.Object value) throws OdaException
OdaException
public void setNull(java.lang.String parameterName) throws OdaException
OdaException
public void setNull(int parameterId) throws OdaException
OdaException
public int findInParameter(java.lang.String parameterName) throws OdaException
OdaException
public IParameterMetaData getParameterMetaData() throws OdaException
OdaException
public void setSortSpec(SortSpec sortBy) throws OdaException
OdaException
public SortSpec getSortSpec() throws OdaException
OdaException
public void setSpecification(QuerySpecification querySpec) throws OdaException, java.lang.UnsupportedOperationException
OdaException
java.lang.UnsupportedOperationException
public QuerySpecification getSpecification()
public java.lang.String getEffectiveQueryText()
public void cancel() throws OdaException, java.lang.UnsupportedOperationException
OdaException
java.lang.UnsupportedOperationException