public class SchemaMapper extends Object
| Constructor and Description |
|---|
SchemaMapper() |
| Modifier and Type | Method and Description |
|---|---|
void |
addFieldMapping(FieldDefinition from,
FieldDefinition to)
Add a forward and reverse mapping from one RecordDefinition to another.
|
void |
addFieldMapping(RecordDefinition fromClass,
String fromName,
RecordDefinition toClass,
String toName)
Add a forward and reverse mapping from one FieldDefinition to another.
|
void |
addTypeConverter(RecordDefinition type,
ObjectConverter converter)
Add an object converter for the specified type.
|
void |
addTypeMapping(RecordDefinition from,
RecordDefinition to)
Add a forward and reverse mapping from one RecordDefinition to another.
|
Record |
convert(Record object) |
RecordDefinition |
getClassMapping(RecordDefinition type)
Get the RecordDefinition that the specified class maps to.
|
FieldDefinition |
getFieldMapping(FieldDefinition attribute)
Get the FieldDefinition that the specified attribute maps to.
|
ObjectConverter |
getTypeConverter(RecordDefinition type)
Get the converter that can convert objects of the specified type.
|
RecordDefinition |
getTypeMapping(RecordDefinition type)
Get the RecordDefinition that the specified type maps to.
|
boolean |
hasTypeConverter(RecordDefinition type)
Check there is a converter for the type.
|
public void addFieldMapping(FieldDefinition from, FieldDefinition to)
from - The type.to - The mapped type.public void addFieldMapping(RecordDefinition fromClass, String fromName, RecordDefinition toClass, String toName)
from - The attribute.to - The mapped type.public void addTypeConverter(RecordDefinition type, ObjectConverter converter)
from - The type.converter - The converter.public void addTypeMapping(RecordDefinition from, RecordDefinition to)
from - The type.to - The mapped type.public RecordDefinition getClassMapping(RecordDefinition type)
type - The class to map.public FieldDefinition getFieldMapping(FieldDefinition attribute)
attribute - The attribute to map.public ObjectConverter getTypeConverter(RecordDefinition type)
type - The type to convert.public RecordDefinition getTypeMapping(RecordDefinition type)
type - The type to map.public boolean hasTypeConverter(RecordDefinition type)
type - The type to convert.Copyright © 2015 Revolution Systems Inc.. All rights reserved.