|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmbase.storage.search.implementation.database.ChainedSqlHandler
org.mmbase.storage.search.implementation.database.informix.excalibur.EtxSqlHandler
public class EtxSqlHandler
The Etx query handler adds support for Excalibur Text Search constraints, when used with an Informix database and an Excalibur Text Search datablade. This class is provided as a coding example of a ChainedSqlHandler.
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 Summary | |
|---|---|
EtxSqlHandler(SqlHandler successor)
Creates a new instance of EtxueryHandler. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class org.mmbase.storage.search.implementation.database.ChainedSqlHandler |
|---|
appendQueryBodyToSql, getAllowedValue, getSuccessor, toSql |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.mmbase.storage.search.implementation.database.SqlHandler |
|---|
appendQueryBodyToSql, getAllowedValue, toSql |
| Constructor Detail |
|---|
public EtxSqlHandler(SqlHandler successor)
throws IOException
successor - Successor in chain or responsibility.
IOException| Method Detail |
|---|
public void appendConstraintToSql(StringBuilder sb,
Constraint constraint,
SearchQuery query,
boolean inverse,
boolean inComposite)
throws SearchQueryException
SqlHandler
appendConstraintToSql 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.
SearchQueryException
public int getSupportLevel(int feature,
SearchQuery query)
throws SearchQueryException
SqlHandler
getSupportLevel in interface SqlHandlergetSupportLevel in class ChainedSqlHandlerSearchQueryException
public int getSupportLevel(Constraint constraint,
SearchQuery query)
throws SearchQueryException
SqlHandler
getSupportLevel 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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||