|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ibm.ram.common.data.SearchQuery
com.ibm.ram.client.RAMQueryBuilder
com.ibm.ram.client.RAMAssetQueryBuilder
public class RAMAssetQueryBuilder
Constructs query strings to be used by the RAMSession.fetchAssets() method.
| Field Summary | |
|---|---|
java.lang.String |
QUERY_ATTRIBUTE_NAME
Adding this field will return results where assets match the field asset attribute name By default it will be anded with the other added search fields (only return results that match all the query fields) you may set the matchAnyField to or return results that match and query field. |
java.lang.String |
QUERY_ATTRIBUTE_VALUE
Adding this field will return results where assets match the field asset attribute value By default it will be anded with the other added search fields (only return results that match all the query fields) you may set the matchAnyField to or return results that match and query field. |
java.lang.String |
QUERY_FIELD_ATTRIBUTE
Adding this field will return results where assets match the field asset attribute key value pair For asset attributes your query value should be in the form attributeName=attributeValue For XML searching use the form element[attribute1Name=attributeValue and attribute2Name=attribute2Value] By default it will be anded with the other added search fields (only return results that match all the query fields) you may set the matchAnyField to or return results that match and query field. |
java.lang.String |
QUERY_FIELD_DATE
Adding this field will return results where assets match the Last modified date provided. |
java.lang.String |
QUERY_FIELD_DBID
Adding this field will return results where assets match the internal database id provided. |
java.lang.String |
QUERY_FIELD_DESCRIPTION
Adding this field will return results where assets match the description provided. |
java.lang.String |
QUERY_FIELD_GUID
Adding this field will return results where assets match the GUID provided. |
java.lang.String |
QUERY_FIELD_NAME
Adding this field will return results where assets match the name. |
java.lang.String |
QUERY_FIELD_OWNER
Adding this field will return results where assets match the owner id provided. |
java.lang.String |
QUERY_FIELD_RATING
Adding this field will return results where assets match the rating provided. |
java.lang.String |
QUERY_FIELD_STATE
Adding this field will return results where assets match the state. |
java.lang.String |
QUERY_FIELD_VERSION
Adding this field will return results where assets match the field version. |
java.lang.String |
SORT_BY_FIELD_COMMUNITY_NAME
Constant used by the sortByField property to sort the search results by community name. |
java.lang.String |
SORT_BY_FIELD_GUID
Constant used by the sortByField property to sort the search results by asset GUID. |
java.lang.String |
SORT_BY_FIELD_LAST_MODIFIED
Constant used by the sortByField property to sort the search results by last modified date. |
java.lang.String |
SORT_BY_FIELD_NAME
Constant used by the sortByField property to sort the search results by asset name. |
java.lang.String |
SORT_BY_FIELD_RATING
Constant used by the sortByField property to sort the search results by asset rating. |
java.lang.String |
SORT_BY_FIELD_RELEVANCE
Constant used by the sortByField property to sort the search results by relevance. |
java.lang.String |
SORT_BY_FIELD_STATE
Constant used by the sortByField property to sort the search results by asset state. |
java.lang.String |
SORT_BY_FIELD_VERSION
Constant used by the sortByField property to sort the search results by asset version. |
| Fields inherited from class com.ibm.ram.client.RAMQueryBuilder |
|---|
AND_OPERATOR, OR_OPERATOR, QUERY_FIELD_TEXT, UNLIMITED_RESULTS |
| Fields inherited from class com.ibm.ram.common.data.SearchQuery |
|---|
SEARCH_WITHIN_ARTIFACTS_FLAG, SEARCH_WITHIN_FORUMS_FLAG, SYNCHRONIZED_SEARCH_FLAG |
| Constructor Summary | |
|---|---|
RAMAssetQueryBuilder(RAMSession session)
Construct a new QueryBuilder for a given RAMSession |
|
| Method Summary | |
|---|---|
void |
addQueryField(java.lang.String queryField,
java.lang.String value)
Add a query field and and value to this search query. |
void |
addQueryTextField(java.lang.String queryText)
Add a query text part The value will be escaped to pull out Lucene reserved characters. |
void |
addSearchFilter(AssetRating rating)
Filter results to only assets that are in with a certain rating |
void |
addSearchFilter(AssetTag tag)
Filter results to only assets that are in with a certain tag |
void |
addSearchFilter(AssetType assetType)
Filter results to only assets that are in a certain asset type |
void |
addSearchFilter(CategorySchema categorySchema)
Filter results to only assets that are categorized by a specific category schema |
void |
addSearchFilter(Category category,
java.lang.String categorization)
Filter results to only assets that have a certain categorization |
void |
addSearchFilter(CommunityInformation community)
Filter results to only assets that are in a certain community |
protected void |
addSearchFilter(SearchFilterItem searchFilterItem)
|
void |
addSearchFilter(State state)
Filter results to only assets that are in a certain state |
void |
addSearchFilter(java.lang.String filterName,
java.lang.String filterItem)
Add a specific filter with the internal RAM filter id and the value for the filter. |
void |
addSearchFilter(SubCategory subcategory)
Filter results to only assets that are in a sub-category. |
void |
clearQueryFields()
Clear out the set query fields. |
void |
clearSearchFilters()
Clear out the set search filters. |
java.lang.String |
createQueryFieldText(java.lang.String queryField,
java.lang.String value)
Creates a Search Text part that may be added to this query through the addQueryTextField() This method will escape the Lucene characters by default. |
RAMSearchFilter[] |
getAllSearchFilters()
Return a list of search filters set on this query. |
java.lang.String |
getQueryString()
Returns the search query as a String. |
RAMSearchFilter |
getSearchFilter(java.lang.String filterName)
Returns a search filter with selectable items that may be selected to limit the search results |
SearchFilterItem[] |
getSelectedFilters()
Return a list of the selected FilterItems in this Query. |
protected void |
invalidateQuery()
|
java.lang.String |
toString()
|
| Methods inherited from class com.ibm.ram.client.RAMQueryBuilder |
|---|
isMatchAnyQueryField, setMatchAnyField, setQueryString |
| Methods inherited from class com.ibm.ram.common.data.SearchQuery |
|---|
escapeLuceneCharacters, getMaxResults, getResultsStartIndex, getSearchModes, getSortByField, isSortAscending, isThisSearchRecorded, setMaxResults, setResultsStartIndex, setSearchModes, setSortAscending, setSortByField, setThisSearchRecorded |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public java.lang.String QUERY_FIELD_GUID
public java.lang.String QUERY_FIELD_DATE
public java.lang.String QUERY_FIELD_DBID
public java.lang.String QUERY_FIELD_DESCRIPTION
public java.lang.String QUERY_FIELD_NAME
public java.lang.String QUERY_FIELD_OWNER
public java.lang.String QUERY_FIELD_RATING
public java.lang.String QUERY_FIELD_STATE
public java.lang.String QUERY_FIELD_VERSION
public java.lang.String QUERY_ATTRIBUTE_NAME
public java.lang.String QUERY_ATTRIBUTE_VALUE
public java.lang.String QUERY_FIELD_ATTRIBUTE
public java.lang.String SORT_BY_FIELD_COMMUNITY_NAME
SearchQuery.setSortByField(String),
SearchQuery.getSortByField()public java.lang.String SORT_BY_FIELD_LAST_MODIFIED
SearchQuery.setSortByField(String),
SearchQuery.getSortByField()public java.lang.String SORT_BY_FIELD_NAME
SearchQuery.setSortByField(String),
SearchQuery.getSortByField()public java.lang.String SORT_BY_FIELD_GUID
SearchQuery.setSortByField(String),
SearchQuery.getSortByField()public java.lang.String SORT_BY_FIELD_RATING
SearchQuery.setSortByField(String),
SearchQuery.getSortByField()public java.lang.String SORT_BY_FIELD_RELEVANCE
SearchQuery.setSortByField(String),
SearchQuery.getSortByField()public java.lang.String SORT_BY_FIELD_STATE
SearchQuery.setSortByField(String),
SearchQuery.getSortByField()public java.lang.String SORT_BY_FIELD_VERSION
SearchQuery.setSortByField(String),
SearchQuery.getSortByField()| Constructor Detail |
|---|
public RAMAssetQueryBuilder(RAMSession session)
session - | Method Detail |
|---|
public void addQueryTextField(java.lang.String queryText)
queryText -
public void addQueryField(java.lang.String queryField,
java.lang.String value)
queryField - value - public void clearQueryFields()
public void clearSearchFilters()
public java.lang.String getQueryString()
getQueryString in class SearchQueryRAMSession.createAssetQuery(String)public SearchFilterItem[] getSelectedFilters()
public java.lang.String createQueryFieldText(java.lang.String queryField,
java.lang.String value)
queryField - value -
addQueryTextField(String),
RAMAssetQueryBuilder#addQueryTextField(String, boolean)
public RAMSearchFilter[] getAllSearchFilters()
throws RAMRuntimeException
com.ibm.ram.client.RAMRuntimeException
RAMRuntimeException
public RAMSearchFilter getSearchFilter(java.lang.String filterName)
throws RAMRuntimeException
name -
RAMRuntimeExceptionprotected void addSearchFilter(SearchFilterItem searchFilterItem)
public void addSearchFilter(java.lang.String filterName,
java.lang.String filterItem)
filterName - filterItem - public void addSearchFilter(CategorySchema categorySchema)
categorySchema -
public void addSearchFilter(Category category,
java.lang.String categorization)
category - categorization - public void addSearchFilter(State state)
state - public void addSearchFilter(AssetType assetType)
assetType - public void addSearchFilter(CommunityInformation community)
community - public void addSearchFilter(AssetTag tag)
tag - public void addSearchFilter(AssetRating rating)
rating - public void addSearchFilter(SubCategory subcategory)
subcategory - protected void invalidateQuery()
invalidateQuery in class RAMQueryBuilderpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||