|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.beasys.commerce.axiom.document.ref.StatementParams
A little holder class for the information required to create and execute a PreparedStatement, plus how to convert a Search/Expression/Criteria/Logical into a StatementParams.
This class is specific to the table structure of the RefDocumentProvider.
Field Summary | |
static java.text.DateFormat |
dateFormat
A date formatter for "MM/dd/yyyy HH:mm:ss z" (02/28/2000 15:58:35 MST). |
static java.lang.String |
DOC_MD_TABLE
The wlcs_document_metadata table name. |
static java.lang.String |
DOC_TABLE
The wlcs_document table name. |
long |
maxReturn
The max number to return (0 or less for all). |
java.util.List |
params
The list of input parameters that match up with the SQL string. |
SortCriteria[] |
sortCriteria
The list of SortCriteria needing to be applied. |
java.lang.String |
sql
The SQL string. |
Constructor Summary | |
StatementParams()
|
Method Summary | |
protected static java.lang.String |
createStatementParams(Expression expr,
java.util.List params)
Utility method to convert an Expression into a SQL expression. |
protected static void |
createStatementParams(java.lang.StringBuffer buf,
Criteria c,
java.util.List params)
Utility to convert a Criteria into a SQL expression. |
protected static void |
createStatementParams(java.lang.StringBuffer buf,
Expression expr,
java.util.List params)
Utility method to convert an Expression into a SQL expression. |
protected static void |
createStatementParams(java.lang.StringBuffer buf,
Logical l,
java.util.List params)
Utility to convert a Logical into a SQL expression. |
static java.lang.String |
getSQLOperator(java.lang.String c)
Return the corresponding SQL operator for the given comparator. |
static StatementParams |
getStatementParams(java.lang.String baseSql,
Search params)
Utility method to get a StatementParams from Search params. |
static boolean |
isLegalSingleValueComparator(java.lang.String c)
Determine if a comparator is legal, single-value attribute comparator. |
java.sql.PreparedStatement |
prepare(java.sql.Connection con)
Prepare a statement from our sql and input params on the given database connection. |
void |
sort(java.util.List list)
Sort a list of DocumentMetadataDefs based upon our sort criteria. |
static java.lang.Object |
toSQLLike(java.lang.Object obj)
Convert an object, which might be a string, to a SQL like string. |
static java.lang.String |
toSQLLike(java.lang.String like)
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 java.lang.String DOC_TABLE
RefDocumentProvider.DOC_TABLE
public static final java.lang.String DOC_MD_TABLE
RefDocumentProvider.DOC_MD_TABLE
public static final java.text.DateFormat dateFormat
public java.lang.String sql
public long maxReturn
public java.util.List params
public SortCriteria[] sortCriteria
This will be null or empty if no additional sorting is required.
Constructor Detail |
public StatementParams()
Method Detail |
public java.sql.PreparedStatement prepare(java.sql.Connection con) throws java.sql.SQLException
public void sort(java.util.List list) throws DocumentException
public static StatementParams getStatementParams(java.lang.String baseSql, Search params) throws DocumentException
baseSql
- the base select part of the sql (no from, no where,
"doc" is document table, "md" is document_metadata table).protected static java.lang.String createStatementParams(Expression expr, java.util.List params) throws DocumentException
expr
- the expression object.params
- the prepared statement input parameters list (will be
appended to).protected static void createStatementParams(java.lang.StringBuffer buf, Expression expr, java.util.List params) throws DocumentException
buf
- the string buffer to write into.expr
- the expression object.params
- the prepared statement input parameters list (will be
appended to).protected static void createStatementParams(java.lang.StringBuffer buf, Criteria c, java.util.List params) throws DocumentException
buf
- the string buffer to write into.c
- the criteria object.params
- the prepared statement input parameters list (will be
appended to).protected static void createStatementParams(java.lang.StringBuffer buf, Logical l, java.util.List params) throws DocumentException
buf
- the string buffer to write into.l
- the logical object.params
- the prepared statement input parameters list (will be
appended to).public static boolean isLegalSingleValueComparator(java.lang.String c)
public static java.lang.String getSQLOperator(java.lang.String c)
op
- the comparator (one from TypesHelper).public static java.lang.String toSQLLike(java.lang.String like)
public static java.lang.Object toSQLLike(java.lang.Object obj)
|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |