public class EtxSqlHandler extends ChainedSqlHandler implements SqlHandler
On initialization, the handler reads a list of etx-indices from a
configuration file.
This configurationfile must be named etxindices.xml and located
inside the databases configuration directory.
It's dtd is located in the directory
org.mmbase.storage.search.implementation.database.informix.excalibur.resources
in the MMBase source tree and
here online.
| Constructor and Description |
|---|
EtxSqlHandler(SqlHandler successor)
Creates a new instance of EtxueryHandler.
|
| Modifier and Type | Method and Description |
|---|---|
void |
appendConstraintToSql(StringBuilder sb,
Constraint constraint,
SearchQuery query,
boolean inverse,
boolean inComposite)
Represents Constraint object, that is not a CompositeConstraint,
as a constraint in SQL format, appending the result to a stringbuffer.
|
protected boolean |
containsOtherStringSearchConstraints(Constraint constraint,
StringSearchConstraint searchConstraint)
Tests if a constaint is/contains another stringsearch constraint than
the specified one.
|
int |
getSupportLevel(Constraint constraint,
SearchQuery query)
Gets the level at which a constraint is supported for a query
by this handler.
|
int |
getSupportLevel(int feature,
SearchQuery query)
Gets the level at which a feature is supported for a query
by this handler.
|
protected boolean |
hasAdditionalConstraints(SearchQuery query)
Tests if the query contains additional constraints, i.e.
|
boolean |
hasEtxIndex(StepField field)
Tests if an Excelibur Text Search index has been made for this field.
|
(package private) static String |
toBuilderField(String dbTable,
String dbField)
Finds builderfield corresponding to the database table and field names.
|
appendQueryBodyToSql, getAllowedValue, getSuccessor, toSqlclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitappendQueryBodyToSql, getAllowedValue, toSqlpublic EtxSqlHandler(SqlHandler successor) throws IOException
successor - Successor in chain or responsibility.IOExceptionpublic void appendConstraintToSql(StringBuilder sb, Constraint constraint, SearchQuery query, boolean inverse, boolean inComposite) throws SearchQueryException
SqlHandlerappendConstraintToSql in interface SqlHandlerappendConstraintToSql in class ChainedSqlHandlersb - The stringbuffer to append to.constraint - The (non-composite) constraint.query - The searchquery containing the constraint.inverse - True when the inverse constraint must be represented,
false otherwise.inComposite - True when the constraint is part of
a composite expression.SearchQueryExceptionpublic int getSupportLevel(int feature,
SearchQuery query)
throws SearchQueryException
SqlHandlergetSupportLevel in interface SqlHandlergetSupportLevel in class ChainedSqlHandlerSearchQueryExceptionpublic int getSupportLevel(Constraint constraint, SearchQuery query) throws SearchQueryException
SqlHandlergetSupportLevel in interface SqlHandlergetSupportLevel in class ChainedSqlHandlerSearchQueryExceptionpublic boolean hasEtxIndex(StepField field)
field - the field.protected boolean hasAdditionalConstraints(SearchQuery query)
query - the query.protected boolean containsOtherStringSearchConstraints(Constraint constraint, StringSearchConstraint searchConstraint)
constraint - the constraint.searchConstraint - the stringsearch constraint.static String toBuilderField(String dbTable, String dbField)
dbTable - The tablename used in the database.dbField - The fieldname used in the database.IllegalArgumentException - when an invalid argument is supplied.MMBase 1.9-SNAPSHOT - ${javadoctimestamp}