|
Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.beasys.commerce.ebusiness.catalog.service.query.QueryHelper
@Deprecated public class QueryHelper
Helper class for performing Product Catalog queries.
Field Summary | |
---|---|
static String |
DEFAULT_ENTITY_ID_TABLE_NAME
Deprecated The default entity identifier table |
static String |
DEFAULT_PROPERTY_BOOLEAN_COLUMN_NAME
Deprecated The default boolean property table |
static String |
DEFAULT_PROPERTY_DATETIME_COLUMN_NAME
Deprecated The default date/time property table |
static String |
DEFAULT_PROPERTY_FLOAT_COLUMN_NAME
Deprecated The default float property table |
static String |
DEFAULT_PROPERTY_ID_TABLE_NAME
Deprecated The default property identifier table |
static String |
DEFAULT_PROPERTY_INTEGER_COLUMN_NAME
Deprecated The default integer property table |
static String |
DEFAULT_PROPERTY_TEXT_COLUMN_NAME
Deprecated The default text property table |
static String |
DEFAULT_PROPERTY_VALUE_TABLE
Deprecated The default property table |
static String |
DEFAULT_TABLE_PREFIX
Deprecated The default table prefix |
Constructor Summary | |
---|---|
QueryHelper(JdbcCatalogFactory jdbcCatFac,
Boolean supportsLikeEscapeClause)
Deprecated |
Method Summary | |
---|---|
static List |
fixKeywords(String[] keywords)
Deprecated Fix up an array of keywords by removing nulls and duplicates. |
protected StringBuffer |
getSearchSQL(boolean showAll,
List params,
boolean isCategory)
Deprecated Get the SQL where clause for the showAll parameter. |
protected StringBuffer |
getSearchSQL(Expression expr,
String prefix,
boolean supportsLikeEscapeClause,
List params,
boolean isCategory)
Deprecated Get the SQL where clause for an expression. |
protected StringBuffer |
getSearchSQL(List keywords,
String logical,
List params)
Deprecated Get the SQL where clause for the keywords. |
protected void |
getSearchSQL(StringBuffer buf,
Criteria c,
String prefix,
boolean supportsLikeEscapeClause,
List params,
boolean isCategory)
Deprecated Get the SQL where clause for a Criteria. |
protected void |
getSearchSQL(StringBuffer buf,
Expression expr,
String prefix,
boolean supportsLikeEscapeClause,
List params,
boolean isCategory)
Deprecated Get the SQL where clause for an expression. |
protected void |
getSearchSQL(StringBuffer buf,
Logical l,
String prefix,
boolean supportsLikeEscapeClause,
List params,
boolean isCategory)
Deprecated Get the SQL where clause for a Criteria. |
protected void |
getSearchSQL(StringBuffer buf,
String prefix,
boolean supportsLikeEscapeClause,
String column,
String scope,
String name,
String op,
Object val,
List params,
boolean isCategory)
Deprecated Get the SQL for searching for an implicit property in a certain WLCS_PROP_* table. |
protected StringBuffer |
getSearchSQL(String lang,
List params,
boolean isCategory)
Deprecated Get the SQL where clause for the lang parameter. |
static String |
getSQLOperator(String c)
Deprecated Return the corresponding SQL operator for the given comparator. |
static boolean |
isLegalSingleValueComparator(String c)
Deprecated Determine if a comparator is legal, single-value attribute comparator. |
static void |
main(String[] args)
Deprecated Quick unit test of keyword search. |
List |
search(Connection con,
boolean showAll,
String lang,
Expression expr,
String tablePrefix)
Deprecated Perform an expression search. |
List |
search(Connection con,
boolean showAll,
String lang,
List keywords)
Deprecated Perform an AND'ed keyword search. |
List |
search(Connection con,
boolean showAll,
String lang,
List keywords,
String logical)
Deprecated Perform a keyword search. |
List |
search(Connection con,
boolean showAll,
String lang,
List keywords,
String logical,
Expression expr,
String tablePrefix,
int maxSearchResults)
Deprecated Perform a search |
List |
search(Connection con,
boolean showAll,
String lang,
String logical,
Expression expr,
String tablePrefix,
int maxSearchResults)
Deprecated Perform a search |
static Object |
toSQLLike(Object obj,
boolean supportsLikeEscapeClause)
Deprecated Convert an object, which might be a string, to a SQL like string. |
static String |
toSQLLike(String like,
boolean supportsLikeEscapeClause)
Deprecated Convert a query LIKE value to a SQL LIKE value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DEFAULT_ENTITY_ID_TABLE_NAME
public static final String DEFAULT_PROPERTY_ID_TABLE_NAME
public static final String DEFAULT_PROPERTY_VALUE_TABLE
public static final String DEFAULT_PROPERTY_BOOLEAN_COLUMN_NAME
public static final String DEFAULT_PROPERTY_INTEGER_COLUMN_NAME
public static final String DEFAULT_PROPERTY_FLOAT_COLUMN_NAME
public static final String DEFAULT_PROPERTY_TEXT_COLUMN_NAME
public static final String DEFAULT_PROPERTY_DATETIME_COLUMN_NAME
public static final String DEFAULT_TABLE_PREFIX
Constructor Detail |
---|
public QueryHelper(JdbcCatalogFactory jdbcCatFac, Boolean supportsLikeEscapeClause)
Method Detail |
---|
public static List fixKeywords(String[] keywords)
keywords
- the array of keywords.
public List search(Connection con, boolean showAll, String lang, String logical, Expression expr, String tablePrefix, int maxSearchResults) throws CatalogException
con
- the database connection to use.showAll
- true to show invisible items, false to not.lang
- the language to match on (null for any).keywords
- the list of keywords (no nulls, no duplicates, null for
none).logical
- TypesHelper.AND or TypesHelper.OR (for keywords).expr
- the query expression to use (already normalized, null for
none).tablePrefix
- the table prefix for the ConfigurableEntity tables
for implicit properties.
CatalogException
TypesHelper
public List search(Connection con, boolean showAll, String lang, List keywords, String logical, Expression expr, String tablePrefix, int maxSearchResults) throws CatalogException
con
- the database connection to use.showAll
- true to show invisible items, false to not.lang
- the language to match on (null for any).keywords
- the list of keywords (no nulls, no duplicates, null for
none).logical
- TypesHelper.AND or TypesHelper.OR (for keywords).expr
- the query expression to use (already normalized, null for
none).tablePrefix
- the table prefix for the ConfigurableEntity tables
for implicit properties.
CatalogException
TypesHelper
public List search(Connection con, boolean showAll, String lang, List keywords, String logical) throws CatalogException
con
- the database connection to use.showAll
- true to show invisible items, false to not.lang
- the language to match on (null for any).keywords
- the list of keywords (no nulls, no duplicates).logical
- TypesHelper.AND or TypesHelper.OR.
CatalogException
public List search(Connection con, boolean showAll, String lang, List keywords) throws CatalogException
con
- the database connection to use.showAll
- true to show invisible items, false to not.lang
- the language to match on (null for any).keywords
- the list of keywords (no nulls, no duplicates).
CatalogException
public List search(Connection con, boolean showAll, String lang, Expression expr, String tablePrefix) throws CatalogException
con
- the database connection to use.showAll
- true to show invisible items, false to not.lang
- the language to match on (null for any).expr
- the normalized expression to use.tablePrefix
- the table prefix for the ConfigurableEntity tables
for implicit properties.
CatalogException
protected StringBuffer getSearchSQL(boolean showAll, List params, boolean isCategory)
showAll
- whether to show invisible items (true), or not (false).params
- the list of prepared statement params to add to.
protected StringBuffer getSearchSQL(String lang, List params, boolean isCategory)
showAll
- the lang (null for none).params
- the list of prepared statement params to add to.
protected StringBuffer getSearchSQL(List keywords, String logical, List params)
keywords
- the list of keywords (no nulls, no duplicates, null for
none).logical
- TypesHelper.AND or TypesHelper.OR (for keywords).params
- the list of prepared statement params to add to.
protected StringBuffer getSearchSQL(Expression expr, String prefix, boolean supportsLikeEscapeClause, List params, boolean isCategory) throws CatalogException
expr
- the expression (already normalized, null for none).prefix
- the table prefix for the ConfigurableEntity tables
for implicit properties.supportsLikeEscapeClause
- tells if the SQL statement can use the
LIKE ESCAPE clause.params
- the list of prepared statement params to add to.
CatalogException
protected void getSearchSQL(StringBuffer buf, Expression expr, String prefix, boolean supportsLikeEscapeClause, List params, boolean isCategory) throws CatalogException
buf
- the buffer to write into.expr
- the expression (already normalized, null for none).prefix
- the table prefix for the ConfigurableEntity tables
for implicit properties.supportsLikeEscapeClause
- tells if the SQL statement can use the
LIKE ESCAPE clause.params
- the list of prepared statement params to add to.
CatalogException
protected void getSearchSQL(StringBuffer buf, Criteria c, String prefix, boolean supportsLikeEscapeClause, List params, boolean isCategory) throws CatalogException
buf
- the buffer to write into.c
- the Criteria.prefix
- the table prefix for the ConfigurableEntity tables
for implicit properties.supportsLikeEscapeClause
- tells if the SQL statement can use the
LIKE ESCAPE clause.params
- the list of prepared statement params to add to.
CatalogException
protected void getSearchSQL(StringBuffer buf, String prefix, boolean supportsLikeEscapeClause, String column, String scope, String name, String op, Object val, List params, boolean isCategory)
buf
- the buffer to write into.prefix
- the table prefix.supportsLikeEscapeClause
- tells if the SQL statement can use the
LIKE ESCAPE clause.table
- the WLCS_PROP_* table name (e.g. WLCS_PROP_TEXT).scope
- the property scope name (null for any scope).name
- the property name.op
- the operator.val
- the value to matchparams
- the list of prepared statement params to add to.protected void getSearchSQL(StringBuffer buf, Logical l, String prefix, boolean supportsLikeEscapeClause, List params, boolean isCategory) throws CatalogException
buf
- the buffer to write into.l
- the Logical.prefix
- the table prefix for the ConfigurableEntity tables
for implicit properties.supportsLikeEscapeClause
- tells if the SQL statement can use the
LIKE ESCAPE clause.params
- the list of prepared statement params to add to.
CatalogException
public static boolean isLegalSingleValueComparator(String c)
public static String getSQLOperator(String c)
op
- the comparator (one from TypesHelper).public static String toSQLLike(String like, boolean supportsLikeEscapeClause)
public static Object toSQLLike(Object obj, boolean supportsLikeEscapeClause)
public static void main(String[] args) throws Exception
Exception
|
Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |