Skip navigation links


com.fatwire.cs.core.search.query
Interface QueryExpression


public interface QueryExpression

QueryExpression represents a query that could be performed in Search Engine.


Method Summary
 QueryExpression and(QueryExpression q)
          Combine the two QueryExpression with an "and" operation
 QueryExpression and(java.lang.String fieldname, Operation op, java.util.List values)
          The method does an and operation between this QueryExpression and the query specified by fieldname, op and value and returns a new QueryExpression that represents the result of the and operation
 QueryExpression and(java.lang.String fieldname, Operation op, java.util.List values, boolean negate)
          The method does an and operation between this QueryExpression and the query specified by fieldname, op and value and returns a new QueryExpression that represents the result of the and operation
 QueryExpression and(java.lang.String fieldname, Operation op, java.lang.Object value)
          The method does an and operation between this QueryExpression and the query specified by fieldname, op and value and returns a new QueryExpression that represents the result of the and operation
 QueryExpression and(java.lang.String fieldname, Operation op, java.lang.Object value, boolean negate)
          The method does an and operation between this QueryExpression and the query specified by fieldname, op and value and returns a new QueryExpression that represents the result of the and operation
 com.fatwire.cs.core.util.BinaryTree<java.lang.Object> getBinaryTree()
          Gets the binary tree representation of all the query conditions specified in this QueryExpression
 int getMaxResults()
          Gets the max number of results that the search engine would return from this query
 java.util.List<SortOrder> getSortOrder()
          Gets the list of SortOrder that search engine would use when runs this query
 int getStartIndex()
          Gets the starting index of which we want the query results to be returned from
 java.lang.String getStringFormat()
          Gets a String representation of the QueryExpression
 QueryExpression or(QueryExpression q)
          Combine the two QueryExpression with an "or" operation
 QueryExpression or(java.lang.String fieldname, Operation op, java.util.List values)
          The method does an or operation between this QueryExpression and the query specified by fieldname, op and value and returns a new QueryExpression that represents the result of the and operation
 QueryExpression or(java.lang.String fieldname, Operation op, java.util.List values, boolean negate)
          The method does an or operation between this QueryExpression and the query specified by fieldname, op and value and returns a new QueryExpression that represents the result of the and operation
 QueryExpression or(java.lang.String fieldname, Operation op, java.lang.Object value)
          The method does an or operation between this QueryExpression and the query specified by fieldname, op and value and returns a new QueryExpression that represents the result of the and operation
 QueryExpression or(java.lang.String fieldname, Operation op, java.lang.Object value, boolean negate)
          The method does an or operation between this QueryExpression and the query specified by fieldname, op and value and returns a new QueryExpression that represents the result of the and operation
 void setMaxResults(int max)
          Sets the max number of results that the search engine would return from this query
 void setSortOrder(java.util.List<SortOrder> so)
          Sets the list of SortOrder that search engine would use when runs this query
 void setStartIndex(int start)
          Sets the starting index of which we want the query results to be returned from

 

Method Detail

getStringFormat

java.lang.String getStringFormat()
Gets a String representation of the QueryExpression
Returns:
the String representation of the QueryExpression

and

QueryExpression and(java.lang.String fieldname,
                    Operation op,
                    java.lang.Object value)
The method does an and operation between this QueryExpression and the query specified by fieldname, op and value and returns a new QueryExpression that represents the result of the and operation
Parameters:
fieldname - the name of the field of the additional query
op - the query operation of the additional query
value - the value of the additional query
Returns:
a new QueryExpression that represents "and" between the current QueryExpression and the condition passed in

and

QueryExpression and(java.lang.String fieldname,
                    Operation op,
                    java.lang.Object value,
                    boolean negate)
The method does an and operation between this QueryExpression and the query specified by fieldname, op and value and returns a new QueryExpression that represents the result of the and operation
Parameters:
fieldname - the name of the field of the additional query
op - the query operation of the additional query
value - the value of the additional query
negate - whether the new Query is a negative condition which indicates "not" true for the additional query
Returns:
a new QueryExpression that represents "and" between the current QueryExpression and the condition passed in

and

QueryExpression and(java.lang.String fieldname,
                    Operation op,
                    java.util.List values)
The method does an and operation between this QueryExpression and the query specified by fieldname, op and value and returns a new QueryExpression that represents the result of the and operation
Parameters:
fieldname - the name of the field of the additional query
op - the query operation of the additional query
values - the values of the additional query
Returns:
a new QueryExpression that represents "and" between the current QueryExpression and the condition passed in

and

QueryExpression and(java.lang.String fieldname,
                    Operation op,
                    java.util.List values,
                    boolean negate)
The method does an and operation between this QueryExpression and the query specified by fieldname, op and value and returns a new QueryExpression that represents the result of the and operation
Parameters:
fieldname - the name of the field of the additional query
op - the query operation of the additional query
values - the values of the additional query
negate - whether the new Query is a negative condition which indicates "not" true for the additional query
Returns:
a new QueryExpression that represents "and" between the current QueryExpression and the condition passed in

or

QueryExpression or(java.lang.String fieldname,
                   Operation op,
                   java.lang.Object value)
The method does an or operation between this QueryExpression and the query specified by fieldname, op and value and returns a new QueryExpression that represents the result of the and operation
Parameters:
fieldname - the name of the field of the additional query
op - the query operation of the additional query
value - the value of the additional query
Returns:
a new QueryExpression that represents "or" between the current QueryExpression and the condition passed in

or

QueryExpression or(java.lang.String fieldname,
                   Operation op,
                   java.lang.Object value,
                   boolean negate)
The method does an or operation between this QueryExpression and the query specified by fieldname, op and value and returns a new QueryExpression that represents the result of the and operation
Parameters:
fieldname - the name of the field of the additional query
op - the query operation of the additional query
value - the value of the additional query
negate - whether the new Query is a negative condition which indicates "not" true for the additional query
Returns:
a new QueryExpression that represents "or" between the current QueryExpression and the condition passed in

or

QueryExpression or(java.lang.String fieldname,
                   Operation op,
                   java.util.List values)
The method does an or operation between this QueryExpression and the query specified by fieldname, op and value and returns a new QueryExpression that represents the result of the and operation
Parameters:
fieldname - the name of the field of the additional query
op - the query operation of the additional query
values - the values of the additional query
Returns:
a new QueryExpression that represents "or" between the current QueryExpression and the condition passed in

or

QueryExpression or(java.lang.String fieldname,
                   Operation op,
                   java.util.List values,
                   boolean negate)
The method does an or operation between this QueryExpression and the query specified by fieldname, op and value and returns a new QueryExpression that represents the result of the and operation
Parameters:
fieldname - the name of the field of the additional query
op - the query operation of the additional query
values - the values of the additional query
negate - whether the new Query is a negative condition which indicates "not" true for the additional query
Returns:
a new QueryExpression that represents "or" between the current QueryExpression and the condition passed in

and

QueryExpression and(QueryExpression q)
Combine the two QueryExpression with an "and" operation
Parameters:
q - the QueryExpression to combine with the current one
Returns:
the QueryExpression resulted from the "and" operation of the two QueryExpressions

or

QueryExpression or(QueryExpression q)
Combine the two QueryExpression with an "or" operation
Parameters:
q - the QueryExpression to combine with the current one
Returns:
the QueryExpression resulted from the "or" operation of the two QueryExpressions

getStartIndex

int getStartIndex()
Gets the starting index of which we want the query results to be returned from
Returns:
the starting index

setStartIndex

void setStartIndex(int start)
Sets the starting index of which we want the query results to be returned from
Parameters:
start - the starting index

getMaxResults

int getMaxResults()
Gets the max number of results that the search engine would return from this query
Returns:
the int number of max results

setMaxResults

void setMaxResults(int max)
Sets the max number of results that the search engine would return from this query
Parameters:
max - the int number of max results

setSortOrder

void setSortOrder(java.util.List<SortOrder> so)
Sets the list of SortOrder that search engine would use when runs this query
Parameters:
so - the list of SortOrder

getSortOrder

java.util.List<SortOrder> getSortOrder()
Gets the list of SortOrder that search engine would use when runs this query
Returns:
the list of SortOrder

getBinaryTree

com.fatwire.cs.core.util.BinaryTree<java.lang.Object> getBinaryTree()
Gets the binary tree representation of all the query conditions specified in this QueryExpression
Returns:
the BinaryTree representation of all the conditions in this QueryExpression

Skip navigation links


Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.