Package com.vst.service.impl

Source Code of com.vst.service.impl.EquipmentInspectionManagerImpl

package com.vst.service.impl;

import com.vst.dao.EquipmentInspectionDao;
import com.vst.model.EquipmentInspection;
import com.vst.service.EquipmentInspectionManager;

import java.util.List;

/**
* Created by IntelliJ IDEA.
* User: Администратор
* Date: 07.07.2009
* Time: 14:28:53
* To change this template use File | Settings | File Templates.
*/
public class EquipmentInspectionManagerImpl extends BaseManager implements EquipmentInspectionManager {

    EquipmentInspectionDao equipmentInspectionDao;

    public void setEquipmentInspectionDao(EquipmentInspectionDao equipmentInspectionDao) {
        this.equipmentInspectionDao = equipmentInspectionDao;
    }

    public void delete(EquipmentInspection equipmentInspection) {
        equipmentInspectionDao.delete(equipmentInspection);
    }

    public void saveEquipmentInspection(EquipmentInspection equipmentInspection) {
       equipmentInspectionDao.insert(equipmentInspection);
    }

    public void update(EquipmentInspection equipmentInspection) {
        equipmentInspectionDao.update(equipmentInspection);
    }

    public EquipmentInspection getById(Integer id) {
        return equipmentInspectionDao.getById(id);
    }

    public List getList() {
        return equipmentInspectionDao.getList();
    }

    public boolean exist(EquipmentInspection equipmentInspection) {
        List list=equipmentInspectionDao.getList();
        for (int i=0; i<list.size(); i++){
            EquipmentInspection equipment=(EquipmentInspection)list.get(i);
            if (equipment.getType().equals(equipmentInspection.getType()) && equipment.getMark().equals(equipmentInspection.getMark())){
                return true;
            }
        }
        return false;
    }

    public List getList(Integer page) {
        return equipmentInspectionDao.getList(page);
    }
}
TOP

Related Classes of com.vst.service.impl.EquipmentInspectionManagerImpl

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.