public class DataMapping extends DataMappingObject implements JavaCodeGenerator
internalId, internalName, log, TIMESTAMP_FORMAT
SERIALIZED_CLASS_NAME, TYPE
XML_SERIALIZED_CLASS_NAME
Constructor and Description |
---|
DataMapping() |
assertValid, assertValid, clone, exception, exception, exception, getInternalId, getInternalName, resetInternalId
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
fromArrayValue, fromArrayValue, fromArrayValue, newInstanceFromRecord, newInstanceFromRecord, toArrayValue, toJson, toRecord
newInstanceFromJson
getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getChildElement, getChildElements, newInstanceFromXml, newInstanceFromXml, setAttribute, toXml, toXml, toXml, toXml, writeXml, writeXml
public String getName()
public DataMapping setName(String name)
public String getDescription()
public DataMapping setDescription(String description)
public DefaultExpressionContext getRootExpressionContext()
public DataMapping setValue(String name, Object value)
public DataMapping setValue(String name, Object value, Class<?> type)
public EntityDef getSourceEntity()
public DataMapping setSourceEntity(EntityDef sourceEntity)
public EntityDef getTargetEntity()
public DataMapping setTargetEntity(EntityDef targetEntity)
@Deprecated public EntityDef getTargetValidationEntity()
getTargetEntity()
instead.@Deprecated public DataMapping setTargetValidationEntity(EntityDef targetValidationEntity)
setTargetEntity(EntityDef)
instead.public List<LogicalExpression> getConditions()
public DataMapping addCondition(LogicalExpression condition)
public DataMapping addCondition(Collection<LogicalExpression> conditions)
public List<IFieldMapping> getFieldMappings()
public DataMapping addFieldMapping(IFieldMapping fieldMapping)
public DataMapping addFieldMapping(Collection<IFieldMapping> fieldMappings)
public DataMapping addFieldMapping(String targetFieldName, String sourceExpression)
public long getRownum()
public DataMappingResult map(ExpressionContext expressionContext)
public void generateJavaCode(JavaCodeBuilder code)
generateJavaCode
in interface JavaCodeGenerator
public DataException addExceptionProperties(DataException exception)
FoundationObject
DataException
. Since this method is called whenever an
exception is thrown, subclasses should override it to add their specific information.addExceptionProperties
in class FoundationObject
public Record toRecord()
toRecord
in interface RecordSerializable
toRecord
in class Bean
public DataMapping fromRecord(Record source)
RecordSerializable
this
(for fluid API call chaining).
For fluid API call chaining, the overridden method should change the declared return type to its class.fromRecord
in interface RecordSerializable
fromRecord
in class Bean
public DataMapping toJson(Writer writer)
toJson
in interface JsonSerializable
toJson
in interface RecordSerializable
public DataMapping toJson(Writer writer, boolean closeWriter)
toJson
in interface JsonSerializable
toJson
in interface RecordSerializable
public DataMapping toXml(Writer writer)
toXml
in interface XmlSerializable
public DataMapping fromJson(String jsonString)
fromJson
in interface JsonSerializable
fromJson
in interface RecordSerializable
public DataMapping fromJson(InputStream inputStream)
fromJson
in interface JsonSerializable
fromJson
in interface RecordSerializable
public DataMapping fromXml(InputStream inputStream)
fromXml
in interface XmlSerializable
public DataMapping fromXml(String xml)
fromXml
in interface XmlSerializable
public Element toXmlElement(Document document)
toXmlElement
in interface XmlSerializable
public DataMapping fromXmlElement(Element dataMappingElement)
fromXmlElement
in interface XmlSerializable