|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmbase.storage.search.legacy.QueryConvertor
public class 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 | |
|---|---|
(package private) static StorageManagerFactory<?> |
factory
|
| Constructor Summary | |
|---|---|
QueryConvertor()
|
|
| Method Summary | |
|---|---|
static String |
altaVista2SQL(String query)
Deprecated. Use setConstraint() to parse
these expressions. |
static String |
altaVista2SQL(String query,
StorageManagerFactory<?> smf)
Deprecated. Use setConstraint() to parse
these expressions. |
static void |
setConstraint(BasicSearchQuery query,
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 |
|---|
static StorageManagerFactory<?> factory
| Constructor Detail |
|---|
public QueryConvertor()
| Method Detail |
|---|
public static String altaVista2SQL(String query,
StorageManagerFactory<?> smf)
setConstraint() to parse
these expressions.
query - the query to convertsmf - the storagemanagerfactory to use when converting fieldnamespublic static String altaVista2SQL(String query)
setConstraint() to parse
these expressions.
query - the query to convert
public static void setConstraint(BasicSearchQuery query,
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 | |||||||||