public abstract class ECQuery
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASSNAME
The class name.
|
static java.lang.String |
COPYRIGHT
IBM Copyright
|
static java.lang.Integer |
DEFAULT_START
Default start position.
|
static java.lang.Integer |
UNDEFINED_MAX_RESULTS
Default maximum number of results to fetch.
|
Constructor and Description |
---|
ECQuery()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
java.util.Vector |
executeQuery(java.sql.Connection aConnection)
Build up the search query based on the defined parameters, and execute
it.
|
TableField[] |
getAdditionalSelectTableFields()
This method returns the additional TableField objects defined for the SELECT clause.
|
java.lang.Integer |
getMaxResults()
Get the value for the maximum number of results to return.
|
TableField |
getOrderBy()
Get the ORDER BY clause.
|
java.lang.Integer |
getResultSize()
Get the count of all elements matched by this search.
|
boolean |
getRetrieveCountOnly()
Get whether or not to retrieve the count only.
|
java.lang.Integer |
getStart()
Get the value for the start cursor position.
|
boolean |
getUncommittedRead()
Get whether or not to use UNCOMMITTED READ in the query.
|
WhereClauseCondition |
getWhereClause()
Gets the WhereClauseCondition object to be used to generate the
WHERE clause(s) used by this query.
|
boolean |
isValid()
Sanity check on the query, check that the parameters are properly
initialized.
|
void |
setAdditionalSelectTableFields(TableField[] atfAdditionalSelectTableFields)
Set the additional TableField objects to return as part of this query execution.
|
void |
setAllFromTables(java.util.Set aSetFromTables)
Set the FROM Tables for the search query
If not specified, by default, the FROM tables will be taken from the SELECT, WHERE and JOIN clauses.
|
void |
setMaxResults(java.lang.Integer aInMaxResults)
Set the value for the maximum number of results to return.
|
void |
setOrderBy(TableField atfOrderBy)
Set the ORDER BY clause.
|
void |
setRetrieveCountOnly(boolean abRetrieveCountOnly)
Set whether or not to retrieve the count only.
|
void |
setStart(java.lang.Integer anStart)
Set the value for the start cursor position.
|
void |
setUncommittedRead(boolean abUncomittedRead)
Set whether or not to use UNCOMMITTED READ in the query.
|
void |
setWhereClause(WhereClauseCondition aWhereClause)
Set the WHERE clauses for this query.
|
java.lang.String |
toString()
Print the object, for tracing purposes.
|
public static final java.lang.String COPYRIGHT
public static final java.lang.String CLASSNAME
public static final java.lang.Integer DEFAULT_START
public static final java.lang.Integer UNDEFINED_MAX_RESULTS
public WhereClauseCondition getWhereClause()
public void setWhereClause(WhereClauseCondition aWhereClause)
aWhereClause
- The WHERE clause.public final TableField[] getAdditionalSelectTableFields()
public final void setAdditionalSelectTableFields(TableField[] atfAdditionalSelectTableFields)
atfAdditionalSelectTableFields
- The additional TableField objects to use as part of
the SELECT process.public java.lang.Integer getMaxResults()
public void setMaxResults(java.lang.Integer aInMaxResults)
aInMaxResults
- The value for the maximum number of results to return.public boolean getRetrieveCountOnly()
public void setRetrieveCountOnly(boolean abRetrieveCountOnly)
abRetrieveCountOnly
- true if the query should return the
count only; false if it should return the full java.sql.ResultSet .public java.lang.Integer getStart()
public void setStart(java.lang.Integer anStart)
anStart
- The cursor start position.public java.lang.Integer getResultSize()
public TableField getOrderBy()
public void setOrderBy(TableField atfOrderBy)
atfOrderBy
- The ORDER BY clause.public java.util.Vector executeQuery(java.sql.Connection aConnection) throws java.sql.SQLException
aConnection
- The database connection.java.sql.SQLException
- If an exception is thrown from executing the query.public boolean isValid()
public java.lang.String toString()
toString
in class java.lang.Object
public void setUncommittedRead(boolean abUncomittedRead)
abUncomittedRead
- true will append WITH UR to the end of the query.public boolean getUncommittedRead()
public void setAllFromTables(java.util.Set aSetFromTables)
aSetFromTables
- The set of FROM Tables