use of com.infiniteautomation.mango.rest.latest.model.dataPoint.DataPointModel in project ma-modules-public by infiniteautomation.
the class DataPointEventTypeModelMapping method map.
@Override
public DataPointEventTypeModel map(Object from, PermissionHolder user, RestModelMapper mapper) {
DataPointEventType type = (DataPointEventType) from;
DataPointVO dp = (DataPointVO) type.getReference1();
DataPointModel dpModel;
if (dp != null) {
dpModel = mapper.map(dp, DataPointModel.class, user);
} else {
dpModel = null;
}
return new DataPointEventTypeModel(type, dpModel);
}
Aggregations