|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.mmbase.util.QueryConvertor
Class for the converion of a expression string to a SQL where clause.
The expressions string is expected to be in 'altavista' format.
This means that logical operators are identified by '+' (AND), '-' (NOT),
and '|' (OR).
Comparative operators are the same as those used in SCAN (i.e. '=E', '=N', etc)
A wildcarded strings (with '*' or '?' characters) are automatically converted
to a LIKE expression.
The resulting converted expression is preceded with the SQL 'WHERE ' keyword.
Note that if the expression to convert starts with "WHERE", it is not converted at all,
but returned as is.
| Field Summary | |
static MMJdbc2NodeInterface |
database
Database used to convert invalid fieldnames (i.e.e keywords) to valid ones. |
| Constructor Summary | |
QueryConvertor()
|
|
| Method Summary | |
static java.lang.String |
altaVista2SQL(java.lang.String query)
Deprecated. Use setConstraint() to parse
these expressions. |
static java.lang.String |
altaVista2SQL(java.lang.String query,
MMJdbc2NodeInterface db)
Deprecated. Use setConstraint() to parse
these expressions. |
static void |
setConstraint(BasicSearchQuery query,
java.lang.String where)
Sets constraint for a BasicSearchQuery object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static MMJdbc2NodeInterface database
| Constructor Detail |
public QueryConvertor()
| Method Detail |
public static java.lang.String altaVista2SQL(java.lang.String query,
MMJdbc2NodeInterface db)
setConstraint() to parse
these expressions.
query - the query to convertdb - the database to use when converting fieldnamespublic static java.lang.String altaVista2SQL(java.lang.String query)
setConstraint() to parse
these expressions.
query - the query to convert
public static void setConstraint(BasicSearchQuery query,
java.lang.String where)
BasicSearchQuery object.
The constraint may be specified as either one of these formats:
null or empty.
See ConstraintParser for
more on how SQL search conditions are supported.
Note:
This method is provided to support different constraint formats for
backward compatibility (1, 3 and 4 above).
Do not call this method directly from new code, but rather use
ConstraintParser to parse
search constraints.
query - The query.where - The constraint.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||