com.sap.mdm.extension.data
Interface RecordEx

All Superinterfaces:
Cloneable, Record, RepositoryItem
All Known Subinterfaces:
HierNodeEx

public interface RecordEx
extends Record

Extension of Record interface


Nested Class Summary
 
Nested classes inherited from class com.sap.mdm.data.Record
Record.CheckoutStatus, Record.MatrixType, Record.ModificationStatus
 
Method Summary
 boolean containsAttribute(String taxonomyFieldCode, String attrCode)
          Check if specified attribute is populate with data
 boolean containsField(String fieldCode)
          Check if specified field is populate with data
 RecordEx[] findLookupRecords(String lookupFieldCode)
          Find lookup record (or records for multi-value case) in cache or retrieve from repository
 String[] getAttributeCodes(String taxonomyFieldCode)
          Get array of attribute codes for the specified taxonomy field.
 String[] getAttributeDisplayValue(FieldId taxonomyFieldId, AttributeId attrId)
          Deprecated. by getAttributeDisplayValue(FieldId, AttributeId, int) using RegionLayer.CURRENT mode.
 String[] getAttributeDisplayValue(FieldId taxonomyFieldId, AttributeId attrId, int regionalLayer)
          Returns display value of the specified attribute.
 String[] getAttributeDisplayValue(String taxonomyFieldCode, String attrCode)
          Deprecated. by getAttributeDisplayValue(String, String, int) using RegionLayer.CURRENT mode.
 String[] getAttributeDisplayValue(String taxonomyFieldCode, String attrCode, int regionalLayer)
          Returns display value of the specified attribute.
 MdmValue getAttributeValue(String taxonomyFieldCode, String attrCode)
          Get value of the specified attribute for taxonomy field.
 String[] getFieldCodes()
          Get array of field codes for all populated records.
 String[] getFieldDisplayValue(FieldId fieldId)
          Returns display value of the specified field.
 String[] getFieldDisplayValue(String fieldCode)
          Returns display value of the specified field.
 MdmValue getFieldValue(String fieldCode)
          Get value of the specified field.
 String getLookupDisplayValue(String lookupFieldCode)
          Returns display value for lookup field
 MultiregionValue getMultiregionFieldValue(String fieldCode)
          Get multi-region value of the specified field.
 String getTupleDisplayValue(String tupleFieldCode)
          Returns display value for tuple field
 boolean isQualifiedField(String fieldCode)
          Indicates if the specified field is qualified lookup field
 boolean isTaxonomyField(String fieldCode)
          Indicates if the specified field is taxonomy field
 void setAttributeValue(String taxonomyFieldCode, String attrCode, MdmValue value)
          Set new value to the specified attribute for taxonomy field.
 void setFieldValue(String fieldCode, MdmValue value)
          Set new value to the specified field.
 
Methods inherited from interface com.sap.mdm.data.Record
clone, containsAttribute, containsField, findLookupRecords, getAttributes, getAttributeValue, getChangeStamp, getCheckoutStatus, getDefaultRegionCode, getDisplayValue, getFields, getFieldValue, getId, getLookupDisplayValue, getMatrixType, getMetadata, getModificationStatus, getMultiregionFieldValue, getReverseLookupRecords, getReverseLookups, getTable, getTupleDisplayValue, hasFieldValue, isInWorkflow, isProtected, isQualifiedField, isTaxonomyField, setAttributeValue, setFieldValue, setMatrixType, toString, toString, toString, toString
 

Method Detail

getFieldCodes

public String[] getFieldCodes()
Get array of field codes for all populated records.

Returns:
array of field codes. Empty array is returned if any field was populated

getFieldValue

public MdmValue getFieldValue(String fieldCode)
                       throws IllegalArgumentException
Get value of the specified field.

Parameters:
fieldCode - field code
Returns:
field value
Throws:
IllegalArgumentException - if field with specified code does not exist or was not populated

setFieldValue

public void setFieldValue(String fieldCode,
                          MdmValue value)
                   throws IllegalArgumentException,
                          MdmValueTypeException
Set new value to the specified field.

Parameters:
fieldCode - field code
value - new field value
Throws:
IllegalArgumentException - if field with specified code does not exist
MdmValueTypeException - if there is mismatch between field type and type of value

getMultiregionFieldValue

public MultiregionValue getMultiregionFieldValue(String fieldCode)
                                          throws IllegalArgumentException
Get multi-region value of the specified field.

Parameters:
fieldCode - field code
Returns:
field multi-region value
Throws:
IllegalArgumentException - if field with specified code does not exist or was not populated

findLookupRecords

public RecordEx[] findLookupRecords(String lookupFieldCode)
                             throws IllegalArgumentException
Find lookup record (or records for multi-value case) in cache or retrieve from repository

Parameters:
lookupFieldCode - code of lookup field
Returns:
array of lookup record. If lookup record was not loaded then Null is returned
Throws:
IllegalArgumentException - if field with specified code does not exist or was not populated or is not lookup field

getLookupDisplayValue

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

Parameters:
lookupFieldCode - code 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 code does not exist or was not populated or is not lookup field

getTupleDisplayValue

public String getTupleDisplayValue(String tupleFieldCode)
                            throws IllegalArgumentException
Returns display value for tuple field

Parameters:
tupleFieldCode - code of tuple field
Returns:
display value of tuple record.
Throws:
IllegalArgumentException - if field with specified code does not exist or is not tuple field

isTaxonomyField

public boolean isTaxonomyField(String fieldCode)
Indicates if the specified field is taxonomy field

Parameters:
fieldCode - field code
Returns:
true if specified field is taxonomy field, false otherwise

isQualifiedField

public boolean isQualifiedField(String fieldCode)
Indicates if the specified field is qualified lookup field

Parameters:
fieldCode - field code
Returns:
true if specified field is qualified lookup field, false otherwise

containsField

public boolean containsField(String fieldCode)
Check if specified field is populate with data

Parameters:
fieldCode - field code
Returns:
true if specified field is populated with data, false otherwise

getAttributeCodes

public String[] getAttributeCodes(String taxonomyFieldCode)
                           throws IllegalArgumentException
Get array of attribute codes for the specified taxonomy field.

Parameters:
taxonomyFieldCode - taxonomy field code
Returns:
array of attribute codes. If attributes were not populated then empty array is returned
Throws:
IllegalArgumentException - if field was not populated or field is not taxonomy field

getAttributeValue

public MdmValue getAttributeValue(String taxonomyFieldCode,
                                  String attrCode)
                           throws IllegalArgumentException
Get value of the specified attribute for taxonomy field.

Parameters:
taxonomyFieldCode - taxonomy field code
attrCode - attribute code
Returns:
attribute value
Throws:
IllegalArgumentException - if field or attribute with specified code was not populated or field is not taxonomy field

setAttributeValue

public void setAttributeValue(String taxonomyFieldCode,
                              String attrCode,
                              MdmValue value)
                       throws IllegalArgumentException,
                              MdmValueTypeException
Set new value to the specified attribute for taxonomy field.

Parameters:
taxonomyFieldCode - taxonomy field code
attrCode - attribute code
value - new attribute value
Throws:
IllegalArgumentException - if field or attribute with specified code was not populated or field is not taxonomy field
MdmValueTypeException - if there is mismatch between attribute type and type of value

containsAttribute

public boolean containsAttribute(String taxonomyFieldCode,
                                 String attrCode)
Check if specified attribute is populate with data

Parameters:
taxonomyFieldCode - field code
attrCode - attribute code
Returns:
true if specified field is populated with data, false otherwise

getFieldDisplayValue

public String[] getFieldDisplayValue(FieldId fieldId)
                              throws IllegalArgumentException
Returns display value of the specified field. The display value is built according to field properties (field metadata)

Parameters:
fieldId - the field ID
Returns:
array field display values. If field is single-value field then only the first element of array is populated.
Throws:
IllegalArgumentException

getFieldDisplayValue

public String[] getFieldDisplayValue(String fieldCode)
                              throws IllegalArgumentException
Returns display value of the specified field. The display value is built according to field properties (field metadata)

Parameters:
fieldCode - the field code
Returns:
array field display values. If field is single-value field then only the first element of array is populated.
Throws:
IllegalArgumentException

getAttributeDisplayValue

public String[] getAttributeDisplayValue(FieldId taxonomyFieldId,
                                         AttributeId attrId)
                                  throws IllegalArgumentException
Deprecated. by getAttributeDisplayValue(FieldId, AttributeId, int) using RegionLayer.CURRENT mode.

Returns display value of the specified attribute. The display value is built according to attribute properties (attribute metadata) and default region.

Parameters:
taxonomyFieldId - the ID of taxonomy field the specified attribute belongs to
attrId - the attribute ID
Returns:
array attribute display values. If attribute is single-value attribute then only the first element of array is populated.
Throws:
IllegalArgumentException

getAttributeDisplayValue

public String[] getAttributeDisplayValue(String taxonomyFieldCode,
                                         String attrCode)
                                  throws IllegalArgumentException
Deprecated. by getAttributeDisplayValue(String, String, int) using RegionLayer.CURRENT mode.

Returns display value of the specified attribute. The display value is built according to attribute properties (attribute metadata) and default region.

Parameters:
taxonomyFieldCode - the code of taxonomy field the specified attribute belongs to
attrCode - the attribute code
Returns:
array attribute display values. If attribute is single-value attribute then only the first element of array is populated.
Throws:
IllegalArgumentException

getAttributeDisplayValue

public String[] getAttributeDisplayValue(FieldId taxonomyFieldId,
                                         AttributeId attrId,
                                         int regionalLayer)
                                  throws IllegalArgumentException
Returns display value of the specified attribute. The display value is built according to attribute properties (attribute metadata) and regional layer mode.

Parameters:
taxonomyFieldId - the ID of taxonomy field the specified attribute belongs to
attrId - the attribute ID
regionalLayer - specifies the mode for retrieving multilingual data. If regionalLayer is CURRENT - current session language text value is returned (empty string if there is no value). If regionalLayer is PRIMARY_INHERITED - check the value for current session language, if exists return it, else check the primary inherited languages if exists return it else return empty string. If regionalLayer is INHERITED check the value for current session language, return the value if exists, else check the text value in primary inherited languages, return it if exists and if not check the value in secondary inherited languages. Note: Only RegionalLayer.CURRENT, RegionalLayer.PRIMARY_INHERITED and RegionalLayer.INHERITED are supported.
Returns:
array attribute display values. If attribute is single-value attribute then only the first element of array is populated.
Throws:
IllegalArgumentException
Since:
7.1
See Also:
RegionalLayer

getAttributeDisplayValue

public String[] getAttributeDisplayValue(String taxonomyFieldCode,
                                         String attrCode,
                                         int regionalLayer)
                                  throws IllegalArgumentException
Returns display value of the specified attribute. The display value is built according to attribute properties (attribute metadata) and regional layer mode.

Parameters:
taxonomyFieldCode - the code of taxonomy field the specified attribute belongs to
attrCode - the attribute code
regionalLayer - specifies the mode for retrieving multilingual data. If regionalLayer is CURRENT - current session language text value is returned (empty string if there is no value). If regionalLayer is PRIMARY_INHERITED - check the value for current session language, if exists return it, else check the primary inherited languages if exists return it else return empty string. If regionalLayer is INHERITED check the value for current session language, return the value if exists, else check the text value in primary inherited languages, return it if exists and if not check the value in secondary inherited languages. Note: Only RegionalLayer.CURRENT, RegionalLayer.PRIMARY_INHERITED and RegionalLayer.INHERITED are supported.
Returns:
array attribute display values. If attribute is single-value attribute then only the first element of array is populated.
Throws:
IllegalArgumentException
Since:
7.1
See Also:
RegionalLayer


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.