use of com.serotonin.m2m2.maintenanceEvents.MaintenanceEventType in project ma-modules-public by infiniteautomation.
the class MaintenanceEventTypeModelMapping method map.
@Override
public MaintenanceEventTypeModel map(Object o, PermissionHolder user, RestModelMapper mapper) {
MaintenanceEventType type = (MaintenanceEventType) o;
MaintenanceEventVO vo = MaintenanceEventDao.getInstance().get(type.getReferenceId1());
MaintenanceEventTypeModel model;
if (vo != null)
model = new MaintenanceEventTypeModel(type, new MaintenanceEventModel(vo));
else
model = new MaintenanceEventTypeModel(type);
return model;
}
Aggregations