|
© 2002 BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.bea.p13n.content.document.ref.StatementParams
RefSQLGenerator
instance configured as needed.
A little holder class for the information required to create and execute a PreparedStatement, plus how to convert a Search/Expression into a StatementParams.
This class is specific to the table structure of the RefDocumentProvider.
Field Summary | |
static short |
AND_TYPE
Deprecated. The LogicalAnd/LogicalMulitAnd expression type. |
static short |
COLLECTION_CONTAINS_ALL_TYPE
Deprecated. The CollectionContainsAll expression type. |
static short |
COLLECTION_CONTAINS_TYPE
Deprecated. The CollectionContains expression type. |
static java.text.DateFormat |
dateFormat
Deprecated. 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
Deprecated. The document_metadata table name. |
static java.lang.String |
DOC_TABLE
Deprecated. The document table name. |
static short |
EQUALS_TYPE
Deprecated. The Equals expression type. |
static short |
GREATER_OR_EQUALS_TYPE
Deprecated. The GreaterOrEquals expression type. |
static short |
GREATER_THAN_TYPE
Deprecated. The GreaterThan expression type. |
static short |
LESS_OR_EQUALS_TYPE
Deprecated. The LessOrEquals expression type. |
static short |
LESS_THAN_TYPE
Deprecated. The LessThan expression type. |
static short |
LIKE_TYPE
Deprecated. The StringLike expression type. |
long |
maxReturn
Deprecated. The max number to return (0 or less for all). |
static short |
NOT_EQUALS_TYPE
Deprecated. The NotEquals expression type. |
static short |
NOT_TYPE
Deprecated. The LogicalNot expression type. |
static short |
OR_TYPE
Deprecated. The LogicalOr/LogicalMulitOr expression type. |
java.util.List |
params
Deprecated. The list of input parameters that match up with the SQL string. |
SortCriteria[] |
sortCriteria
Deprecated. The list of SortCriteria needing to be applied. |
java.lang.String |
sql
Deprecated. The SQL string. |
Constructor Summary | |
StatementParams()
Deprecated. |
Method Summary | |
protected static void |
createBranchStatementParams(java.lang.StringBuffer buf,
Expression expr,
java.util.List params,
boolean supportsLikeEscapeClause)
Deprecated. Utility to convert a branch expression into a SQL expression. |
protected static void |
createLeafStatementParams(java.lang.StringBuffer buf,
Expression expr,
java.util.List params,
boolean supportsLikeEscapeClause)
Deprecated. Utility to convert a valid leaf Expression into a SQL expression. |
protected static java.lang.String |
createStatementParams(Expression expr,
java.util.List params,
boolean supportsLikeEscapeClause)
Deprecated. Utility method to convert an Expression into a SQL expression. |
protected static void |
createStatementParams(java.lang.StringBuffer buf,
Expression expr,
java.util.List params,
boolean supportsLikeEscapeClause)
Deprecated. Utility method to convert an Expression into a SQL expression. |
static java.lang.String |
getExpressionString(short type)
Deprecated. Get the expression string for the specified expression type. |
static short |
getExpressionType(Expression expr)
Deprecated. Get a type constant for the given expression. |
protected static PropertyRef |
getLeftHandSide(Expression expr)
Deprecated. Get the left-hand-side of an expression. |
protected static java.lang.Object |
getRightHandSide(Expression expr)
Deprecated. Get the right-hand-side of an expression. |
static java.lang.String |
getSQLOperator(short type)
Deprecated. Return the corresponding SQL operator for the given expression type. |
static StatementParams |
getStatementParams(java.lang.String baseSql,
Search params,
boolean supportsLikeEscapeClause)
Deprecated. Utility method to get a StatementParams from Search params. |
protected static Expression |
getSubExpression(Expression expr,
int count)
Deprecated. Get the specified subexpression. |
static boolean |
isLegalSingleValueExpressionType(short type)
Deprecated. Determine if a comparator is legal, single-value attribute comparator. |
java.sql.PreparedStatement |
prepare(java.sql.Connection con)
Deprecated. Prepare a statement from our sql and input params on the given database connection. |
void |
sort(java.util.List list)
Deprecated. Sort a list of DocumentMetadataDefs based upon our sort criteria. |
static java.lang.Object |
toSQLLike(java.lang.Object obj,
boolean supportsLikeEscapeClause)
Deprecated. Convert an object, which might be a string, to a SQL like string. |
static java.lang.String |
toSQLLike(java.lang.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 java.lang.String DOC_TABLE
RefDocumentProvider.DOC_TABLE
public static final java.lang.String DOC_MD_TABLE
RefDocumentProvider.DOC_MD_TABLE
public static final short NOT_EQUALS_TYPE
getExpressionType(com.bea.p13n.expression.Expression)
public static final short EQUALS_TYPE
getExpressionType(com.bea.p13n.expression.Expression)
public static final short GREATER_THAN_TYPE
getExpressionType(com.bea.p13n.expression.Expression)
public static final short LESS_THAN_TYPE
getExpressionType(com.bea.p13n.expression.Expression)
public static final short GREATER_OR_EQUALS_TYPE
getExpressionType(com.bea.p13n.expression.Expression)
public static final short LESS_OR_EQUALS_TYPE
getExpressionType(com.bea.p13n.expression.Expression)
public static final short LIKE_TYPE
getExpressionType(com.bea.p13n.expression.Expression)
public static final short COLLECTION_CONTAINS_TYPE
getExpressionType(com.bea.p13n.expression.Expression)
public static final short COLLECTION_CONTAINS_ALL_TYPE
getExpressionType(com.bea.p13n.expression.Expression)
public static final short AND_TYPE
getExpressionType(com.bea.p13n.expression.Expression)
public static final short OR_TYPE
getExpressionType(com.bea.p13n.expression.Expression)
public static final short NOT_TYPE
getExpressionType(com.bea.p13n.expression.Expression)
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, boolean supportsLikeEscapeClause) throws DocumentException
baseSql
- the base select part of the sql (no from, no where,
"doc" is document table, "md" is document_metadata table).params
- the list to add the prepared statement parameters to.supportsLikeEscapeClause
- tells if the SQL statement can use the
LIKE ESCAPE clause.protected static java.lang.String createStatementParams(Expression expr, java.util.List params, boolean supportsLikeEscapeClause) throws DocumentException
expr
- the expression object.params
- the prepared statement input parameters list (will be
appended to).supportsLikeEscapeClause
- tells if the SQL statement can use the
LIKE ESCAPE clause.protected static void createStatementParams(java.lang.StringBuffer buf, Expression expr, java.util.List params, boolean supportsLikeEscapeClause) throws DocumentException
buf
- the string buffer to write into.expr
- the expression object.params
- the prepared statement input parameters list (will be
appended to).supportsLikeEscapeClause
- tells if the SQL statement can use the
LIKE ESCAPE clause.protected static Expression getSubExpression(Expression expr, int count) throws DocumentException
ExpressionHelper.getSubExpression(com.bea.p13n.expression.Expression, int)
protected static PropertyRef getLeftHandSide(Expression expr) throws DocumentException
ExpressionHelper.getLeftHandSide(com.bea.p13n.expression.Expression)
protected static java.lang.Object getRightHandSide(Expression expr) throws DocumentException
ExpressionHelper.getRightHandSide(com.bea.p13n.expression.Expression)
protected static void createLeafStatementParams(java.lang.StringBuffer buf, Expression expr, java.util.List params, boolean supportsLikeEscapeClause) throws DocumentException
buf
- the string buffer to write into.expr
- the expression object.params
- the prepared statement input parameters list (will be
appended to).supportsLikeEscapeClause
- tells if the SQL statement can use the
LIKE ESCAPE clause.protected static void createBranchStatementParams(java.lang.StringBuffer buf, Expression expr, java.util.List params, boolean supportsLikeEscapeClause) throws DocumentException
buf
- the string buffer to write into.expr
- the branch expression.params
- the prepared statement input parameters list (will be
appended to).supportsLikeEscapeClause
- tells if the SQL statement can use the
LIKE ESCAPE clause.public static short getExpressionType(Expression expr) throws DocumentException
NOT_EQUALS_TYPE
,
EQUALS_TYPE
,
GREATER_THAN_TYPE
,
LESS_THAN_TYPE
,
GREATER_OR_EQUALS_TYPE
,
LESS_OR_EQUALS_TYPE
,
LIKE_TYPE
,
COLLECTION_CONTAINS_TYPE
,
COLLECTION_CONTAINS_ALL_TYPE
,
AND_TYPE
,
OR_TYPE
,
NOT_TYPE
public static java.lang.String getExpressionString(short type) throws DocumentException
NOT_EQUALS_TYPE
,
EQUALS_TYPE
,
GREATER_THAN_TYPE
,
LESS_THAN_TYPE
,
GREATER_OR_EQUALS_TYPE
,
LESS_OR_EQUALS_TYPE
,
LIKE_TYPE
,
COLLECTION_CONTAINS_TYPE
,
COLLECTION_CONTAINS_ALL_TYPE
,
AND_TYPE
,
OR_TYPE
,
NOT_TYPE
public static boolean isLegalSingleValueExpressionType(short type)
public static java.lang.String getSQLOperator(short type) throws DocumentException
op
- the comparator (one from TypesHelper).public static java.lang.String toSQLLike(java.lang.String like, boolean supportsLikeEscapeClause)
public static java.lang.Object toSQLLike(java.lang.Object obj, boolean supportsLikeEscapeClause)
|
© 2002 BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |