public abstract class QueryFactory
extends java.lang.Object
EnhancedQueryCriteriaBean
into the subsections that make up a query.
Member Variable | Description |
Map |
Maps table names to unique table identifiers. When joining tables, we are required to provide an alias that is used to reference the table in the query. |
Boolean joinQuery |
Set in initPropertyMap(EnhancedQueryCriteriaBean) |
Modifier and Type | Field and Description |
---|---|
protected boolean |
joinQuery
|
protected java.util.Map<java.lang.String,java.lang.String> |
propertyTablesMap
Maps table names to unique table identifiers.
|
Constructor and Description |
---|
QueryFactory() |
Modifier and Type | Method and Description |
---|---|
static void |
fixQualificationSet(EnhancedQueryQualificationSet query)
All implementations MUST call this method before working with a
EnhancedQueryCriteriaBean , must send in EnhancedQueryCriteriaBean.getWhereClause() as the argument. |
abstract java.lang.String |
getExecuteQuery(EnhancedQueryCriteriaBean query)
Returns the specified execute query.
|
abstract java.lang.String |
getReadQuery(EnhancedQueryCriteriaBean query)
Returns the read query represented by the
EnhancedQueryCriteriaBean . |
void |
initPropertyMap(EnhancedQueryCriteriaBean query)
Sets the
joinQuery parameter to true for read queries with multiple tables, then populates the propertyTablesMap . |
abstract java.lang.String |
parseDeleteTable(EnhancedQueryCriteriaBean query)
Returns the DELETE clause for this update query.
|
abstract java.lang.String |
parseFromClause(EnhancedQueryCriteriaBean query)
Returns the from clause for this read query.
|
abstract java.lang.String |
parseInsertTable(EnhancedQueryCriteriaBean query)
Returns the insert into clause for this insert query.
|
abstract java.lang.String |
parseInsertValues(EnhancedQueryCriteriaBean query)
Returns the (columns) VALUES (columnValues) clause for this insert query.
|
abstract java.lang.String |
parseSelectClause(EnhancedQueryCriteriaBean query)
Returns the select clause for this read query.
|
abstract java.lang.String |
parseUpdateSet(EnhancedQueryCriteriaBean query)
Returns the SET clause for this update query.
|
abstract java.lang.String |
parseUpdateTable(EnhancedQueryCriteriaBean query)
Returns the UPDATE clause for this update query.
|
abstract java.lang.String |
parseWhereClause(EnhancedQueryCriteriaBean query)
Returns the where clause for this read query and update query.
|
protected java.util.Map<java.lang.String,java.lang.String> propertyTablesMap
protected boolean joinQuery
public void initPropertyMap(EnhancedQueryCriteriaBean query) throws OCException
joinQuery
parameter to true for read queries with multiple tables, then populates the propertyTablesMap
.query
- OCException
public abstract java.lang.String getReadQuery(EnhancedQueryCriteriaBean query) throws OCException
EnhancedQueryCriteriaBean
.
query
- OCException
public abstract java.lang.String getExecuteQuery(EnhancedQueryCriteriaBean query) throws OCException
query
- OCException
public abstract java.lang.String parseSelectClause(EnhancedQueryCriteriaBean query) throws OCException
query
- OCException
public abstract java.lang.String parseDeleteTable(EnhancedQueryCriteriaBean query) throws OCException
query
- OCException
public abstract java.lang.String parseFromClause(EnhancedQueryCriteriaBean query) throws OCException
query
- OCException
public abstract java.lang.String parseWhereClause(EnhancedQueryCriteriaBean query) throws OCException
query
- OCException
public abstract java.lang.String parseInsertTable(EnhancedQueryCriteriaBean query) throws OCException
OCException
public abstract java.lang.String parseInsertValues(EnhancedQueryCriteriaBean query) throws OCException
query
- OCException
public abstract java.lang.String parseUpdateTable(EnhancedQueryCriteriaBean query) throws OCException
query
- OCException
public abstract java.lang.String parseUpdateSet(EnhancedQueryCriteriaBean query) throws OCException
query
- OCException
public static void fixQualificationSet(EnhancedQueryQualificationSet query)
EnhancedQueryCriteriaBean
, must send in EnhancedQueryCriteriaBean.getWhereClause()
as the argument.
This method creates empty arrays in place of the null arrays, because:
IQuery
implementation is invoked from a web service, empty array parameters are converted to nullEnhancedQueryQualificationSet
query
-