|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ISelectQueryCallback
The ISelectQueryCallback interface is intended to facilitate query string generation based on the domain specific requirements.
A class implements this interface to indicate that the instances of that class can produce a predicate string, an order by string, and other sub strings by introspecting the query objects in the framework. The query domain expert should resolve attribute mapping and syntax conversion in such a callback class so the meaningful query strings can be generically generated. That means the business developers for a domain can easily use the query framework without the knowledge of framework architecture or query callback implementation.
Field Summary | |
---|---|
static java.lang.String |
JOIN_CONDITIONS
|
static java.lang.String |
JOIN_TABLES
|
static java.lang.String |
JOINS
|
static java.lang.String |
LAST_TABLE_ALIAS_INTEGER
|
static java.lang.String |
MULTIVALUE_PROPERTY_NAMES
|
static java.lang.String |
NAME_MAPPING
|
static java.lang.String |
PREDICATE_IS_NULL
|
static java.lang.String |
SELECT_ATTRIBUTES
|
static java.lang.String |
TABLE_MAP
|
static java.lang.String |
TABLE_NAME
|
static java.lang.String |
TYPE_MAPPING
|
Method Summary | |
---|---|
java.lang.String |
buildArithmeticCondition(IArithmeticCondition arithmeticCondition)
Returns the string representation for the given operator. |
void |
buildArithmeticCondition(IArithmeticCondition arithmeticCondition,
java.lang.StringBuffer sb)
|
java.lang.String |
buildAttribute(IAttribute attribute)
Returns the string representation for the given attribute. |
void |
buildAttribute(IAttribute attribute,
java.lang.StringBuffer sb)
|
java.lang.String |
buildCondition(ICondition condition)
Returns the string representation for the given condition. |
void |
buildCondition(ICondition condition,
java.lang.StringBuffer sb)
|
void |
buildFrom(IFrom from,
java.lang.StringBuffer sb)
Returns the string representation for the given from. |
void |
buildFrom(ISelectQuery selectQuery,
java.lang.StringBuffer sb)
Returns the string representation for the given from. |
java.lang.String |
buildFunction(IFunction function)
Returns the string representation for the given function. |
void |
buildFunction(IFunction function,
java.lang.StringBuffer sb)
|
void |
buildJoin(IJoin join,
java.lang.StringBuffer sb)
Returns the string representation for the given join. |
java.lang.String |
buildLimit(ILimit limit)
Returns the string representation for the given limit clause. |
void |
buildLimit(ILimit limit,
java.lang.StringBuffer sb)
|
java.lang.String |
buildLimit(ISelectQuery selectQuery)
Returns the string representation for the limit part of the given select query. |
void |
buildLimit(ISelectQuery selectQuery,
java.lang.StringBuffer sb)
|
java.lang.String |
buildOperator(IOperator operator)
Returns the string representation for the given operator. |
void |
buildOperator(IOperator operator,
java.lang.StringBuffer sb)
|
java.lang.String |
buildOrderBy(IOrderBy orderBy)
Returns the string representation for the given order by clause. |
void |
buildOrderBy(IOrderBy orderBy,
java.lang.StringBuffer sb)
|
java.lang.String |
buildOrderBy(ISelectQuery selectQuery)
Returns the string representation for the order by part of the given select query. |
void |
buildOrderBy(ISelectQuery selectQuery,
java.lang.StringBuffer sb)
|
java.lang.String |
buildOrderByExpression(IOrderByExpression orderByExpression)
Returns the string representation for the given order by expression. |
void |
buildOrderByExpression(IOrderByExpression orderByExpression,
java.lang.StringBuffer sb)
|
java.lang.String |
buildPredicate(IPredicate predicate)
Returns the string representation for the given predicate. |
void |
buildPredicate(IPredicate predicate,
java.lang.StringBuffer sb)
|
java.lang.String |
buildPredicate(IQuery query)
Returns the string representation for the predicate part of the given query. |
void |
buildPredicate(IQuery query,
java.lang.StringBuffer sb)
|
java.lang.String |
buildQuery(IQuery query)
Returns the string representation for the given query. |
void |
buildSelect(ISelect select,
java.lang.StringBuffer sb)
Returns the string representation for the given select. |
java.lang.String |
buildSelectQuery(ISelectQuery selectQuery)
Returns the string representation for the given select query. |
void |
buildSelectQuery(ISelectQuery selectQuery,
java.lang.StringBuffer sb)
|
void |
buildTable(ITable table,
java.lang.StringBuffer sb)
Returns the string representation for the given table. |
java.lang.String |
buildValue(IValue value)
Returns the string representation for the given value. |
void |
buildValue(IValue value,
java.lang.StringBuffer sb)
|
Field Detail |
---|
static final java.lang.String MULTIVALUE_PROPERTY_NAMES
static final java.lang.String TABLE_NAME
static final java.lang.String SELECT_ATTRIBUTES
static final java.lang.String TABLE_MAP
static final java.lang.String LAST_TABLE_ALIAS_INTEGER
static final java.lang.String PREDICATE_IS_NULL
static final java.lang.String JOIN_CONDITIONS
static final java.lang.String JOIN_TABLES
static final java.lang.String JOINS
static final java.lang.String NAME_MAPPING
static final java.lang.String TYPE_MAPPING
Method Detail |
---|
java.lang.String buildAttribute(IAttribute attribute) throws QueryException
QueryException
void buildAttribute(IAttribute attribute, java.lang.StringBuffer sb) throws QueryException
QueryException
java.lang.String buildCondition(ICondition condition) throws QueryException
Returns the string representation for the given condition. Domain specific condition syntax can be applied here to generate meaningful strings.
This method should define string generation for all possible operators in terms of text for operators and notatation for attributes (infix, postfix or prefix). A sample code in the builder callback could look like:
if (operator is GT) ...
elseif (operator is BTW) ...
elseif (operator is MVALL) ...
elseif ......
QueryException
void buildCondition(ICondition condition, java.lang.StringBuffer sb) throws QueryException
QueryException
java.lang.String buildFunction(IFunction function) throws QueryException
QueryException
void buildFunction(IFunction function, java.lang.StringBuffer sb) throws QueryException
QueryException
java.lang.String buildArithmeticCondition(IArithmeticCondition arithmeticCondition) throws QueryException
QueryException
void buildArithmeticCondition(IArithmeticCondition arithmeticCondition, java.lang.StringBuffer sb) throws QueryException
QueryException
java.lang.String buildOperator(IOperator operator) throws QueryException
QueryException
void buildOperator(IOperator operator, java.lang.StringBuffer sb) throws QueryException
QueryException
java.lang.String buildOrderBy(IOrderBy orderBy) throws QueryException
QueryException
void buildOrderBy(IOrderBy orderBy, java.lang.StringBuffer sb) throws QueryException
QueryException
java.lang.String buildOrderBy(ISelectQuery selectQuery) throws QueryException
QueryException
void buildOrderBy(ISelectQuery selectQuery, java.lang.StringBuffer sb) throws QueryException
QueryException
java.lang.String buildOrderByExpression(IOrderByExpression orderByExpression) throws QueryException
QueryException
void buildOrderByExpression(IOrderByExpression orderByExpression, java.lang.StringBuffer sb) throws QueryException
QueryException
java.lang.String buildLimit(ILimit limit) throws QueryException
QueryException
void buildLimit(ILimit limit, java.lang.StringBuffer sb) throws QueryException
QueryException
java.lang.String buildLimit(ISelectQuery selectQuery) throws QueryException
QueryException
void buildLimit(ISelectQuery selectQuery, java.lang.StringBuffer sb) throws QueryException
QueryException
java.lang.String buildPredicate(IPredicate predicate) throws QueryException
QueryException
void buildPredicate(IPredicate predicate, java.lang.StringBuffer sb) throws QueryException
QueryException
java.lang.String buildPredicate(IQuery query) throws QueryException
QueryException
void buildPredicate(IQuery query, java.lang.StringBuffer sb) throws QueryException
QueryException
java.lang.String buildQuery(IQuery query) throws QueryException
QueryException
java.lang.String buildSelectQuery(ISelectQuery selectQuery) throws QueryException
QueryException
void buildSelectQuery(ISelectQuery selectQuery, java.lang.StringBuffer sb) throws QueryException
QueryException
java.lang.String buildValue(IValue value) throws QueryException
QueryException
void buildValue(IValue value, java.lang.StringBuffer sb) throws QueryException
QueryException
void buildTable(ITable table, java.lang.StringBuffer sb) throws QueryException
QueryException
void buildSelect(ISelect select, java.lang.StringBuffer sb) throws QueryException
QueryException
void buildFrom(IFrom from, java.lang.StringBuffer sb) throws QueryException
QueryException
void buildFrom(ISelectQuery selectQuery, java.lang.StringBuffer sb) throws QueryException
QueryException
void buildJoin(IJoin join, java.lang.StringBuffer sb) throws QueryException
QueryException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |