public abstract class LineMapper extends Object implements ILineMapper
| 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(Line line)
Get proxy 1 guid
|
protected String |
getProxy2Guid(Line line)
Get proxy 2 guid
|
protected String |
getRelationshipTypeDefGuid(Relationship relationship)
get the relationshipTypeDef Guid
This method should be overridden to provide the appropriate guid for the type.
|
protected boolean |
mapEnumToLine(Line line,
String propertyName,
EnumPropertyValue enumPropertyValue)
Map an omrs enum property to a Subject Area Line property.
|
protected void |
mapInstancePropertiesToLine(Line 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(Line line,
InstanceProperties instanceProperties)
Map the supplied Line to omrs InstanceProperties.
|
Relationship |
mapLineToRelationship(Line line)
Map Line to the omrs relationship equivalent
|
protected boolean |
mapMapToLine(Line line,
String propertyName,
InstanceProperties instancePropertyForMap)
Map an omrs map property to a Subject Area Line property.
|
protected boolean |
mapPrimitiveToLine(Line line,
String propertyName,
Object value)
Map an omrs primitive property to a Subject Area Line property.
|
Line |
mapRelationshipToLine(Relationship relationship)
Map from an OMRS Relationship to a Subject Area OMAS Line
|
protected abstract void |
setEnd1GuidInLine(Line 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(Line line,
String guid)
Pass the guid of the EntityProxy for end 2 to the Line ,so it can store it appropriately
|
protected void |
throwWrongTypeException(Relationship relationship,
String methodName,
String type)
relationship is not of the right type.
|
protected final OMRSAPIHelper omrsapiHelper
protected final OMRSRepositoryHelper repositoryHelper
public LineMapper(OMRSAPIHelper omrsapiHelper)
public Line mapRelationshipToLine(Relationship relationship)
ILineMappermapRelationshipToLine in interface ILineMapperrelationship - OMRS Linesprotected abstract void setEnd1GuidInLine(Line line, String guid)
line - line to updateguid - guid to add into the Lineprotected abstract void setEnd2GuidInLine(Line line, String guid)
line - line to updateguid - guid to add into the Lineprotected void mapInstancePropertiesToLine(Line line, InstanceProperties instanceProperties)
line - line to be updatedinstanceProperties - properties to use for the updatepublic Relationship mapLineToRelationship(Line line)
mapLineToRelationship in interface ILineMapperline - supplied lineprotected String getRelationshipTypeDefGuid(Relationship relationship)
relationship - to get the guid fromprotected String getProxy1Guid(Line line)
line - for this Lineprotected String getProxy2Guid(Line line)
line - for this Lineprotected boolean mapPrimitiveToLine(Line line, String propertyName, Object value)
line - the line to be updatedpropertyName - the omrs property namevalue - the omrs primitive property valueprotected boolean mapEnumToLine(Line line, String propertyName, EnumPropertyValue enumPropertyValue)
line - the line to be updatedpropertyName - the omrs property nameenumPropertyValue - the omrs enum property valueprotected boolean mapMapToLine(Line line, String propertyName, InstanceProperties instancePropertyForMap)
line - the line to be updatedpropertyName - the omrs property nameinstancePropertyForMap - the omrs map property valueprotected void mapLineToInstanceProperties(Line line, InstanceProperties instanceProperties)
line - supplied lineinstanceProperties - equivalent instance properties to the Lineprotected void throwWrongTypeException(Relationship relationship, String methodName, String type) throws InvalidParameterException
relationship - relationship of wrong typemethodName - method name for dignosticstype - expected typeInvalidParameterException - one of the parameters is null or invalid.Copyright © 2018–2019 ODPi. All rights reserved.