com.filenet.wcm.apps.server.util
Class FormSearchUtil

java.lang.Object
  extended bycom.filenet.wcm.apps.server.util.FormSearchUtil

public class FormSearchUtil
extends java.lang.Object


Field Summary
static int CURRENT_VERSION
           
static int LOGICAL_AND
           
static int LOGICAL_OR
           
static java.lang.String[] operatorList
           
static int RELEASED
           
 
Constructor Summary
FormSearchUtil()
           
 
Method Summary
 void addPropertyCriteria(java.lang.String propertyName, int propertyType, int operator, java.lang.String propertyValue, int logicalOperator)
          Adds new search criteria to the criteria list.
 void addSelectProperty(java.lang.String propertyName)
          Adds additional property to the select property list.
 java.util.List getCriteria()
          Returns the search criteria list
 int getCriteriaCount()
          Returns the total criteria items.
 java.lang.String getSQL(int objectType)
          Builds and returns the sql string based on the selected select properties and selected search criteria.
 void setDocumentVersion(int searchVersionStatus)
          Sets to limit the query to either a released version or the current version.
 void setFilterClass(java.lang.String searchFilterClass)
          Sets to limit the query to document specified by the parameter class.
 void setMaxResults(int searchMaxResults)
          Set the maximum number of returned items.
 void setQueryObjectStore(java.lang.String searchObjectStore)
          Set the selected object store.
 void setSelectClause(java.lang.String searchSelectClause)
          Sets the select clause to overide the default select clause.
 void setSelectProperties(java.lang.String[] properties)
          Sets the select properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGICAL_OR

public static final int LOGICAL_OR
See Also:
Constant Field Values

LOGICAL_AND

public static final int LOGICAL_AND
See Also:
Constant Field Values

CURRENT_VERSION

public static final int CURRENT_VERSION
See Also:
Constant Field Values

RELEASED

public static final int RELEASED
See Also:
Constant Field Values

operatorList

public static final java.lang.String[] operatorList
Constructor Detail

FormSearchUtil

public FormSearchUtil()
Method Detail

setSelectProperties

public void setSelectProperties(java.lang.String[] properties)
Sets the select properties.

The default properties for a document query are:

VersionSeries, OIID, Id, MimeType, ObjectType, IsReserved, IsCurrentVersion, Creator, DateCreated, LastModifier, DateLastModified, DocumentTitle, MajorVersionNumber, MinorVersionNumber and VersionStatus

Parameters:
properties - String[] The list of selected properties.

setQueryObjectStore

public void setQueryObjectStore(java.lang.String searchObjectStore)
Set the selected object store.

Parameters:
searchObjectStore - String The object store name.

setMaxResults

public void setMaxResults(int searchMaxResults)
Set the maximum number of returned items.

Parameters:
searchMaxResults - inn The maximum number of returned item.

setFilterClass

public void setFilterClass(java.lang.String searchFilterClass)
Sets to limit the query to document specified by the parameter class.

Parameters:
searchFilterClass - String The filter class name.

setDocumentVersion

public void setDocumentVersion(int searchVersionStatus)
Sets to limit the query to either a released version or the current version.

Parameters:
searchVersionStatus - int The version types defined by this class (RELEASE = 1 and CURRENT = 2)

setSelectClause

public void setSelectClause(java.lang.String searchSelectClause)
Sets the select clause to overide the default select clause.

Parameters:
searchSelectClause - String The new select clause.

addSelectProperty

public void addSelectProperty(java.lang.String propertyName)
Adds additional property to the select property list.

Parameters:
propertyName - String The selected property name.

addPropertyCriteria

public void addPropertyCriteria(java.lang.String propertyName,
                                int propertyType,
                                int operator,
                                java.lang.String propertyValue,
                                int logicalOperator)
Adds new search criteria to the criteria list.

Parameters:
propertyName - String The selected property name.
propertyType - int The selected property type.
operator - int The property query operator.
propertyValue - String The selected property value.
logicalOperator - String The logical operator to be used between the selected properties.

getSQL

public java.lang.String getSQL(int objectType)
Builds and returns the sql string based on the selected select properties and selected search criteria.

Parameters:
objectType - int The object type.
Returns:
String The search sql statement.

getCriteriaCount

public int getCriteriaCount()
Returns the total criteria items.

Returns:
int The count of the selected properties in the criteria list.

getCriteria

public java.util.List getCriteria()
Returns the search criteria list

Returns:
List The search criteria list.


© Copyright IBM Corp. 2002, 2007. All Rights Reserved.