com.plumtree.server.search
Interface IPTSBooleanQuery

All Superinterfaces:
IPTSModifiableQuery, IPTSQuery

public interface IPTSBooleanQuery
extends IPTSModifiableQuery

An IPTSQuery that is the conjunction (AND) or disjunction (OR) of one or more other IPTSQuery objects.


Method Summary
 void addSubquery(IPTFilter childFilter)
          Add an IPTFilter as a subquery of this IPTSBooleanQuery.
 void addSubquery(IPTSField booleanField, boolean comparisonValue)
          Add a comparison involving a boolean field as a child of this IPTSBooleanQuery.
 void addSubquery(IPTSField numericField, int comparisonOperator, float comparisonValue)
          Add a comparison involving an integer, floating-point, or date field, as a child of this IPTSBooleanQuery.
 void addSubquery(IPTSField numericField, int comparisonOperator, int comparisonValue)
          Add a comparison involving an integer, floating-point, or date field, as a child of this IPTSBooleanQuery.
 void addSubquery(IPTSField numericField, int comparisonOperator, long comparisonValue)
          Add a comparison involving an integer, floating-point, or date field, as a child of this IPTSBooleanQuery.
 void addSubquery(IPTSField dateField, int comparisonOperator, com.plumtree.openfoundation.util.XPDateTime comparisonValue)
          Add a comparison involving a date/time field and a non-relative operator as a child of this IPTSBooleanQuery.
 void addSubquery(IPTSField stringField, java.lang.String queryString, PTSTextQueryParseMode parseMode)
          Add a text query as a child of this IPTSBooleanQuery.
 void addSubquery(IPTSQuery subQuery)
          Add an IPTSQuery to this IPTSBooleanQuery.
 
Methods inherited from interface com.plumtree.server.search.IPTSModifiableQuery
useBestBets, useSpellCorrection, useThesaurus
 

Method Detail

addSubquery

void addSubquery(IPTSQuery subQuery)
Add an IPTSQuery to this IPTSBooleanQuery. This method is usually called several times to add a number of child IPTSQuery objects to this query clause.

Parameters:
subQuery - the IPTSQuery to add to this IPTSBooleanQuery.

addSubquery

void addSubquery(IPTFilter childFilter)
Add an IPTFilter as a subquery of this IPTSBooleanQuery. Convenience method that is equivalent to creating a PropertyFilterQuery and then calling the IPTSQuery form of addSubquery.

Parameters:
childFilter - the IPTFilter to add to the clause

addSubquery

void addSubquery(IPTSField stringField,
                 java.lang.String queryString,
                 PTSTextQueryParseMode parseMode)
Add a text query as a child of this IPTSBooleanQuery. Convenience method that is equivalent to calling IPTSearchFactory.createTextQuery and then calling the IPTSQuery form of addSubquery.

Parameters:
stringField - the field to search. Must be of type PTSFieldType.STRING. Use the field returned by IPTSSearchableCollection.TextQueryDefault to search the default set of fields.
queryString - the string to search for.
parseMode - mode in which to interpret queryString. See class PTSTextQueryParseMode.

addSubquery

void addSubquery(IPTSField numericField,
                 int comparisonOperator,
                 int comparisonValue)
Add a comparison involving an integer, floating-point, or date field, as a child of this IPTSBooleanQuery. Convenience method that is equivalent to calling IPTSearchFactory.createComparisonQuery and then calling the IPTSQuery form of addSubquery.

Parameters:
numericField - the field to compare. Must have type PTSFieldType.INT, PTSFieldType.FLOAT, or PTSFieldType.DATETIME.
comparisonOperator - operator to use for the comparison. For integer or floating-point comparisons, must be one of PT_FILTEROPS.PT_FILTEROP_LT, PT_FILTEROPS.PT_FILTEROP_GT, PT_FILTEROPS.PT_FILTEROP_LTE, PT_FILTEROPS.PT_FILTEROP_GTE, PT_FILTEROPS.PT_FILTEROP_EQ or PT_FILTEROPS.PT_FILTEROP_NUMERIC_EQ, PT_FILTEROPS.PT_FILTEROP_NE or PT_FILTEROPS.PT_FILTEROP_NUMERIC_NOTEQ. For date-time comparisons, must be one of PT_FILTEROPS.PT_FILTEROP_RELATIVE_LT, PT_FILTEROPS.PT_FILTEROP_RELATIVE_GT, PT_FILTEROPS.PT_FILTEROP_RELATIVE_LTE, PT_FILTEROPS.PT_FILTEROP_RELATIVE_GTE. (For date-time comparisons with other operators, use the similar form of addSubquery that accepts an XPDateTime.)
comparisonValue - value to compare with. (For the relative date-time operators, this is a number of milliseconds relative to the time this method is called.)

addSubquery

void addSubquery(IPTSField numericField,
                 int comparisonOperator,
                 long comparisonValue)
Add a comparison involving an integer, floating-point, or date field, as a child of this IPTSBooleanQuery. Convenience method that is equivalent to calling IPTSearchFactory.createComparisonQuery and then calling the IPTSQuery form of addSubquery.

Parameters:
numericField - the field to compare. Must have type PTSFieldType.INT, PTSFieldType.FLOAT, or PTSFieldType.DATETIME.
comparisonOperator - operator to use for the comparison. For integer or floating-point comparisons, must be one of PT_FILTEROPS.PT_FILTEROP_LT, PT_FILTEROPS.PT_FILTEROP_GT, PT_FILTEROPS.PT_FILTEROP_LTE, PT_FILTEROPS.PT_FILTEROP_GTE, PT_FILTEROPS.PT_FILTEROP_EQ or PT_FILTEROPS.PT_FILTEROP_NUMERIC_EQ, PT_FILTEROPS.PT_FILTEROP_NE or PT_FILTEROPS.PT_FILTEROP_NUMERIC_NOTEQ. For date-time comparisons, must be one of PT_FILTEROPS.PT_FILTEROP_RELATIVE_LT, PT_FILTEROPS.PT_FILTEROP_RELATIVE_GT, PT_FILTEROPS.PT_FILTEROP_RELATIVE_LTE, PT_FILTEROPS.PT_FILTEROP_RELATIVE_GTE. (For date-time comparisons with other operators, use the similar form of addSubquery that accepts an XPDateTime.)
comparisonValue - value to compare with. (For the relative date-time operators, this is a number of milliseconds relative to the time this method is called.)

addSubquery

void addSubquery(IPTSField numericField,
                 int comparisonOperator,
                 float comparisonValue)
Add a comparison involving an integer, floating-point, or date field, as a child of this IPTSBooleanQuery. Convenience method that is equivalent to calling IPTSearchFactory.createComparisonQuery and then calling the IPTSQuery form of addSubquery.

Parameters:
numericField - the field to compare. Must have type PTSFieldType.INT, PTSFieldType.FLOAT, or PTSFieldType.DATETIME.
comparisonOperator - operator to use for the comparison. For integer or floating-point comparisons, must be one of PT_FILTEROPS.PT_FILTEROP_LT, PT_FILTEROPS.PT_FILTEROP_GT, PT_FILTEROPS.PT_FILTEROP_LTE, PT_FILTEROPS.PT_FILTEROP_GTE, PT_FILTEROPS.PT_FILTEROP_EQ or PT_FILTEROPS.PT_FILTEROP_NUMERIC_EQ, PT_FILTEROPS.PT_FILTEROP_NE or PT_FILTEROPS.PT_FILTEROP_NUMERIC_NOTEQ. For date-time comparisons, must be one of PT_FILTEROPS.PT_FILTEROP_RELATIVE_LT, PT_FILTEROPS.PT_FILTEROP_RELATIVE_GT, PT_FILTEROPS.PT_FILTEROP_RELATIVE_LTE, PT_FILTEROPS.PT_FILTEROP_RELATIVE_GTE. (For date-time comparisons with other operators, use the similar form of addSubquery that accepts an XPDateTime.)
comparisonValue - value to compare with. (For the relative date-time operators, this is a number of milliseconds relative to the time this method is called.)

addSubquery

void addSubquery(IPTSField booleanField,
                 boolean comparisonValue)
Add a comparison involving a boolean field as a child of this IPTSBooleanQuery. Convenience method that is equivalent to calling IPTSearchFactory.createComparisonQuery and then calling the IPTSQuery form of addSubquery.

Parameters:
booleanField - the field to compare. Must have type PTSFieldType.BOOLEAN.
comparisonValue - either true or false.

addSubquery

void addSubquery(IPTSField dateField,
                 int comparisonOperator,
                 com.plumtree.openfoundation.util.XPDateTime comparisonValue)
Add a comparison involving a date/time field and a non-relative operator as a child of this IPTSBooleanQuery. Convenience method that is equivalent to calling IPTSearchFactory.createComparisonQuery and then calling the IPTSQuery form of addSubquery.

Parameters:
dateField - the field to compare. Must have type PTSFieldType.DATETIME.
comparisonOperator - to use for the comparison. Must be one of PT_FILTEROPS.PT_FILTEROP_LT, PT_FILTEROPS.PT_FILTEROP_GT, PT_FILTEROPS.PT_FILTEROP_LTE, PT_FILTEROPS.PT_FILTEROP_GTE, PT_FILTEROPS.PT_FILTEROP_EQ or PT_FILTEROPS.PT_FILTEROP_NUMERIC_EQ, PT_FILTEROPS.PT_FILTEROP_NE or PT_FILTEROPS.PT_FILTEROP_NUMERIC_NOTEQ.
comparisonValue - value to compare with. May not be null.