com.webmethods.caf.faces.data.csp
Class CSPSearchQuery

java.lang.Object
  extended by com.webmethods.caf.faces.data.csp.CSPSearchQuery
All Implemented Interfaces:
Serializable

public class CSPSearchQuery
extends Object
implements Serializable

It is a Search query that keeps a list of node ids on which the search is going to be executed as well as list of CSPSearchQueryTerm objects which are the search criteria.

See Also:
Serialized Form

Field Summary
static String DATE_FORMAT
           
static String GREATER_THAN
           
static String LAST_MODIFIED_ON_INDEX_ID
           
static String LOWER_THAN
           
 
Constructor Summary
CSPSearchQuery()
           
 
Method Summary
 CSPSearchQueryTerm addQueryTerm(String indexId, String operator, String value)
           
 void createDateSearchTerms(List terms)
          Creates CSPSearchQueryTerms based on last modified on index and are used to search by date.
 void deleteDateSearchTerms()
          Delete last modified search terms from the list of CSPContentSearchTerms.
 CSPSearchQueryTerm findQueryTerm(String indexId)
           
 String getDateAsString(Date date)
           
 DateRange getDateRange()
          Date range of the documents to search for
 List getNodeIds()
           
 Date getStringAsDate(String str)
           
 List getTerms()
           
 boolean isAutoDiscover()
          Return true if auto discovery of terms is enabled.
 void removeQueryTerm(CSPSearchQueryTerm term)
           
 void setAutoDiscover(boolean autoDiscover)
          Enable discovering terms based on properties on *this* class subclasses
 void setDateRange(DateRange dateRange)
           
 void setNodeIds(List nodeIds)
          Sets the Node Id (the content type) - identifies what documents are to be listed/stored/updated.
 void setTerms(List terms)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LAST_MODIFIED_ON_INDEX_ID

public static final String LAST_MODIFIED_ON_INDEX_ID
See Also:
Constant Field Values

GREATER_THAN

public static final String GREATER_THAN
See Also:
Constant Field Values

LOWER_THAN

public static final String LOWER_THAN
See Also:
Constant Field Values

DATE_FORMAT

public static final String DATE_FORMAT
See Also:
Constant Field Values
Constructor Detail

CSPSearchQuery

public CSPSearchQuery()
Method Detail

isAutoDiscover

public boolean isAutoDiscover()
Return true if auto discovery of terms is enabled. Default is true

Returns:
auto discovery of terms mode

setAutoDiscover

public void setAutoDiscover(boolean autoDiscover)
Enable discovering terms based on properties on *this* class subclasses

Parameters:
autoDiscover - true to enabled auto discovery

getDateRange

public DateRange getDateRange()
Date range of the documents to search for

Returns:

setDateRange

public void setDateRange(DateRange dateRange)

setTerms

public void setTerms(List terms)

getTerms

public List getTerms()
              throws Exception
Throws:
Exception

addQueryTerm

public CSPSearchQueryTerm addQueryTerm(String indexId,
                                       String operator,
                                       String value)

createDateSearchTerms

public void createDateSearchTerms(List terms)
Creates CSPSearchQueryTerms based on last modified on index and are used to search by date.

Parameters:
terms -

deleteDateSearchTerms

public void deleteDateSearchTerms()
Delete last modified search terms from the list of CSPContentSearchTerms.


getDateAsString

public String getDateAsString(Date date)

getStringAsDate

public Date getStringAsDate(String str)

removeQueryTerm

public void removeQueryTerm(CSPSearchQueryTerm term)

findQueryTerm

public CSPSearchQueryTerm findQueryTerm(String indexId)

setNodeIds

public void setNodeIds(List nodeIds)
Sets the Node Id (the content type) - identifies what documents are to be listed/stored/updated. This is mandatory. CSP API can manage listing/storing/updating content for multiple nodes, however in this implementation this is possible for only one node.

Parameters:
nodeId - Identifies the content type

getNodeIds

public List getNodeIds()