wt.query
Class SearchTask

java.lang.Object
  extended bywt.query.SearchTask
All Implemented Interfaces:
Externalizable, RemoteAccess, Serializable

public class SearchTask
extends Object
implements RemoteAccess, Externalizable

Search tasks for the client. Combines together several server side functions to allow the client one method to execute a search and have the results prepared for display.

Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
static Class ADRefTYPE
           
static String ALL_VERSIONS
          Use to set the searchFilter attribute to return the latest iteration, all versions, and any personal working copies on a search.
static String CHANGEABLE_VERSIONS
          Use to set the searchFilter attribute to return the latest iteration, all versions, and any personal working copies on a search, but exclude all checked out copies.
private static String CLASSNAME
           
static long EXTERNALIZATION_VERSION_UID
           
private static String FC_RESOURCE
           
static String LATEST
          Use to set the searchFilter attribute to return only the latest version and iteration on a search.
private static ClassInfo MASTER
           
private static boolean MASTER_ACCESS
           
protected static long OLD_FORMAT_VERSION_UID
           
private static String RESOURCE
           
private  String searchFilter
           
(package private) static long serialVersionUID
           
(package private) static boolean SERVER
           
private static boolean VERBOSE
           
private static char WILDCARD_ESCAPE
           
 
Fields inherited from interface wt.method.RemoteAccess
versionID
 
Constructor Summary
SearchTask()
           
 
Method Summary
protected  QueryResult _search(Class classname, Vector searchSpecVector, Vector displayAttributes, String sortPreference)
          Queries for persistant objects of one class using the vector of AttributeSearchSpecifications for the criterion.
protected  QueryResult _search(Class classname, Vector searchSpecVector, Vector displayAttributes, String sortPreference, SearchCondition[] additionalSearchConditions)
          Queries for persistant objects of one class using the vector of AttributeSearchSpecifications for the criterion.
protected  QueryResult _search(Class classname, Vector searchSpecVector, Vector displayAttributes, String sortPreference, SearchCondition[] additionalSearchConditions, Vector ibaSearchExpressions)
          Queries for persistant objects of one class using the vector of AttributeSearchSpecifications for the criterion.
protected  QueryResult _search(Class classname, Vector searchSpecVector, Vector displayAttributes, String sortPreference, SearchCondition[] additionalSearchConditions, Vector ibaSearchExpressions, WTContainer container, Vector containerList)
          Queries for persistant objects of one class using the vector of AttributeSearchSpecifications for the criterion.
protected  QueryResult _search(Class classname, Vector searchSpecVector, Vector displayAttributes, String sortPreference, SearchCondition[] additionalSearchConditions, WTContainer container, Vector containerList)
          Queries for persistant objects of one class using the vector of AttributeSearchSpecifications for the criterion.
protected  QueryResult _search(Class classname, Vector searchSpecVector, Vector displayAttributes, String sortPreference, WTContainer container, Vector containerList)
          Queries for persistant objects of one class using the vector of AttributeSearchSpecifications for the criterion.
protected  SortedEnumeration _search(Vector classnames, Hashtable criteriaHash, Vector display, String sortPreference, Locale locale)
          Queries for persistant objects of multiple classes using the Hashtable of name value pairs as for the criterion.
protected  SortedEnumeration _search(Vector classnames, Hashtable criteriaHash, Vector display, String sortPreference, Locale locale, WTContainer container, Vector containerList)
          Queries for persistant objects of multiple classes using the Hashtable of name value pairs as for the criterion.
protected  QueryResult _search(Vector classnames, Vector searchSpecVector, Vector displayAttributes, String sortPreference)
          Queries for persistant objects of multiple classes using the vector of AttributeSearchSpecifications for the criterion.
protected  QueryResult _search(Vector classnames, Vector searchSpecVector, Vector displayAttributes, String sortPreference, WTContainer container, Vector containerList)
          Queries for persistant objects of multiple classes using the vector of AttributeSearchSpecifications for the criterion.
private  QuerySpec addMasterAccessControl(QuerySpec qs, Class searchClass)
           
private  SearchCondition appendContainerCondition(WTContainer container, Class searchClass)
           
private  SearchCondition appendContainerTypeCondition(Class classname, String containerType)
           
private  void convertWildcardExpression(SearchExpression a_searchExpression)
           
 QuerySpec create_query_spec(Class classname, Vector searchSpecVector)
          Not to be used outside of Windchill code.
static String getAttributeValue(PropertyDescriptor pd, WTObject biz_obj, Locale locale)
           
private  Class getIteratedType(Class classname)
           
private  HashSet getIteratedTypes(Class classname)
           
 String getQueryName(Class classname, String attributeName)
           
protected  OperatorType getSearchConditionOperator(String an_operator)
           
 String getSearchFilter()
          Gets the value of the attribute: searchFilter; Used to filter out version/iteration/working copies from search results.
static AttributeSearchSpecification getSearchSpecification(String attrib_name, String value, ClassInfo context_info, Locale locale)
          Get the AttributeSearchSpecification for this attribute and value from a particular class.
private  void inflateResults(QueryResult results, Vector displayAttributes)
           
static boolean isEnumType(Class type)
           
 QueryResult liteSearch(Class classname, Vector searchSpecVector, Vector additionalSearchConditions, Vector ibaSearchExpressions, Locale locale, String[] liteDisplay)
          

Supported API: false
private  QueryResult masterAccessProcessResult(QueryResult searchResult)
           
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
private  boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source, which is not the current version.
protected  boolean readVersion(SearchTask thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 QueryResult search(Class classname, Vector searchSpecVector, Vector displayAttributes, String sortPreference)
          Queries for persistant objects of one class using the vector of AttributeSearchSpecifications for the criterion.
 QueryResult search(Class classname, Vector searchSpecVector, Vector displayAttributes, String sortPreference, SearchCondition[] additionalSearchConditions)
          Queries for persistant objects of one class using the vector of AttributeSearchSpecifications for the criterion.
 QueryResult search(Class classname, Vector searchSpecVector, Vector displayAttributes, String sortPreference, SearchCondition[] additionalSearchConditions, Vector ibaSearchExpressions)
          Queries for persistant objects of one class using the vector of AttributeSearchSpecifications for the criterion.
 QueryResult search(Class classname, Vector searchSpecVector, Vector displayAttributes, String sortPreference, SearchCondition[] additionalSearchConditions, Vector ibaSearchExpressions, WTContainer container, Vector containerList)
          Queries for persistant objects of one class using the vector of AttributeSearchSpecifications for the criterion.
 QueryResult search(Class classname, Vector searchSpecVector, Vector displayAttributes, String sortPreference, SearchCondition[] additionalSearchConditions, WTContainer container, Vector containerList)
          Queries for persistant objects of one class using the vector of AttributeSearchSpecifications for the criterion.
 QueryResult search(Class classname, Vector searchSpecVector, Vector displayAttributes, String sortPreference, WTContainer container, Vector containerList)
          Queries for persistant objects of one class using the vector of AttributeSearchSpecifications for the criterion.
 SortedEnumeration search(Vector classnames, Hashtable criteriaHash, Vector display, String sortPreference, Locale locale)
          Queries for persistant objects of multiple classes using the Hashtable of name value pairs as for the criterion.
 SortedEnumeration search(Vector classnames, Hashtable criteriaHash, Vector display, String sortPreference, Locale locale, WTContainer container, Vector containerList)
          Queries for persistant objects of multiple classes using the Hashtable of name value pairs as for the criterion.
 QueryResult search(Vector classnames, Vector searchSpecVector, Vector displayAttributes, String sortPreference)
          Queries for persistant objects of multiple classes using the vector of AttributeSearchSpecifications for the criterion.
 QueryResult search(Vector classnames, Vector searchSpecVector, Vector displayAttributes, String sortPreference, WTContainer container, Vector containerList)
          Queries for persistant objects of multiple classes using the vector of AttributeSearchSpecifications for the criterion.
private  void searchFilterValidate(String a_SearchFilter)
           
 void setSearchFilter(String a_SearchFilter)
          Sets the value of the attribute: searchFilter; Used to filter out version/iteration/working copies from search results.
private  void updateDefaultClassSearchSpecForContainers(DefaultClassSearchSpec dcss, Class classname, WTContainer container, Vector containerList)
           
private  void updateQuerySpecForContainers(QuerySpec qs, WTContainer container, Vector containerList, Class classname)
           
private  void updateQuerySpecForTerminalObjects(QuerySpec qs, Class classname)
           
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

searchFilter

private String searchFilter

LATEST

public static final String LATEST
Use to set the searchFilter attribute to return only the latest version and iteration on a search.

Supported API: false

See Also:
Constant Field Values

ALL_VERSIONS

public static final String ALL_VERSIONS
Use to set the searchFilter attribute to return the latest iteration, all versions, and any personal working copies on a search.

Supported API: false

See Also:
Constant Field Values

CHANGEABLE_VERSIONS

public static final String CHANGEABLE_VERSIONS
Use to set the searchFilter attribute to return the latest iteration, all versions, and any personal working copies on a search, but exclude all checked out copies.

Supported API: false

See Also:
Constant Field Values

SERVER

static final boolean SERVER

FC_RESOURCE

private static final String FC_RESOURCE
See Also:
Constant Field Values

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
See Also:
Constant Field Values

ADRefTYPE

public static final Class ADRefTYPE

MASTER

private static final ClassInfo MASTER

WILDCARD_ESCAPE

private static final char WILDCARD_ESCAPE

VERBOSE

private static final boolean VERBOSE

MASTER_ACCESS

private static final boolean MASTER_ACCESS
Constructor Detail

SearchTask

public SearchTask()
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(SearchTask thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Parameters:
thisObject -
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

readOldVersion

private boolean readOldVersion(ObjectInput input,
                               long readSerialVersionUID,
                               boolean passThrough,
                               boolean superDone)
                        throws IOException,
                               ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

getSearchFilter

public String getSearchFilter()
Gets the value of the attribute: searchFilter; Used to filter out version/iteration/working copies from search results.

Supported API: false

Returns:
String

setSearchFilter

public void setSearchFilter(String a_SearchFilter)
                     throws WTPropertyVetoException
Sets the value of the attribute: searchFilter; Used to filter out version/iteration/working copies from search results.

Supported API: false

Parameters:
a_SearchFilter -
Throws:
WTPropertyVetoException

searchFilterValidate

private void searchFilterValidate(String a_SearchFilter)
                           throws WTPropertyVetoException
Parameters:
a_SearchFilter -
Throws:
WTPropertyVetoException

search

public QueryResult search(Class classname,
                          Vector searchSpecVector,
                          Vector displayAttributes,
                          String sortPreference)
                   throws WTException
Queries for persistant objects of one class using the vector of AttributeSearchSpecifications for the criterion. If any pre or post query processing of the data is required it does that

Supported API: false

Parameters:
classname - The class to query against.
searchSpecVector - The search criteria for the search.
displayAttributes - The list of attributes that the client wants to display from the results of the search task.
sortPreference - To specify the sort preference for post processing of the search results. Not currently implemented.
Returns:
QueryResult
Throws:
WTException

_search

protected QueryResult _search(Class classname,
                              Vector searchSpecVector,
                              Vector displayAttributes,
                              String sortPreference)
                       throws WTException
Queries for persistant objects of one class using the vector of AttributeSearchSpecifications for the criterion. If any pre or post query processing of the data is required it does that

Supported API: false

Parameters:
classname - The class to query against.
searchSpecVector - The search criteria for the search.
displayAttributes - The list of attributes that the client wants to display from the results of the search task.
sortPreference - To specify the sort preference for post processing of the search results. Not currently implemented.
Returns:
QueryResult
Throws:
WTException

search

public QueryResult search(Vector classnames,
                          Vector searchSpecVector,
                          Vector displayAttributes,
                          String sortPreference)
                   throws WTException
Queries for persistant objects of multiple classes using the vector of AttributeSearchSpecifications for the criterion. If any pre or post query processing of the data is required it does that

Supported API: false

Parameters:
classnames - The classes to query against.
searchSpecVector - The search criteria for the search.
displayAttributes - The list of attributes that the client wants to display from the results of the search task.
sortPreference - To specify the sort preference for post processing of the search results. Not currently implemented.
Returns:
QueryResult
Throws:
WTException

_search

protected QueryResult _search(Vector classnames,
                              Vector searchSpecVector,
                              Vector displayAttributes,
                              String sortPreference)
                       throws WTException
Queries for persistant objects of multiple classes using the vector of AttributeSearchSpecifications for the criterion. If any pre or post query processing of the data is required it does that

Supported API: false

Parameters:
classnames - The classes to query against.
searchSpecVector - The search criteria for the search.
displayAttributes - The list of attributes that the client wants to display from the results of the search task.
sortPreference - To specify the sort preference for post processing of the search results. Not currently implemented.
Returns:
QueryResult
Throws:
WTException

search

public SortedEnumeration search(Vector classnames,
                                Hashtable criteriaHash,
                                Vector display,
                                String sortPreference,
                                Locale locale)
                         throws WTException
Queries for persistant objects of multiple classes using the Hashtable of name value pairs as for the criterion. If any pre or post query processing of the data is required it does that.

Supported API: false

Parameters:
classnames - The classes to query against.
criteriaHash - The search criteria for the search.
display - The list of attributes that the client wants to display from the results of the search task.
sortPreference - To specify the sort preference for post processing of the search results. Not currently implemented.
locale - The locale of the client, used in the sorting of the results.
Returns:
SortedEnumeration
Throws:
WTException

_search

protected SortedEnumeration _search(Vector classnames,
                                    Hashtable criteriaHash,
                                    Vector display,
                                    String sortPreference,
                                    Locale locale)
                             throws WTException
Queries for persistant objects of multiple classes using the Hashtable of name value pairs as for the criterion. If any pre or post query processing of the data is required it does that.

Supported API: false

Parameters:
classnames - The classes to query against.
criteriaHash - The search criteria for the search.
display - The list of attributes that the client wants to display from the results of the search task.
sortPreference - To specify the sort preference for post processing of the search results. Not currently implemented.
locale - The locale of the client, used in the sorting of the results.
Returns:
SortedEnumeration
Throws:
WTException

search

public QueryResult search(Class classname,
                          Vector searchSpecVector,
                          Vector displayAttributes,
                          String sortPreference,
                          SearchCondition[] additionalSearchConditions)
                   throws WTException
Queries for persistant objects of one class using the vector of AttributeSearchSpecifications for the criterion. If any pre or post query processing of the data is required it does that. An additional array of search conditions can be added.

Supported API: false

Parameters:
classname - The class to query against.
searchSpecVector - The search criteria for the search.
displayAttributes - The list of attributes that the client wants to display from the results of the search task.
sortPreference - To specify the sort preference for post processing of the search results. Not currently implemented.
additionalSearchConditions -
Returns:
QueryResult
Throws:
WTException

_search

protected QueryResult _search(Class classname,
                              Vector searchSpecVector,
                              Vector displayAttributes,
                              String sortPreference,
                              SearchCondition[] additionalSearchConditions)
                       throws WTException
Queries for persistant objects of one class using the vector of AttributeSearchSpecifications for the criterion. If any pre or post query processing of the data is required it does that. An additional array of search conditions can be added.

Supported API: false

Parameters:
classname - The class to query against.
searchSpecVector - The search criteria for the search.
displayAttributes - The list of attributes that the client wants to display from the results of the search task.
sortPreference - To specify the sort preference for post processing of the search results. Not currently implemented.
additionalSearchConditions -
Returns:
QueryResult
Throws:
WTException

search

public QueryResult search(Class classname,
                          Vector searchSpecVector,
                          Vector displayAttributes,
                          String sortPreference,
                          SearchCondition[] additionalSearchConditions,
                          Vector ibaSearchExpressions)
                   throws WTException
Queries for persistant objects of one class using the vector of AttributeSearchSpecifications for the criterion. If any pre or post query processing of the data is required it does that. An additional array of search conditions and IBA conditions can be added.

Supported API: false

Parameters:
classname - The class to query against.
searchSpecVector - The search criteria for the search.
displayAttributes - The list of attributes that the client wants to display from the results of the search task.
sortPreference - To specify the sort preference for post processing of the search results. Not currently implemented.
additionalSearchConditions -
ibaSearchExpressions -
Returns:
QueryResult
Throws:
WTException

_search

protected QueryResult _search(Class classname,
                              Vector searchSpecVector,
                              Vector displayAttributes,
                              String sortPreference,
                              SearchCondition[] additionalSearchConditions,
                              Vector ibaSearchExpressions)
                       throws WTException
Queries for persistant objects of one class using the vector of AttributeSearchSpecifications for the criterion. If any pre or post query processing of the data is required it does that. An additional array of search conditions and IBA conditions can be added.

Supported API: false

Parameters:
classname - The class to query against.
searchSpecVector - The search criteria for the search.
displayAttributes - The list of attributes that the client wants to display from the results of the search task.
sortPreference - To specify the sort preference for post processing of the search results. Not currently implemented.
additionalSearchConditions -
ibaSearchExpressions -
Returns:
QueryResult
Throws:
WTException

liteSearch

public QueryResult liteSearch(Class classname,
                              Vector searchSpecVector,
                              Vector additionalSearchConditions,
                              Vector ibaSearchExpressions,
                              Locale locale,
                              String[] liteDisplay)
                       throws WTException


Supported API: false

Parameters:
classname - The class to query against.
searchSpecVector - The search criteria for the search.
additionalSearchConditions -
ibaSearchExpressions -
locale -
liteDisplay -
Returns:
QueryResult
Throws:
WTException

getSearchSpecification

public static AttributeSearchSpecification getSearchSpecification(String attrib_name,
                                                                  String value,
                                                                  ClassInfo context_info,
                                                                  Locale locale)
                                                           throws WTException
Get the AttributeSearchSpecification for this attribute and value from a particular class.

Supported API: false

Parameters:
attrib_name -
value -
context_info -
locale -
Returns:
AttributeSearchSpecification
Throws:
WTException

search

public QueryResult search(Class classname,
                          Vector searchSpecVector,
                          Vector displayAttributes,
                          String sortPreference,
                          WTContainer container,
                          Vector containerList)
                   throws WTException
Queries for persistant objects of one class using the vector of AttributeSearchSpecifications for the criterion. If any pre or post query processing of the data is required it does that

Supported API: false

Parameters:
classname - The class to query against.
searchSpecVector - The search criteria for the search.
displayAttributes - The list of attributes that the client wants to display from the results of the search task.
sortPreference - To specify the sort preference for post processing of the search results. Not currently implemented.
container - Sets the search focus to be within a specified Container
containerList - Sets a list of Container Types to constrain the search within
Returns:
QueryResult
Throws:
WTException

_search

protected QueryResult _search(Class classname,
                              Vector searchSpecVector,
                              Vector displayAttributes,
                              String sortPreference,
                              WTContainer container,
                              Vector containerList)
                       throws WTException
Queries for persistant objects of one class using the vector of AttributeSearchSpecifications for the criterion. If any pre or post query processing of the data is required it does that

Supported API: false

Parameters:
classname - The class to query against.
searchSpecVector - The search criteria for the search.
displayAttributes - The list of attributes that the client wants to display from the results of the search task.
sortPreference - To specify the sort preference for post processing of the search results. Not currently implemented.
container - Sets the search focus to be within a specified Container
containerList - Sets a list of Container Types to constrain the search within
Returns:
QueryResult
Throws:
WTException

search

public QueryResult search(Vector classnames,
                          Vector searchSpecVector,
                          Vector displayAttributes,
                          String sortPreference,
                          WTContainer container,
                          Vector containerList)
                   throws WTException
Queries for persistant objects of multiple classes using the vector of AttributeSearchSpecifications for the criterion. If any pre or post query processing of the data is required it does that

Supported API: false

Parameters:
classnames - The classes to query against.
searchSpecVector - The search criteria for the search.
displayAttributes - The list of attributes that the client wants to display from the results of the search task.
sortPreference - To specify the sort preference for post processing of the search results. Not currently implemented.
container - Sets the search focus to be within a specified Container
containerList - Sets a list of Container Types to constrain the search within
Returns:
QueryResult
Throws:
WTException

_search

protected QueryResult _search(Vector classnames,
                              Vector searchSpecVector,
                              Vector displayAttributes,
                              String sortPreference,
                              WTContainer container,
                              Vector containerList)
                       throws WTException
Queries for persistant objects of multiple classes using the vector of AttributeSearchSpecifications for the criterion. If any pre or post query processing of the data is required it does that

Supported API: false

Parameters:
classnames - The classes to query against.
searchSpecVector - The search criteria for the search.
displayAttributes - The list of attributes that the client wants to display from the results of the search task.
sortPreference - To specify the sort preference for post processing of the search results. Not currently implemented.
container - Sets the search focus to be within a specified Container
containerList - Sets a list of Container Types to constrain the search within
Returns:
QueryResult
Throws:
WTException

search

public SortedEnumeration search(Vector classnames,
                                Hashtable criteriaHash,
                                Vector display,
                                String sortPreference,
                                Locale locale,
                                WTContainer container,
                                Vector containerList)
                         throws WTException
Queries for persistant objects of multiple classes using the Hashtable of name value pairs as for the criterion. If any pre or post query processing of the data is required it does that.

Supported API: false

Parameters:
classnames - The classes to query against.
criteriaHash - The search criteria for the search.
display - The list of attributes that the client wants to display from the results of the search task.
sortPreference - To specify the sort preference for post processing of the search results. Not currently implemented.
locale - The locale of the client, used in the sorting of the results.
container - Sets the search focus to be within a specified Container
containerList - Sets a list of Container Types to constrain the search within
Returns:
SortedEnumeration
Throws:
WTException

_search

protected SortedEnumeration _search(Vector classnames,
                                    Hashtable criteriaHash,
                                    Vector display,
                                    String sortPreference,
                                    Locale locale,
                                    WTContainer container,
                                    Vector containerList)
                             throws WTException
Queries for persistant objects of multiple classes using the Hashtable of name value pairs as for the criterion. If any pre or post query processing of the data is required it does that.

Supported API: false

Parameters:
classnames - The classes to query against.
criteriaHash - The search criteria for the search.
display - The list of attributes that the client wants to display from the results of the search task.
sortPreference - To specify the sort preference for post processing of the search results. Not currently implemented.
locale - The locale of the client, used in the sorting of the results.
container - Sets the search focus to be within a specified Container
containerList - Sets a list of Container Types to constrain the search within
Returns:
SortedEnumeration
Throws:
WTException

search

public QueryResult search(Class classname,
                          Vector searchSpecVector,
                          Vector displayAttributes,
                          String sortPreference,
                          SearchCondition[] additionalSearchConditions,
                          WTContainer container,
                          Vector containerList)
                   throws WTException
Queries for persistant objects of one class using the vector of AttributeSearchSpecifications for the criterion. If any pre or post query processing of the data is required it does that. An additional array of search conditions can be added.

Supported API: false

Parameters:
classname - The class to query against.
searchSpecVector - The search criteria for the search.
displayAttributes - The list of attributes that the client wants to display from the results of the search task.
sortPreference - To specify the sort preference for post processing of the search results. Not currently implemented.
additionalSearchConditions -
container - Sets the search focus to be within a specified Container
containerList - Sets a list of Container Types to constrain the search within
Returns:
QueryResult
Throws:
WTException

_search

protected QueryResult _search(Class classname,
                              Vector searchSpecVector,
                              Vector displayAttributes,
                              String sortPreference,
                              SearchCondition[] additionalSearchConditions,
                              WTContainer container,
                              Vector containerList)
                       throws WTException
Queries for persistant objects of one class using the vector of AttributeSearchSpecifications for the criterion. If any pre or post query processing of the data is required it does that. An additional array of search conditions can be added.

Supported API: false

Parameters:
classname - The class to query against.
searchSpecVector - The search criteria for the search.
displayAttributes - The list of attributes that the client wants to display from the results of the search task.
sortPreference - To specify the sort preference for post processing of the search results. Not currently implemented.
additionalSearchConditions -
container - Sets the search focus to be within a specified Container
containerList - Sets a list of Container Types to constrain the search within
Returns:
QueryResult
Throws:
WTException

search

public QueryResult search(Class classname,
                          Vector searchSpecVector,
                          Vector displayAttributes,
                          String sortPreference,
                          SearchCondition[] additionalSearchConditions,
                          Vector ibaSearchExpressions,
                          WTContainer container,
                          Vector containerList)
                   throws WTException
Queries for persistant objects of one class using the vector of AttributeSearchSpecifications for the criterion. If any pre or post query processing of the data is required it does that. An additional array of search conditions and IBA conditions can be added.

Supported API: false

Parameters:
classname - The class to query against.
searchSpecVector - The search criteria for the search.
displayAttributes - The list of attributes that the client wants to display from the results of the search task.
sortPreference - To specify the sort preference for post processing of the search results. Not currently implemented.
additionalSearchConditions -
ibaSearchExpressions -
container - Sets the search focus to be within a specified Container
containerList - Sets a list of Container Types to constrain the search within
Returns:
QueryResult
Throws:
WTException

_search

protected QueryResult _search(Class classname,
                              Vector searchSpecVector,
                              Vector displayAttributes,
                              String sortPreference,
                              SearchCondition[] additionalSearchConditions,
                              Vector ibaSearchExpressions,
                              WTContainer container,
                              Vector containerList)
                       throws WTException
Queries for persistant objects of one class using the vector of AttributeSearchSpecifications for the criterion. If any pre or post query processing of the data is required it does that. An additional array of search conditions and IBA conditions can be added.

Supported API: false

Parameters:
classname - The class to query against.
searchSpecVector - The search criteria for the search.
displayAttributes - The list of attributes that the client wants to display from the results of the search task.
sortPreference - To specify the sort preference for post processing of the search results. Not currently implemented.
additionalSearchConditions -
ibaSearchExpressions -
container - Sets the search focus to be within a specified Container
containerList - Sets a list of Container Types to constrain the search within
Returns:
QueryResult
Throws:
WTException

isEnumType

public static boolean isEnumType(Class type)

create_query_spec

public QuerySpec create_query_spec(Class classname,
                                   Vector searchSpecVector)
                            throws WTException
Not to be used outside of Windchill code.

Supported API: false

Throws:
WTException

getAttributeValue

public static String getAttributeValue(PropertyDescriptor pd,
                                       WTObject biz_obj,
                                       Locale locale)

getSearchConditionOperator

protected OperatorType getSearchConditionOperator(String an_operator)

getQueryName

public String getQueryName(Class classname,
                           String attributeName)
                    throws WTIntrospectionException
Throws:
WTIntrospectionException

convertWildcardExpression

private void convertWildcardExpression(SearchExpression a_searchExpression)
                                throws WTPropertyVetoException
Throws:
WTPropertyVetoException

getIteratedType

private Class getIteratedType(Class classname)
                       throws WTException
Throws:
WTException

getIteratedTypes

private HashSet getIteratedTypes(Class classname)
                          throws WTException
Throws:
WTException

addMasterAccessControl

private QuerySpec addMasterAccessControl(QuerySpec qs,
                                         Class searchClass)
                                  throws WTException
Throws:
WTException

masterAccessProcessResult

private QueryResult masterAccessProcessResult(QueryResult searchResult)

updateQuerySpecForContainers

private void updateQuerySpecForContainers(QuerySpec qs,
                                          WTContainer container,
                                          Vector containerList,
                                          Class classname)
                                   throws WTException
Throws:
WTException

updateDefaultClassSearchSpecForContainers

private void updateDefaultClassSearchSpecForContainers(DefaultClassSearchSpec dcss,
                                                       Class classname,
                                                       WTContainer container,
                                                       Vector containerList)
                                                throws WTException,
                                                       WTPropertyVetoException
Throws:
WTException
WTPropertyVetoException

appendContainerCondition

private SearchCondition appendContainerCondition(WTContainer container,
                                                 Class searchClass)
                                          throws WTException
Throws:
WTException

appendContainerTypeCondition

private SearchCondition appendContainerTypeCondition(Class classname,
                                                     String containerType)
                                              throws WTException
Throws:
WTException

inflateResults

private void inflateResults(QueryResult results,
                            Vector displayAttributes)
                     throws WTException
Throws:
WTException

updateQuerySpecForTerminalObjects

private void updateQuerySpecForTerminalObjects(QuerySpec qs,
                                               Class classname)
                                        throws WTException
Throws:
WTException