|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.sap.mdm.search.SearchGroup
A search group is a container for a list of search parameters.
Note: There are many limitations as to how a search can be setup when using search groups. Below is a list of some limitations. It is by no mean a complete list. In the examples, an upper case indicates a search dimension on a field and a lowercase indicates a search constraint.
1. At most one level of nesting is allowed.
For examples:
2. All field dimensions within a search group needs to be the same field dimension.A=a && B=b && C=c // no nesting, OK (A=a || A=b) &&(C=c) // one level nesting, OK ((A=a || A=b) && (C=c)) && (D=d) // two or more level nesting, not OK
3. Depending on what the main level search operator ((A=a || A=b) // OK (A=a || B=b) // not OK
setComparisonOperator(int)) is set to, the search
group operator (setComparisonOperator(int)) is limited. | Search.setComparisonOperator | Operator Between Search Groups | SearchGroup.setComparisonOperator |
|---|---|---|
| Search.STANDARD_OPERATOR | AND | SearchGroup.OR_OPERATOR or SearchGroup.AND_OPERATOR |
| Search.AND_OPERATOR | AND | SearchGroup.AND_OPERATOR |
| Search.OR_OPERATOR | OR | SearchGroup.OR_OPERATOR |
(A=a || A=b) && (A=c || A=d)
MaskSearchDimension, NamedSearchSearchDimension and KeywordSearchDimension cannot be added
to a search group.
Search within a Search or within a SearchGroup.
SearchDimension| Field Summary | |
static int |
AND_OPERATOR
Specifies an AND operation for operands on the same level. |
static int |
OR_OPERATOR
Specifies an OR operation for operands on the same level. |
static int |
STANDARD_OPERATOR
Deprecated. replaced by Search.STANDARD_OPERATOR |
| Fields inherited from interface com.sap.mdm.search.SearchItem |
SEARCH, SEARCH_GROUP, SEARCH_PARAMETER |
| Constructor Summary | |
SearchGroup()
The empty constructor. |
|
| Method Summary | |
SearchItem |
addSearchItem(SearchDimension dimension,
SearchConstraint constraint)
Adds a search item. |
SearchItem |
addSearchItem(SearchItem searchItem)
Adds a search item to the search group. |
void |
clear()
Removes all search items from the list |
Object |
clone()
Clones this object. |
boolean |
equals(Object obj)
|
int |
getComparisonOperator()
Returns the logical operator for the search group. |
SearchItem |
getSearchItem(int index)
Returns the search item. |
SearchItem[] |
getSearchItems()
Returns the list of search items. |
int |
getType()
Returns the search item type. |
int |
hashCode()
|
SearchItem |
removeSearchItem(int index)
Removes the search item from the list. |
void |
setComparisonOperator(int operator)
Sets the logical operator. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int STANDARD_OPERATOR
Search.STANDARD_OPERATOR
public static final int OR_OPERATOR
public static final int AND_OPERATOR
| Constructor Detail |
public SearchGroup()
| Method Detail |
public Object clone()
SearchItem
clone in interface SearchItempublic boolean equals(Object obj)
public int hashCode()
public String toString()
public int getType()
SearchItem
getType in interface SearchItempublic int getComparisonOperator()
public void setComparisonOperator(int operator)
operator - public void clear()
public SearchItem addSearchItem(SearchItem searchItem)
Currently at most one level of nesting is allowed. There are also many
limitations imposed. Please see Javadoc for SearchGroup.
searchItem - the search item
public SearchItem addSearchItem(SearchDimension dimension,
SearchConstraint constraint)
dimension - the search dimensionconstraint - the search constraintpublic SearchItem removeSearchItem(int index)
index - the index of the search item
public SearchItem getSearchItem(int index)
index - the index
public SearchItem[] getSearchItems()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Copyright 2004-2007 by SAP AG. All Rights Reserved.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.
These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies (SAP Group) for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.