|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.query.WindchillSearchService
Search service that allows the user to pass in a string representation
of the where clause to perform a query.
The string format of the where clause can contain both modeled and instance
based search criteria. Internally SearchTask is utilized to get the resulting
set of objects.
Supported API: false
Extendable: false
Field Summary | |
private static String |
CLASSNAME
|
static String |
DELIMITER_CHARACTER
|
private static boolean |
ENCODE_ATTRIBUTE_NAMES
|
static long |
EXTERNALIZATION_VERSION_UID
|
private static String |
FC_RESOURCE
|
private static String |
IBA_RESOURCE
|
private static String |
LOCAL_DOMAIN
|
private static String |
LOCAL_DOMAIN_INTERLOCK
|
protected static long |
OLD_FORMAT_VERSION_UID
|
private ReferenceFactory |
referenceFactory
|
private static String |
RESOURCE
|
(package private) static long |
serialVersionUID
|
(package private) static boolean |
SERVER
|
private SearchTask |
st
|
private static boolean |
VERBOSE
|
Fields inherited from interface wt.method.RemoteAccess |
versionID |
Constructor Summary | |
WindchillSearchService()
|
Method Summary | |
protected Enumeration |
_getResultSet(String className,
String whereClause,
String[] attributes,
Locale locale)
This method will perform a search and return an Enumeration of objects matching the criteria specified in the whereClause parameter. |
private SearchExpression |
createInstanceSearchExpression(AttributeDefDefaultView def,
OperatorType oper,
AttributeValueCriteria value)
This method will create a SearchExpression object for the given instance based AttributeDefDefaultView object, OperatorType, and AttributeValueCriteria. |
private AttributeSearchSpecification |
createModeledSearchSpecification(String className,
String key,
String searchOperator,
String value,
Locale locale)
This method will create a AttributeSearchSpecification object for the given class name, attribute name, operator, and value. |
private void |
debug(String message)
This method outputs debug statements. |
private String |
decodeAttributeName(String attributeName)
Method used to decode an IBA name from the format used to display it to the user and represent it in the where clause to the format used to locate it in the system. |
private Vector |
extractInstanceSearchCriteriaFromWhereClause(String whereClause,
Locale locale)
This method will extract the instance based search criteria from the where clause and return a Vector of SearchExpression objects. |
private Vector |
extractModeledSearchCriteriaFromWhereClause(String whereClause,
String className,
Locale locale)
This method will extract the modeled search criteria from the where clause and return a Vector of AttributeSearchSpecification objects. |
private Persistable |
getObject(String obid)
Helper method used to obtain a Persitable object with the specified ObjectID. |
Enumeration |
getResultSet(String className,
String whereClause,
String[] attributes,
Locale locale)
This method will perform a search and return an Enumeration of objects matching the criteria specified in the whereClause parameter. |
private boolean |
isEnumType(Class type)
This method will test to see if the Class passed to it is an EnumeratedType. |
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(WindchillSearchService thisObject,
ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source. |
void |
setSearchFilter(String searchFilter)
This method allows the search filter on the internal SearchTask object. |
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 |
private static final String RESOURCE
private static final String CLASSNAME
static final boolean SERVER
private static final String FC_RESOURCE
static final long serialVersionUID
public static final long EXTERNALIZATION_VERSION_UID
protected static final long OLD_FORMAT_VERSION_UID
private SearchTask st
private ReferenceFactory referenceFactory
private static boolean VERBOSE
private static boolean ENCODE_ATTRIBUTE_NAMES
private static String LOCAL_DOMAIN
private static String LOCAL_DOMAIN_INTERLOCK
private static final String IBA_RESOURCE
public static final String DELIMITER_CHARACTER
Constructor Detail |
public WindchillSearchService()
Method Detail |
public void writeExternal(ObjectOutput output) throws IOException
writeExternal
in interface Externalizable
output
-
IOException
public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
input
-
IOException
ClassNotFoundException
protected boolean readVersion(WindchillSearchService thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
thisObject
- input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
private boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
public Enumeration getResultSet(String className, String whereClause, String[] attributes, Locale locale) throws WTException
className
- The search class name.whereClause
- String representation of search criteria, including both modeled and instance based attribute values.attributes
- locale
-
WTException
protected Enumeration _getResultSet(String className, String whereClause, String[] attributes, Locale locale) throws WTException
className
- The search class name.whereClause
- String representation of search criteria, including both modeled and instance based attribute values.attributes
- locale
-
WTException
private Vector extractModeledSearchCriteriaFromWhereClause(String whereClause, String className, Locale locale) throws WTException
whereClause
- String representation of search criteria, including both modeled and instance based attribute values.className
- The search class name.locale
-
WTException
private Vector extractInstanceSearchCriteriaFromWhereClause(String whereClause, Locale locale) throws WTException
whereClause
- String representation of search criteria, including both modeled and instance based attribute values.locale
-
WTException
private String decodeAttributeName(String attributeName)
attributeName
- The string representing the attribute name to be decoded.
private SearchExpression createInstanceSearchExpression(AttributeDefDefaultView def, OperatorType oper, AttributeValueCriteria value) throws WTException
def
- The attribute definition object used to create the SearchExpression object.oper
- The search operator used to create the SearchExpression object.value
- The value for the attribute used to create the SearchExpression object.
WTException
private AttributeSearchSpecification createModeledSearchSpecification(String className, String key, String searchOperator, String value, Locale locale) throws WTException
className
- The search class name used to create the AttributeSearchSpecification object.key
- The attribute name used to create the AttributeSearchSpecification object.searchOperator
- The search operator used to create the AttributeSearchSpecification object.value
- The attribute value used to create the AttributeSearchSpecification object.locale
-
WTException
private boolean isEnumType(Class type)
type
- The Class being tested to see if it is an EnumeratedType.
public void setSearchFilter(String searchFilter) throws WTException
searchFilter
- The search filter to be set.
WTException
private void debug(String message)
message
- private Persistable getObject(String obid) throws WTException
obid
- The ObjectID of the desired Persistable object.
WTException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |