com.sap.mdm.search
Class PickListSearchConstraint

java.lang.Object
  extended bycom.sap.mdm.search.AbstractSearchConstraint
      extended bycom.sap.mdm.search.PickListSearchConstraint
All Implemented Interfaces:
Cloneable, SearchConstraint

public class PickListSearchConstraint
extends AbstractSearchConstraint

A pick list constraint. They include lookup Id values, text attribute values, numeric attribute values and coupled attribute values.


Field Summary
 
Fields inherited from interface com.sap.mdm.search.SearchConstraint
BOOLEAN_SEARCH_CONSTRAINT, DATE_TIME_SEARCH_CONSTRAINT, EXPRESSION_SEARCH_CONSTRAINT, KEYWORD_SEARCH_CONSTRAINT, MEASUREMENT_SEARCH_CONSTRAINT, NULL_SEARCH_CONSTRAINT, NUMERIC_SEARCH_CONSTRAINT, PICK_LIST_SEARCH_CONSTRAINT, REGION_LAYER_SEARCH_CONSTRAINT, REMOTE_KEY_SEARCH_CONSTRAINT, REMOTE_SYSTEM_SEARCH_CONSTRAINT, TEXT_SEARCH_CONSTRAINT
 
Constructor Summary
PickListSearchConstraint(MdmValue[] values)
          Constructor with the specified pick list.
 
Method Summary
 int addValue(MdmValue value)
          Adds a pick item.
 void clear()
          Clears all the pick items.
 Object clone()
           
 boolean contains(MdmValue value)
          Check if this instance contains the specified value
 boolean equals(Object obj)
           
 int getType()
           
 MdmValue getValue(int index)
          Returns the pick item for the specified index.
 MdmValue[] getValues()
          Returns all the pick items.
 int hashCode()
           
 boolean isAndMultivaluedSearch()
          Indicates if the pick items are ANDed or ORed.
 MdmValue removeValue(int index)
          Returns the pick item at the specified index.
 void setAndMultivaluedSearch(boolean isAndMultivaluedSearch)
          This is for use with a multi-valued field.
 String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PickListSearchConstraint

public PickListSearchConstraint(MdmValue[] values)
Constructor with the specified pick list.

Parameters:
values - the pick list
Method Detail

clone

public Object clone()
Specified by:
clone in interface SearchConstraint
Specified by:
clone in class AbstractSearchConstraint

equals

public boolean equals(Object obj)

hashCode

public int hashCode()

toString

public String toString()

isAndMultivaluedSearch

public boolean isAndMultivaluedSearch()
Indicates if the pick items are ANDed or ORed.

Returns:
the boolean flag

setAndMultivaluedSearch

public void setAndMultivaluedSearch(boolean isAndMultivaluedSearch)
This is for use with a multi-valued field. If pick list constains two or more pick items, it indicates if the pick items are AND'ed or OR'ed.

Parameters:
isAndMultivaluedSearch - the boolean flag

getValue

public MdmValue getValue(int index)
Returns the pick item for the specified index.

Parameters:
index - an index value
Returns:
the pick item

getValues

public MdmValue[] getValues()
Returns all the pick items.

Returns:
the pick items

addValue

public int addValue(MdmValue value)
Adds a pick item.

Parameters:
value - a pick item
Returns:
the number if pick items

contains

public boolean contains(MdmValue value)
Check if this instance contains the specified value

Parameters:
value - value whose presence in this instance is to be tested.
Returns:
true if this instance contains specified value, false otherwise

removeValue

public MdmValue removeValue(int index)
Returns the pick item at the specified index.

Parameters:
index - a index value
Returns:
a pick item

clear

public void clear()
Clears all the pick items.


getType

public int getType()
Specified by:
getType in interface SearchConstraint
Specified by:
getType in class AbstractSearchConstraint


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.