com.sap.mdm.valuetypes
Interface TupleValue

All Superinterfaces:
Cloneable, Comparable, MdmValue, RepositoryItem

public interface TupleValue
extends MdmValue, RepositoryItem

A data structure representing a tuple value.

Since:
7.1

Nested Class Summary
 
Nested classes inherited from class com.sap.mdm.valuetypes.MdmValue
MdmValue.Type
 
Method Summary
 boolean containsField(FieldId fieldId)
          Check if specified field is populate with data
 Record[] findLookupRecords(FieldId lookupFieldId)
          Returns the lookup record for the specified lookup field.
 String getDisplayValue()
          Returns a display value for a tuple record.
 FieldId[] getFields()
          Returns the field Ids.
 MdmValue getFieldValue(FieldId fieldId)
          Returns the field value for the specified field.
 String getLookupDisplayValue(FieldId lookupFieldId)
          Returns display value for lookup field
 TupleDefinitionSchema getMetadata()
          Returns the metadata of the tuple definition
 MultiregionValue getMultiregionFieldValue(FieldId fieldId)
          Returns the multi-region value for the specified field.
 String getTupleDisplayValue(FieldId tupleFieldId)
          Returns the display value for the tuple field.
 TupleRecordId getTupleRecordId()
          Returns the tuple record Id, uniquely identifying a tuple record.
 boolean hasFieldValue(FieldId fieldId)
          Returns whether the specified field has field value, meaning not null.
 void setFieldValue(FieldId fieldId, MdmValue value)
          Sets the field value for the specified field.
 
Methods inherited from interface com.sap.mdm.valuetypes.MdmValue
clone, getType, isMultiregion, isMultivalue, isNull
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getFields

public FieldId[] getFields()
Returns the field Ids.

Returns:
a list of field Ids

getFieldValue

public MdmValue getFieldValue(FieldId fieldId)
Returns the field value for the specified field.

Parameters:
fieldId - a field Id
Returns:
a field value

getMultiregionFieldValue

public MultiregionValue getMultiregionFieldValue(FieldId fieldId)
Returns the multi-region value for the specified field.

Parameters:
fieldId - a field Id
Returns:
a multi-region value

setFieldValue

public void setFieldValue(FieldId fieldId,
                          MdmValue value)
Sets the field value for the specified field.

Parameters:
fieldId - a field Id
value - a field value

getMetadata

public TupleDefinitionSchema getMetadata()
Returns the metadata of the tuple definition

Returns:
a tuple definition metadata

getTupleRecordId

public TupleRecordId getTupleRecordId()
Returns the tuple record Id, uniquely identifying a tuple record.

Returns:
a tuple Id

findLookupRecords

public Record[] findLookupRecords(FieldId lookupFieldId)
                           throws IllegalArgumentException
Returns the lookup record for the specified lookup field.

Parameters:
lookupFieldId - a field Id
Returns:
a lookup record
Throws:
IllegalArgumentException

getLookupDisplayValue

public String getLookupDisplayValue(FieldId lookupFieldId)
                             throws IllegalArgumentException
Returns display value for lookup field

Parameters:
lookupFieldId - ID of lookup field
Returns:
display value of lookup record. If lookup record was not loaded then Null is returned
Throws:
IllegalArgumentException - if field with specified ID does not exist or was not populated or is not lookup field
Since:
7.1

getTupleDisplayValue

public String getTupleDisplayValue(FieldId tupleFieldId)
                            throws IllegalArgumentException
Returns the display value for the tuple field.

Parameters:
tupleFieldId - a tuple field
Returns:
a display value
Throws:
IllegalArgumentException
Since:
7.1

getDisplayValue

public String getDisplayValue()
Returns a display value for a tuple record. A display value is a collection field values. Basically it's a short string representation of a tuple record.

Returns:
a display value
Since:
7.1
See Also:
TupleDefinitionProperties#getDisplayFieldIds()

containsField

public boolean containsField(FieldId fieldId)
Check if specified field is populate with data

Parameters:
fieldId - field ID
Returns:
true if specified field is populated with data, false otherwise

hasFieldValue

public boolean hasFieldValue(FieldId fieldId)
Returns whether the specified field has field value, meaning not null. This method is intended for use with tuple fields since getFieldValue(FieldId).isNull() always return true when ResultDefinition.setIsLoadTupleValues(boolean) is set to false. In such a case, this method can be used to determine if tuple values exist.

For non-tuple fields, the following statement is true:

getFieldValue(FieldId).isNull() != hasFieldValue(FieldId)

Parameters:
fieldId - field ID
Returns:
Returns true if the field has field value, otherwise false.
Since:
7.1 SP8


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.