package com.gyee.wisdom.dataadapter.domain.thing;

import com.gyee.wisdom.common.data.windturbine.EquipmentModel;
import com.gyee.wisdom.dao.windturbine.IModelDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ModelService {

    @Autowired
    protected IModelDao jpaModelDao;

    public void save(EquipmentModel equipmentModel){
        jpaModelDao.save(equipmentModel);
    }

    public List<EquipmentModel> findAll(){
        return jpaModelDao.findAll();
    }

    public EquipmentModel findById(String id){
        return jpaModelDao.findById(id);
    }

    public void delete(String id){
        jpaModelDao.deletebyid(id);
    }
}
