|
Novell exteNd Director 5.0 API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface defines a generic SQL query. It's used to construct queries that return result sets.
Method Summary | |
void |
addJoin(int joinType,
String joinTable,
String[] fromColumns,
String[] toColumns)
Specify a JOIN clause for a query |
void |
addJoin(int joinType,
String joinTable,
String joinAlias,
String[] fromColumns,
String[] toColumns,
EbiQueryExpression exp)
Specify a JOIN clause for a query using an alias. |
void |
addOrderBy(String columnName,
boolean asc)
Designate a column for ordering in a JDBC query. |
void |
addSelect(String columnName)
Designate a column for selection in a JDBC query. |
void |
clear()
Clear all selections related to this query except for PrimaryTable and PrimaryAlias; these remain the same. |
void |
clear(String tableName,
String tableAlias)
Clear all selections related to this query. |
boolean |
getDistinct()
Get the Distinct attribute for the query. |
Boolean |
getEscapeProcessing()
Get the EscapeProcessing attribute for the query. |
Integer |
getFetchDirection()
Get the FetchDirection attribute for the query. |
Integer |
getFetchSize()
Get the FetchSize attribute for the query. |
Object[] |
getInParameters()
Get the In Parameters, if there is any. |
Integer |
getMaxFieldSize()
Get the MaxFieldSize attribute for the query. |
Integer |
getMaxRows()
Get the MaxRows attribute for the query. |
String |
getPrimaryAlias()
Get the primary table's alias for the query. |
String |
getPrimaryTable()
Get the primary table name for the query. |
Integer |
getQueryTimeout()
Get the QueryTimeout attribute for the query. |
Collection |
getTables()
Get a collection of table names (or their aliases) used in the query. |
EbiQueryExpression |
getWhere()
Get a query's WHERE clause. |
void |
selectTableAll(String tableName)
Select all columns for a table (i.e., SELECT tableName.*) |
void |
setDistinct(boolean distinct)
Specify whether the SQL query should use the DISTINCT keyword. |
void |
setEscapeProcessing(Boolean escapeProcessing)
Specify whether the query should use escape processing. |
void |
setFetchDirection(Integer fetchDirection)
Specify a desired fetch direction to be used with the query. |
void |
setFetchSize(Integer fetchSize)
Specify a desired fetch size to be used with the query. |
void |
setMaxFieldSize(Integer maxFieldSize)
Specify a maximum column width to be returned by the query. |
void |
setMaxRows(Integer maxRows)
Specify a maximum number of rows to be returned by the query. |
void |
setPrimaryTable(String tableName)
Designate a primary table for the query |
void |
setPrimaryTable(String tableName,
String tableAlias)
Designate a primary table for the query |
void |
setQueryTimeout(Integer timeoutSeconds)
Specify a timeout interval to be used with the query. |
void |
setWhere(EbiQueryExpression expr)
Designate a WHERE clause for a JDBC query. |
EbiQueryExpression |
whereColumnBetween(String columnName,
byte first,
byte last,
boolean not)
Specify the search condition of "WHERE colummnName between .." |
EbiQueryExpression |
whereColumnBetween(String columnName,
char first,
char last,
boolean not)
Specify the search condition of "WHERE colummnName between .." |
EbiQueryExpression |
whereColumnBetween(String columnName,
double first,
double last,
boolean not)
Specify the search condition of "WHERE colummnName between .." |
EbiQueryExpression |
whereColumnBetween(String columnName,
float first,
float last,
boolean not)
Specify the search condition of "WHERE colummnName between .." |
EbiQueryExpression |
whereColumnBetween(String columnName,
int first,
int last,
boolean not)
Specify the search condition of "WHERE colummnName between .." |
EbiQueryExpression |
whereColumnBetween(String columnName,
long first,
long last,
boolean not)
Specify the search condition of "WHERE colummnName between .." |
EbiQueryExpression |
whereColumnBetween(String columnName,
Object first,
Object last,
boolean not)
Specify the search condition of "WHERE colummnName between .." |
EbiQueryExpression |
whereColumnBetween(String columnName,
short first,
short last,
boolean not)
Specify the search condition of "WHERE colummnName between .." |
EbiQueryExpression |
whereColumnIn(String columnName,
byte[] values,
boolean not)
Specify the search condition of "WHERE columnName IN .." |
EbiQueryExpression |
whereColumnIn(String columnName,
char[] values,
boolean not)
Specify the search condition of "WHERE columnName IN .." |
EbiQueryExpression |
whereColumnIn(String columnName,
double[] values,
boolean not)
Specify the search condition of "WHERE columnName IN .." |
EbiQueryExpression |
whereColumnIn(String columnName,
EbiQuery subQuery,
boolean not)
Specify the search condition of "WHERE columnName IN .." |
EbiQueryExpression |
whereColumnIn(String columnName,
float[] values,
boolean not)
Specify the search condition of "WHERE columnName IN .." |
EbiQueryExpression |
whereColumnIn(String columnName,
int[] values,
boolean not)
Specify the search condition of "WHERE columnName IN .." |
EbiQueryExpression |
whereColumnIn(String columnName,
long[] values,
boolean not)
Specify the search condition of "WHERE columnName IN .." |
EbiQueryExpression |
whereColumnIn(String columnName,
Object[] values,
boolean not)
Specify the search condition of "WHERE columnName IN .." |
EbiQueryExpression |
whereColumnIn(String columnName,
short[] values,
boolean not)
Specify the search condition of "WHERE columnName IN .." |
EbiQueryExpression |
whereColumnNull(String columnName,
boolean not)
Specify a null value condition of "WHERE columnName IS NULL" |
EbiQueryExpression |
whereColumnOp(String columnName,
boolean value,
int op,
boolean not)
Specify the search condition of "WHERE columnName .." |
EbiQueryExpression |
whereColumnOp(String columnName,
byte value,
int op,
boolean not)
Specify the search condition of "WHERE columnName .." |
EbiQueryExpression |
whereColumnOp(String columnName,
char value,
int op,
boolean not)
Specify the search condition of "WHERE columnName .." |
EbiQueryExpression |
whereColumnOp(String columnName,
double value,
int op,
boolean not)
Specify the search condition of "WHERE columnName .." |
EbiQueryExpression |
whereColumnOp(String columnName,
float value,
int op,
boolean not)
Specify the search condition of "WHERE columnName .." |
EbiQueryExpression |
whereColumnOp(String columnName,
int value,
int op,
boolean not)
Specify the search condition of "WHERE columnName .." |
EbiQueryExpression |
whereColumnOp(String columnName,
long value,
int op,
boolean not)
Specify the search condition of "WHERE columnName .." |
EbiQueryExpression |
whereColumnOp(String columnName,
Object value,
int op,
boolean not)
Specify the search condition of "WHERE columnName .." |
EbiQueryExpression |
whereColumnOp(String columnName,
short value,
int op,
boolean not)
Specify the search condition of "WHERE columnName .." |
EbiQueryExpression |
whereExists(EbiQuery subQuery,
boolean not)
Specify the search condition of "WHERE EXISTS .." |
Methods implemented from interface com.sssw.fw.api.EbiQuery |
allSelected,
deselectAll,
getOrderBys,
getQueryString,
getSelects,
removeOrderBys,
selectAll |
Method Detail |
public void selectTableAll(String tableName)
tableName
- the name of the table for which all columns are selected.public Collection getTables()
public void addSelect(String columnName)
columnName
- a column name to be selected in the query.public void addOrderBy(String columnName, boolean asc)
columnName
- a column name to be used for ordering in a query.asc
- a boolean value indicating whether to use ascending order.public void setWhere(EbiQueryExpression expr)
expr
- an EbiQueryExpression containing the WHERE clause.public EbiQueryExpression whereColumnNull(String columnName, boolean not)
columnName
- the name of the column being evaluatednot
- whether to negate the conditionpublic EbiQueryExpression whereColumnOp(String columnName, Object value, int op, boolean not)
columnName
- the name of the column being evaluatedvalue
- an Object value for the condition, valid objects are defined
in EboSqlHelperop
- an operator, valid operators are defined in EboSqlHelpernot
- whether to negate the conditionpublic EbiQueryExpression whereColumnOp(String columnName, boolean value, int op, boolean not)
columnName
- the name of the column being evaluatedvalue
- a boolean value for the conditionop
- an operator, valid operators are defined in EboSqlHelpernot
- whether to negate the conditionpublic EbiQueryExpression whereColumnOp(String columnName, char value, int op, boolean not)
columnName
- the name of the column being evaluatedvalue
- a char value for the conditionop
- an operator, valid operators are defined in EboSqlHelpernot
- whether to negate the conditionpublic EbiQueryExpression whereColumnOp(String columnName, byte value, int op, boolean not)
columnName
- the name of the column being evaluatedvalue
- a byte value for the conditionop
- an operator, valid operators are defined in EboSqlHelpernot
- whether to negate the conditionpublic EbiQueryExpression whereColumnOp(String columnName, short value, int op, boolean not)
columnName
- the name of the column being evaluatedvalue
- a short value for the conditionop
- an operator, valid operators are defined in EboSqlHelpernot
- whether to negate the conditionpublic EbiQueryExpression whereColumnOp(String columnName, int value, int op, boolean not)
columnName
- the name of the column being evaluatedvalue
- an int value for the conditionop
- an operator, valid operators are defined in EboSqlHelpernot
- whether to negate the conditionpublic EbiQueryExpression whereColumnOp(String columnName, long value, int op, boolean not)
columnName
- the name of the column being evaluatedvalue
- a long value for the conditionop
- an operator, valid operators are defined in EboSqlHelpernot
- whether to negate the conditionpublic EbiQueryExpression whereColumnOp(String columnName, float value, int op, boolean not)
columnName
- the name of the column being evaluatedvalue
- a float value for the conditionop
- an operator, valid operators are defined in EboSqlHelpernot
- whether to negate the conditionpublic EbiQueryExpression whereColumnOp(String columnName, double value, int op, boolean not)
columnName
- the name of the column being evaluatedvalue
- a double value for the conditionop
- an operator, valid operators are defined in EboSqlHelpernot
- whether to negate the conditionpublic EbiQueryExpression whereColumnIn(String columnName, Object[] values, boolean not)
columnName
- the name of the column being evaluatedvalues
- Object values for the IN conditionnot
- whether to negate the conditionpublic EbiQueryExpression whereColumnIn(String columnName, char[] values, boolean not)
columnName
- the name of the column being evaluatedvalues
- char values for the IN conditionnot
- whether to negate the conditionpublic EbiQueryExpression whereColumnIn(String columnName, byte[] values, boolean not)
columnName
- the name of the column being evaluatedvalues
- byte values for the IN conditionnot
- whether to negate the conditionpublic EbiQueryExpression whereColumnIn(String columnName, short[] values, boolean not)
columnName
- the name of the column being evaluatedvalues
- short values for the IN conditionnot
- whether to negate the conditionpublic EbiQueryExpression whereColumnIn(String columnName, int[] values, boolean not)
columnName
- the name of the column being evaluatedvalues
- int values for the IN conditionnot
- whether to negate the conditionpublic EbiQueryExpression whereColumnIn(String columnName, long[] values, boolean not)
columnName
- the name of the column being evaluatedvalues
- long values for the IN conditionnot
- whether to negate the conditionpublic EbiQueryExpression whereColumnIn(String columnName, float[] values, boolean not)
columnName
- the name of the column being evaluatedvalues
- float values for the IN conditionnot
- whether to negate the conditionpublic EbiQueryExpression whereColumnIn(String columnName, double[] values, boolean not)
columnName
- the name of the column being evaluatedvalues
- double values for the IN conditionnot
- whether to negate the conditionpublic EbiQueryExpression whereColumnIn(String columnName, EbiQuery subQuery, boolean not)
columnName
- the name of the column being evaluatedsubQuery
- an EbiQuery for the IN condition (i.e., a subquery)not
- whether to negate the conditionpublic EbiQueryExpression whereColumnBetween(String columnName, Object first, Object last, boolean not)
columnName
- the name of the column being evaluatedfirst
- the start Object value for the rangelast
- the end Object value for the rangenot
- whether to negate the conditionpublic EbiQueryExpression whereColumnBetween(String columnName, char first, char last, boolean not)
columnName
- the name of the column being evaluatedfirst
- the start char for the rangelast
- the end char for the rangenot
- whether to negate the conditionpublic EbiQueryExpression whereColumnBetween(String columnName, byte first, byte last, boolean not)
columnName
- the name of the column being evaluatedfirst
- the start byte for the rangelast
- the end byte for the rangenot
- whether to negate the conditionpublic EbiQueryExpression whereColumnBetween(String columnName, short first, short last, boolean not)
columnName
- the name of the column being evaluatedfirst
- the start short for the rangelast
- the end short for the rangenot
- whether to negate the conditionpublic EbiQueryExpression whereColumnBetween(String columnName, int first, int last, boolean not)
columnName
- the name of the column being evaluatedfirst
- the start int for the rangelast
- the end int for the rangenot
- whether to negate the conditionpublic EbiQueryExpression whereColumnBetween(String columnName, long first, long last, boolean not)
columnName
- the name of the column being evaluatedfirst
- the start long for the rangelast
- the end long for the rangenot
- whether to negate the conditionpublic EbiQueryExpression whereColumnBetween(String columnName, float first, float last, boolean not)
columnName
- the name of the column being evaluatedfirst
- the start float for the rangelast
- the end float for the rangenot
- whether to negate the conditionpublic EbiQueryExpression whereColumnBetween(String columnName, double first, double last, boolean not)
columnName
- the name of the column being evaluatedfirst
- the start double for the rangelast
- the end double for the rangenot
- whether to negate the conditionpublic EbiQueryExpression whereExists(EbiQuery subQuery, boolean not)
subQuery
- an EbiQuery for the EXISTS condition (i.e., a subquery)not
- whether to negate the conditionpublic EbiQueryExpression getWhere()
public void addJoin(int joinType, String joinTable, String[] fromColumns, String[] toColumns)
joinType
- an int identifying the type of join (e.g., INNER, LEFT
OUTER), valid join types are defined in EboSqlHelperjoinTable
- name of table to be joined to. Joins are always from
the previous table specified to the table defined in the addJoin method.
The first join in a query is always from the query's primary table.fromColumns
- an array identifying the column(s) to be joined on
from the first table in a join.toColumns
- an array identifying the column(s) to be joined on
from the second table in a join (i.e., the table specified in joinTable)public void addJoin(int joinType, String joinTable, String joinAlias, String[] fromColumns, String[] toColumns, EbiQueryExpression exp)
joinType
- an int identifying the type of join (e.g., INNER, LEFT
OUTER), valid join types are defined on EboSqlHelperjoinTable
- name of table to be joined to. Joins are always from
the previous table specified to the table defined in the addJoin method.
The first join in a query is always from the query's primary table.joinAlias
- an alias for the joinTable; can be null if a table is
not being joined onto itself.fromColumns
- an array identifying the column(s) to be joined on
from the first table in a join.toColumns
- an array identifying the column(s) to be joined on
from the second table in a join (i.e., the table specified in joinTable)exp
- an expression to be appended to the join. Can be null.
This differs from the query expression contained in the WHERE clause
because the join will fail if this expression isn't satisfied.public void clear()
public void clear(String tableName, String tableAlias)
tableName
- is the primary table for the new querytableAlias
- is the primary table's alias for the new query, may be nullpublic void setPrimaryTable(String tableName)
tableName
- is the primary table for the new querypublic void setPrimaryTable(String tableName, String tableAlias)
tableName
- is the primary table for the new querytableAlias
- is the primary table's alias for the new query, may be nullpublic String getPrimaryTable()
public String getPrimaryAlias()
public void setMaxRows(Integer maxRows)
maxRows
- is an Integer containing the maximum rows to be returned.public Integer getMaxRows()
public void setMaxFieldSize(Integer maxFieldSize)
maxFieldSize
- is an Integer containing the maximum column width
to be returned.public Integer getMaxFieldSize()
public void setFetchSize(Integer fetchSize)
fetchSize
- is an Integer containing the desired fetch size to
be used with the query.public Integer getFetchSize()
public void setFetchDirection(Integer fetchDirection)
fetchDirection
- is an Integer containing the desired fetch
direction to be used with the query.public Integer getFetchDirection()
public void setEscapeProcessing(Boolean escapeProcessing)
escapeProcessing
- is a Boolean indicating whether the query should
use escape processing.public Boolean getEscapeProcessing()
public void setQueryTimeout(Integer timeoutSeconds)
timeoutSeconds
- is an Integer containing the timeout interval
in seconds to be used with the query.public Integer getQueryTimeout()
public void setDistinct(boolean distinct)
distinct
- is a boolean indicating whether the query should
use the DISTINCT keyword. The default value is false.public boolean getDistinct()
public Object[] getInParameters()
|
Novell exteNd Director 5.0 API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |