com.sap.mdm.dataimport
Class RecordImportDefinition

java.lang.Object
  extended bycom.sap.mdm.dataimport.RecordImportDefinition

public class RecordImportDefinition
extends Object

This class defines import parameters for a record. This class combines record import parameters and record values

Since:
MDM 7.1

Constructor Summary
RecordImportDefinition(Record record, int sourceId)
          Constructor
RecordImportDefinition(TableId tableId, int sourceId)
          Constructor
 
Method Summary
 int getDestinationChangeStamp()
          Returns change stamp of the destination record
 RecordId getDestinationRecordId()
          Returns ID of the destination record
 FieldImportDefinition getFieldImportDefinition(FieldId fieldId)
          Gets import definitions for the specified field.
 FieldImportDefinition[] getFieldImportDefinitions()
          Gets import definitions for all record fields
 int getImportType()
          Returns the import type of the record fields
 Record getSourceRecord()
          Returns the imported source record
 int getSourceRecordId()
          Returns the ID of the source record
 void setAttributeValue(FieldId taxonomyFieldId, AttributeId attrId, MdmValue attrValue)
          Sets value for the specified attribute.
 void setAttributeValue(FieldId taxonomyFieldId, AttributeId attrId, MdmValue attrValue, AttributeImportDefinition attrDef)
          Sets value and import definition for the specified attribute.
 void setDestinationChangeStamp(int destChangeStamp)
          Sets the change stamp of the destination record
 void setDestinationRecordId(RecordId destRecordId)
          Sets the ID of the destination record
 void setFieldValue(FieldId fieldId, MdmValue fieldValue)
          Sets value for the specified field.
 void setFieldValue(FieldId fieldId, MdmValue fieldValue, FieldImportDefinition fieldDef)
          Sets value and import definition for the specified field
 void setImportType(int fieldsImportType)
          Sets the import type of the record fields
 void setSourceRecordId(int sourceRecordId)
          Sets the ID of the source record
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecordImportDefinition

public RecordImportDefinition(Record record,
                              int sourceId)
Constructor

Parameters:
record - a record
sourceId - a source Id

RecordImportDefinition

public RecordImportDefinition(TableId tableId,
                              int sourceId)
Constructor

Parameters:
tableId - a table Id
sourceId - a source Id
Method Detail

setFieldValue

public void setFieldValue(FieldId fieldId,
                          MdmValue fieldValue,
                          FieldImportDefinition fieldDef)
                   throws MdmValueTypeException
Sets value and import definition for the specified field

Parameters:
fieldId - the field ID
fieldValue - the field value
fieldDef - the field import definition
Throws:
MdmValueTypeException - if there is mismatch between field type and field value

setFieldValue

public void setFieldValue(FieldId fieldId,
                          MdmValue fieldValue)
                   throws MdmValueTypeException
Sets value for the specified field. The default import definition will be used.

Parameters:
fieldId - the field ID
fieldValue - the field value
Throws:
MdmValueTypeException - if there is mismatch between field type and field value

setAttributeValue

public void setAttributeValue(FieldId taxonomyFieldId,
                              AttributeId attrId,
                              MdmValue attrValue,
                              AttributeImportDefinition attrDef)
                       throws MdmValueTypeException
Sets value and import definition for the specified attribute.

Parameters:
taxonomyFieldId - ID of the taxonomy field the attribute belongs to
attrId - attribute ID
attrValue - the attribute value
attrDef - the attribute import definition
Throws:
MdmValueTypeException - if there is mismatch between attribute type and attribute value

setAttributeValue

public void setAttributeValue(FieldId taxonomyFieldId,
                              AttributeId attrId,
                              MdmValue attrValue)
                       throws MdmValueTypeException
Sets value for the specified attribute. The default import definition will be used.

Parameters:
taxonomyFieldId - ID of the taxonomy field the attribute belongs to
attrId - attribute ID
attrValue - the attribute value
Throws:
MdmValueTypeException - if there is mismatch between attribute type and attribute value

getFieldImportDefinitions

public FieldImportDefinition[] getFieldImportDefinitions()
Gets import definitions for all record fields

Returns:
array of FieldImportDefinition

getFieldImportDefinition

public FieldImportDefinition getFieldImportDefinition(FieldId fieldId)
Gets import definitions for the specified field. Return Null if was not specified

Parameters:
fieldId - field ID
Returns:
the field import definition

getDestinationChangeStamp

public int getDestinationChangeStamp()
Returns change stamp of the destination record

Returns:
the destination record change stamp

setDestinationChangeStamp

public void setDestinationChangeStamp(int destChangeStamp)
Sets the change stamp of the destination record

Parameters:
destChangeStamp - the change stamp of the destination record

getDestinationRecordId

public RecordId getDestinationRecordId()
Returns ID of the destination record

Returns:
the ID of the destination record

setDestinationRecordId

public void setDestinationRecordId(RecordId destRecordId)
Sets the ID of the destination record

Parameters:
destRecordId - the ID of the destination record

getSourceRecord

public Record getSourceRecord()
Returns the imported source record

Returns:
the imported source record

getImportType

public int getImportType()
Returns the import type of the record fields

Returns:
the import type of the record fields
See Also:
including constants for import types

setImportType

public void setImportType(int fieldsImportType)
Sets the import type of the record fields

Parameters:
fieldsImportType - the the import type of the record fields
See Also:
including constants for import types

getSourceRecordId

public int getSourceRecordId()
Returns the ID of the source record

Returns:
the ID of the source record

setSourceRecordId

public void setSourceRecordId(int sourceRecordId)
Sets the ID of the source record

Parameters:
sourceRecordId - the source record ID to set


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.