|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ptc.windchill.cadx.search.DatabaseSearch
Utility class for processing the database search part of the integrated
search.
Supported API: true
Extendable: false
Field Summary | |
private static String |
CLASSNAME
|
(package private) Vector |
classnames
|
(package private) Hashtable |
criteria
|
(package private) QuerySpec |
customSearch
|
(package private) Vector |
displayAttributes
|
private static String |
ESCAPE
|
private static char[] |
escapeChrs
|
static long |
EXTERNALIZATION_VERSION_UID
|
(package private) Locale |
locale
|
protected static long |
OLD_FORMAT_VERSION_UID
|
private static char |
ORACLE_ANY_CHAR
|
private static char |
ORACLE_ANY_CHARS
|
private static String |
RESOURCE
|
private static char |
SEARCH_ANY_CHAR
|
private static char |
SEARCH_ANY_CHARS
|
(package private) String |
searchFilter
|
(package private) static long |
serialVersionUID
|
(package private) Vector |
sortKeys
|
private static boolean |
VERBOSE
|
private static char |
WILDCARD_ESCAPE
|
Constructor Summary | |
private |
DatabaseSearch(Vector classnames,
Hashtable criteria,
Vector displayAttributes,
Vector sortKeys,
String searchFilter,
Locale locale)
Create and populate an instance that can be used to build and execute the database part of the integrated search. |
Method Summary | |
private QuerySpec |
addConfigSpec(Class classname,
QuerySpec qs,
String searchFilter)
|
private SearchCondition |
addOrgCriteria(Class classname,
String orgAttribute,
String orgAttrValue,
boolean isOpposite)
|
private QuerySpec |
addToWhere(QuerySpec qs,
SearchCondition sc)
|
private QuerySpec |
appendOidList(Class classname,
int index,
Vector oid_arrays)
Append the oids list from the content search into the database search. |
static Vector |
customDatabaseSearch(Vector classnames,
Hashtable criteria,
Hashtable criteriaIBA,
Vector displayAttributes,
Vector sortKeys,
int pageOffset,
int pageRange,
String searchFilter,
boolean isAnd,
Hashtable oidList,
Locale locale)
|
static PagingQueryResult |
databaseSearch(Vector classnames,
Hashtable criteria,
Vector displayAttributes,
Vector sortKeys,
int pageOffset,
int pageRange,
String searchFilter,
HashMap oidList,
Locale locale)
Does the database part of the integrated search. |
private QueryResult |
execute(Vector query_specs)
|
private PagingQueryResult |
execute(Vector query_specs,
int pageOffset,
int pageRange)
After the entire set of query specs is built this method can be used to run the search. |
private SearchCondition |
getSearchCondition(Class classname,
ClassInfo class_info,
String attrib_name,
String value,
Locale locale)
|
static SearchCondition |
getWildcardEscapedCondition(SearchCondition sc,
String value)
|
private QuerySpec |
initQuerySpec(Class one_class)
|
private boolean |
isEnumType(Class type)
|
static boolean |
isWildcardSearch(String value)
|
private QuerySpec |
populateQuerySpec(Class classname,
int i,
QuerySpec qs,
boolean isAnd,
Vector oids,
Hashtable criteriaIBA)
|
private QuerySpec |
populateQuerySpec(Class classname,
QuerySpec qs)
Use all of the information that has been set on this class to populate the QuerySpec(s). |
private Vector |
processOids(HashMap oidList)
Condense oids list from the content search into the correct classes for the database search. |
private Vector |
processOids(Hashtable oidList)
|
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(DatabaseSearch thisObject,
ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source. |
private SearchCondition |
setOppositeCondition(SearchCondition sc)
|
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 long serialVersionUID
public static final long EXTERNALIZATION_VERSION_UID
protected static final long OLD_FORMAT_VERSION_UID
Vector classnames
Hashtable criteria
Vector displayAttributes
Vector sortKeys
String searchFilter
Locale locale
QuerySpec customSearch
private static final char SEARCH_ANY_CHARS
private static final char ORACLE_ANY_CHARS
private static final char SEARCH_ANY_CHAR
private static final char ORACLE_ANY_CHAR
private static final String ESCAPE
private static char[] escapeChrs
private static final boolean VERBOSE
private static char WILDCARD_ESCAPE
Constructor Detail |
private DatabaseSearch(Vector classnames, Hashtable criteria, Vector displayAttributes, Vector sortKeys, String searchFilter, Locale locale)
classnames
- A list of the classes (of type Class not String) that this search will use in a
compound search. All of the criteria attributes and the sorting attributes must be the same
for each of the classes in the list. The sorting must be in the same order and the types of
the attributes must be the same.criteria
- A series of name value pairs of type String that specify the search criteria.displayAttributes
- List of attributes that are used to inflate the attribute values after a
search or retrieval of a page.sortKeys
- List of sort key strings that the results should be sorted in. The keys are
ordered with the first sort key being the first in the list. The string is of the format:
searchFilter
- Can be set to either ALL_VERSIONS or ALL_ITERATIONS. The ALL_VERSIONS will
return the latest iteration of each of the versions for the iterated object. ALL_ITERATIONS
will return all iterations of all versions of the iterated object.locale
- Locale of the client that is executed this method.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(DatabaseSearch 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 static PagingQueryResult databaseSearch(Vector classnames, Hashtable criteria, Vector displayAttributes, Vector sortKeys, int pageOffset, int pageRange, String searchFilter, HashMap oidList, Locale locale) throws WTException
classnames
- A list of the classes (of type Class not String) that this search will use in a compound search. All of the criteria attributes and the sorting attributes must be the same for each of the classes in the list. The sorting must be in the same order and the types of the attributes must be the same.criteria
- A series of name value pairs of type String that specify the search criteria.displayAttributes
- List of attributes that are used to inflate the attribute values after a search or retrieval of a page.sortKeys
- List of sort key strings that the results should be sorted in. The keys are ordered with the first sort key being the first in the list. The string is of the format:
pageOffset
- For the database paging of the search results this is the page offset into the results that is being requested. If the session id has been set to a valid session then a new query is not done but the offset is used to return a specific page of the query results. The first page is 0.pageRange
- For the database paging of the search results this sets the size of a page.searchFilter
- Can be set to either ALL_VERSIONS or ALL_ITERATIONS. The ALL_VERSIONS will return the latest iteration of each of the versions for the iterated object. ALL_ITERATIONS will return all iterations of all versions of the iterated object.oidList
- locale
- Locale of the client that is executed this method.
WTException
private Vector processOids(HashMap oidList) throws WTException
oidList
- Structure of oids returned from the content search engine.
WTException
private QuerySpec appendOidList(Class classname, int index, Vector oid_arrays) throws WTException
WTException
private PagingQueryResult execute(Vector query_specs, int pageOffset, int pageRange) throws WTException
pageOffset
- For the database paging of the search results this is the page offset into the results that is being requested. If the session id has been set to a valid session then a new query is not done but the offset is used to return a specific page of the query results. The first page is 0.pageRange
- For the database paging of the search results this sets the size of a page.
WTException
private QuerySpec populateQuerySpec(Class classname, QuerySpec qs) throws WTException
WTException
private QuerySpec initQuerySpec(Class one_class) throws WTException
WTException
private QuerySpec addToWhere(QuerySpec qs, SearchCondition sc) throws QueryException
QueryException
private QuerySpec addConfigSpec(Class classname, QuerySpec qs, String searchFilter) throws WTException
WTException
private boolean isEnumType(Class type)
private SearchCondition getSearchCondition(Class classname, ClassInfo class_info, String attrib_name, String value, Locale locale) throws WTException
WTException
public static Vector customDatabaseSearch(Vector classnames, Hashtable criteria, Hashtable criteriaIBA, Vector displayAttributes, Vector sortKeys, int pageOffset, int pageRange, String searchFilter, boolean isAnd, Hashtable oidList, Locale locale) throws WTException
WTException
private Vector processOids(Hashtable oidList) throws WTException
WTException
private QuerySpec populateQuerySpec(Class classname, int i, QuerySpec qs, boolean isAnd, Vector oids, Hashtable criteriaIBA) throws WTException
WTException
private SearchCondition addOrgCriteria(Class classname, String orgAttribute, String orgAttrValue, boolean isOpposite) throws WTException
WTException
private SearchCondition setOppositeCondition(SearchCondition sc) throws WTException
WTException
private QueryResult execute(Vector query_specs) throws WTException
WTException
public static boolean isWildcardSearch(String value)
public static SearchCondition getWildcardEscapedCondition(SearchCondition sc, String value) throws WTException
WTException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |