|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.query.DatabaseSearch
Utility class for processing the database search part of the integrated
search.
Supported API: true
Extendable: false
Field Summary | |
private static String |
AND
|
private static String |
CLASSNAME
|
(package private) Vector |
classnames
|
(package private) Hashtable |
criteria
|
(package private) Vector |
displayAttributes
|
private boolean |
domainRefSearch
|
static long |
EXTERNALIZATION_VERSION_UID
|
private boolean |
hasIterationInfo
|
private boolean |
isChangeObject
|
(package private) Locale |
locale
|
protected static long |
OLD_FORMAT_VERSION_UID
|
private int |
openParenPosition
|
private static String |
OR
|
private boolean |
orSearch
|
private static String |
RESOURCE
|
(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 QuerySpec |
addToWhere(QuerySpec qs,
SearchCondition sc)
|
private QuerySpec |
addToWhere(QuerySpec qs,
SearchCondition sc,
String logicalOperator)
|
private QuerySpec |
appendOidList(Class classname,
int index,
Vector oid_arrays)
Append the oids list from the content search into the database search. |
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 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)
|
private QuerySpec |
initQuerySpec(Class one_class)
|
private boolean |
isEnumType(Class type)
|
static PagingQueryResult |
limitedDatabaseSearch(Vector classnames,
Hashtable criteria,
Vector displayAttributes,
Vector sortKeys,
int pageOffset,
int pageRange,
String searchFilter,
HashMap oidList,
Locale locale)
Does the database part of the limited integrated search. |
private QuerySpec |
limitedPopulateQuerySpec(Class classname,
QuerySpec qs)
Use all of the information that has been set on this class to populate the QuerySpec(s). |
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. |
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. |
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
private static final String OR
private static final String AND
private static final boolean VERBOSE
private static final char WILDCARD_ESCAPE
private boolean domainRefSearch
private boolean orSearch
private int openParenPosition
private boolean hasIterationInfo
private boolean isChangeObject
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
public static PagingQueryResult limitedDatabaseSearch(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 limitedPopulateQuerySpec(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 addToWhere(QuerySpec qs, SearchCondition sc, String logicalOperator) 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
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |