Search in sources :

Example 1 with MaintenanceEventType

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;
}
Also used : MaintenanceEventVO(com.serotonin.m2m2.maintenanceEvents.MaintenanceEventVO) MaintenanceEventType(com.serotonin.m2m2.maintenanceEvents.MaintenanceEventType)

Aggregations

MaintenanceEventType (com.serotonin.m2m2.maintenanceEvents.MaintenanceEventType)1 MaintenanceEventVO (com.serotonin.m2m2.maintenanceEvents.MaintenanceEventVO)1