public abstract class LineMapper<L extends Line> extends Object implements ILineMapper<L>
| Modifier and Type | Field and Description |
|---|---|
protected OMRSAPIHelper |
omrsapiHelper |
protected OMRSRepositoryHelper |
repositoryHelper |
| Constructor and Description |
|---|
LineMapper(OMRSAPIHelper omrsapiHelper) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
getProxy1Guid(L line)
Get proxy 1 guid
|
protected String |
getProxy2Guid(L line)
Get proxy 2 guid
|
String |
getTypeDefGuid()
get the relationshipTypeDef Guid
This method should be overridden to provide the appropriate guid for the type.
|
abstract String |
getTypeName()
get type name
|
Relationship |
map(L line)
Map Line to the omrs relationship equivalent
|
L |
map(Relationship relationship)
Map from an OMRS Relationship to a Subject Area OMAS Line
|
protected boolean |
mapEnumToLine(L line,
String propertyName,
EnumPropertyValue enumPropertyValue)
Map an omrs enum property to a Subject Area Line property.
|
protected void |
mapInstancePropertiesToLine(L line,
InstanceProperties instanceProperties)
Map the instance properties to the Line
This method should be overridden by subclasses to map the properties to the Line.
|
protected void |
mapLineToInstanceProperties(L line,
InstanceProperties instanceProperties)
Map the supplied Line to omrs InstanceProperties.
|
protected boolean |
mapMapToLine(L line,
String propertyName,
InstanceProperties instancePropertyForMap)
Map an omrs map property to a Subject Area Line property.
|
protected boolean |
mapPrimitiveToLine(L line,
String propertyName,
Object value)
Map an omrs primitive property to a Subject Area Line property.
|
protected abstract void |
setEnd1GuidInLine(L line,
String guid)
Pass the guid of the EntityProxy for end 1 to the Line ,so it can store it appropriately
|
protected abstract void |
setEnd2GuidInLine(L line,
String guid)
Pass the guid of the EntityProxy for end 2 to the Line ,so it can store it appropriately
|
protected final OMRSAPIHelper omrsapiHelper
protected final OMRSRepositoryHelper repositoryHelper
public LineMapper(OMRSAPIHelper omrsapiHelper)
public L map(Relationship relationship)
ILineMappermap in interface ILineMapper<L extends Line>map in interface Mapper<Relationship,L extends Line>relationship - OMRS Linesprotected abstract void setEnd1GuidInLine(L line, String guid)
line - line to updateguid - guid to add into the Lineprotected abstract void setEnd2GuidInLine(L line, String guid)
line - line to updateguid - guid to add into the Lineprotected void mapInstancePropertiesToLine(L line, InstanceProperties instanceProperties)
line - line to be updatedinstanceProperties - properties to use for the updatepublic Relationship map(L line)
map in interface ILineMapper<L extends Line>map in interface Mapper<Relationship,L extends Line>line - supplied linepublic abstract String getTypeName()
getTypeName in interface Mapper<Relationship,L extends Line>public String getTypeDefGuid()
getTypeDefGuid in interface Mapper<Relationship,L extends Line>protected String getProxy1Guid(L line)
line - for this Lineprotected String getProxy2Guid(L line)
line - for this Lineprotected boolean mapPrimitiveToLine(L line, String propertyName, Object value)
line - the line to be updatedpropertyName - the omrs property namevalue - the omrs primitive property valueprotected boolean mapEnumToLine(L line, String propertyName, EnumPropertyValue enumPropertyValue)
line - the line to be updatedpropertyName - the omrs property nameenumPropertyValue - the omrs enum property valueprotected boolean mapMapToLine(L line, String propertyName, InstanceProperties instancePropertyForMap)
line - the line to be updatedpropertyName - the omrs property nameinstancePropertyForMap - the omrs map property valueprotected void mapLineToInstanceProperties(L line, InstanceProperties instanceProperties)
line - supplied lineinstanceProperties - equivalent instance properties to the LineCopyright © 2018–2020 ODPi. All rights reserved.