com.sap.mdm.valuetypes
Class QualifiedLookupValue

java.lang.Object
  extended bycom.sap.mdm.valuetypes.AbstractMdmValue
      extended bycom.sap.mdm.valuetypes.MultiValue
          extended bycom.sap.mdm.valuetypes.QualifiedLookupValue
All Implemented Interfaces:
Cloneable, Comparable, MdmValue
Direct Known Subclasses:
QualifiedLookupValueEx

public class QualifiedLookupValue
extends MultiValue

This class represents value of qualified field. It includes number of QualifiedLinkValue instances.


Nested Class Summary
 
Nested classes inherited from class com.sap.mdm.valuetypes.MdmValue
MdmValue.Type
 
Constructor Summary
QualifiedLookupValue()
          Constructor
QualifiedLookupValue(QualifiedLinkValue[] values)
          Constructor
QualifiedLookupValue(QualifiedLookupValue value)
          Constructs with the specified parameter.
 
Method Summary
 void clearValues()
          Remove all values from the list.
 Object clone()
          Clone MdmValue object
 int createQualifiedLink(QualifiedLinkId linkId, RecordId lookupId)
          Create qualified link corresponded to the existing link in the repository and add it to the list of links.
 int createQualifiedLink(QualifiedLinkId linkId, RecordId lookupId, Map qualifiers)
          Create qualified link corresponded to the existing link in the repository and add it to the list of links.
 int createQualifiedLink(QualifiedLinkValue link)
          Create new qualified link as copy of another qualified link.
 int createQualifiedLink(RecordId lookupId)
          Create new qualified link and add it to the list of links
 int createQualifiedLink(RecordId lookupId, Map qualifiers)
          Create new qualified link populated with qualifier values and add it to the list of links
 QualifiedLinkId getLinkId(int index)
          Get ID of qualified link at the specified position
 RecordId getLookupId(int index)
          Get ID of lookup record that defines the specified qualified link
 MultiregionValue getMultiregionQualifierFieldValue(int index, FieldId qualifierFieldId)
          Get multi-regional value of the specified qualifier field for the qualified link at specified index position
 QualifiedLinkValue getQualifiedLink(int index)
          Get QualifiedLink at the specified position.
 QualifiedLinkValue[] getQualifiedLinks()
          Get array of all qualified links
 FieldId[] getQualifierFields()
          Get IDs of qualifier fields
 MdmValue getQualifierFieldValue(int index, FieldId qualifierFieldId)
          Get value of the specified qualifier field for the qualified link at specified index position
 List getRemovedLinks()
          Get qualified links that should be removed
 int getType()
          Get type of MdmValue instance.
 boolean isCompleteSet()
          Specify if this set of qualified links is complete
 void removeQualifiedLink(int index)
          Remove qualified link at specified position in the list of links.
 MdmValue removeValue(int index)
          Remove value at the specified position in the list of values
 void removeValue(MdmValue value)
          Remove specified value from the list of values
 void setCompleteSet(boolean isCompleteSet)
          Specify if this set of qualified links is complete
 void setQualifierFieldValue(int index, FieldId qualifierFieldId, MdmValue value)
          Set value to the specified qualifier field for the qualified link at specified index position
 
Methods inherited from class com.sap.mdm.valuetypes.MultiValue
addValue, addValue, compareTo, containsValue, equals, getValue, getValues, getValuesCount, hashCode, isMultivalue, isNull, setValues, sortLinks, toString
 
Methods inherited from class com.sap.mdm.valuetypes.AbstractMdmValue
compareTo, isMultiregion
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QualifiedLookupValue

public QualifiedLookupValue()
Constructor


QualifiedLookupValue

public QualifiedLookupValue(QualifiedLinkValue[] values)
Constructor

Parameters:
values - array of qualified links

QualifiedLookupValue

public QualifiedLookupValue(QualifiedLookupValue value)
Constructs with the specified parameter.

Parameters:
value - array of qualified links
Method Detail

getType

public int getType()
Description copied from interface: MdmValue
Get type of MdmValue instance. For MdmMultiValue instance this type specify type of multi-value elements Constants for MdmValue types are specified in this interface

Specified by:
getType in interface MdmValue
Overrides:
getType in class MultiValue

getQualifiedLinks

public QualifiedLinkValue[] getQualifiedLinks()
Get array of all qualified links

Returns:
array of qualified links

getLinkId

public QualifiedLinkId getLinkId(int index)
                          throws IllegalArgumentException
Get ID of qualified link at the specified position

Parameters:
index - position of qualified link in the list of links
Returns:
ID of qualified link
Throws:
IllegalArgumentException - if index is out of bounds

getLookupId

public RecordId getLookupId(int index)
                     throws IllegalArgumentException
Get ID of lookup record that defines the specified qualified link

Parameters:
index - position of qualified link in the list of links
Returns:
ID of lookup record
Throws:
IllegalArgumentException - if index is out of bounds

getQualifierFields

public FieldId[] getQualifierFields()
Get IDs of qualifier fields

Returns:
array of IDs for all qualifier fields

getQualifierFieldValue

public MdmValue getQualifierFieldValue(int index,
                                       FieldId qualifierFieldId)
                                throws IllegalArgumentException
Get value of the specified qualifier field for the qualified link at specified index position

Parameters:
index - position of qualified link in the list of links
qualifierFieldId - ID of qualifier field
Returns:
value of qualifier field
Throws:
IllegalArgumentException - if index is out of bounds or qualifiedFieldId is not exist

getMultiregionQualifierFieldValue

public MultiregionValue getMultiregionQualifierFieldValue(int index,
                                                          FieldId qualifierFieldId)
                                                   throws IllegalArgumentException
Get multi-regional value of the specified qualifier field for the qualified link at specified index position

Parameters:
index - position of qualified link in the list of links
qualifierFieldId - ID of qualifier field
Returns:
value of qualifier field
Throws:
IllegalArgumentException - if index is out of bounds or qualifiedFieldId is not exist or value is not multi-regional

setQualifierFieldValue

public void setQualifierFieldValue(int index,
                                   FieldId qualifierFieldId,
                                   MdmValue value)
                            throws IllegalArgumentException
Set value to the specified qualifier field for the qualified link at specified index position

Parameters:
index - position of qualified link in the list of links
qualifierFieldId - ID of qualifier field
value - new value of qualifier field
Throws:
IllegalArgumentException - if index is out of bounds or qualifiedFieldId is not exist

createQualifiedLink

public int createQualifiedLink(RecordId lookupId)
Create new qualified link and add it to the list of links

Parameters:
lookupId - ID of lookup record that defines the new qualified link
Returns:
position of new created qualified link in the list of links

createQualifiedLink

public int createQualifiedLink(RecordId lookupId,
                               Map qualifiers)
Create new qualified link populated with qualifier values and add it to the list of links

Parameters:
lookupId - ID of lookup record that defines the new qualified link
qualifiers - map of qualifier field values. Key of map is ID of qualifier field. If qualifier field values are not known they should be populated to MdmNull values
Returns:
position of new created qualified link in the list of links

createQualifiedLink

public int createQualifiedLink(QualifiedLinkId linkId,
                               RecordId lookupId)
Create qualified link corresponded to the existing link in the repository and add it to the list of links.

Parameters:
linkId - ID of qualified link.
lookupId - ID of lookup record that defines the new qualified link.
Returns:
position of new created qualified link in the list of links.

createQualifiedLink

public int createQualifiedLink(QualifiedLinkId linkId,
                               RecordId lookupId,
                               Map qualifiers)
Create qualified link corresponded to the existing link in the repository and add it to the list of links.

Parameters:
linkId - ID of qualified link.
lookupId - ID of lookup record that defines the new qualified link.
qualifiers - map of qualifier field values. Key of map is ID of qualifier field. If qualifier field values are not known they should be populated to MdmNull values
Returns:
position of new created qualified link in the list of links.

createQualifiedLink

public int createQualifiedLink(QualifiedLinkValue link)
Create new qualified link as copy of another qualified link. The link will be cloned and added it to the list of links.

Parameters:
link - another qualified link.
Returns:
position of new created qualified link in the list of links.

removeQualifiedLink

public void removeQualifiedLink(int index)
                         throws IllegalArgumentException
Remove qualified link at specified position in the list of links.

Parameters:
index - position of qualified link that should be removed.
Throws:
IllegalArgumentException - if index is out of bounds.

removeValue

public void removeValue(MdmValue value)
Description copied from class: MultiValue
Remove specified value from the list of values

Overrides:
removeValue in class MultiValue
Parameters:
value - value that should be removed

removeValue

public MdmValue removeValue(int index)
                     throws IllegalArgumentException
Description copied from class: MultiValue
Remove value at the specified position in the list of values

Overrides:
removeValue in class MultiValue
Parameters:
index - position of removed value
Returns:
instance of removed value
Throws:
IllegalArgumentException - if index is out of bounds

clearValues

public void clearValues()
Description copied from class: MultiValue
Remove all values from the list.

Overrides:
clearValues in class MultiValue

getQualifiedLink

public QualifiedLinkValue getQualifiedLink(int index)
                                    throws IllegalArgumentException
Get QualifiedLink at the specified position.

Parameters:
index - position of qualified link.
Returns:
qualified link.
Throws:
IllegalArgumentException - if index is out of bounds.

clone

public Object clone()
Description copied from interface: MdmValue
Clone MdmValue object

Specified by:
clone in interface MdmValue
Overrides:
clone in class MultiValue

isCompleteSet

public boolean isCompleteSet()
Specify if this set of qualified links is complete

Returns:
true if set is complete, false if set includes only differential changes

setCompleteSet

public void setCompleteSet(boolean isCompleteSet)
Specify if this set of qualified links is complete

Parameters:
isCompleteSet - true if set is complete, false if set includes only differential changes

getRemovedLinks

public List getRemovedLinks()
Get qualified links that should be removed

Returns:
list of removed links


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.