package com.xintong.visualinspection.service.impl;

import java.util.List;

import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xintong.visualinspection.bean.Constant;
import com.xintong.visualinspection.dao.master.ConstantDao;
import com.xintong.visualinspection.service.BaseService;
import com.xintong.visualinspection.service.ConstantService;

/**
 * 文件名：UserServiceImpl
 * 版本信息：日期：2017/3/30 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
 */
@Service
public class ConstantServiceImpl extends BaseService implements ConstantService {

    private static final org.slf4j.Logger logger = LoggerFactory.getLogger(ConstantServiceImpl.class);


    @Autowired
    private ConstantDao constantDao;


	public List<Constant> getAll() {
		// TODO Auto-generated method stub
		return constantDao.getAll();
	}


	public Constant getById(Long id) {
		// TODO Auto-generated method stub
		return constantDao.getOne(id);
	}


	public List<Constant> getByFlag(String flag) {
		// TODO Auto-generated method stub
		return constantDao.getByFlag(flag);
	}


	public Constant getByFlagAndValue(Constant constant) {
		// TODO Auto-generated method stub
		return constantDao.getByFlagAndValue(constant);
	}


	public void insert(Constant constant) {
		// TODO Auto-generated method stub
		constantDao.insert(constant);
	}


	public void update(Constant constant) {
		// TODO Auto-generated method stub
		constantDao.update(constant);
	}


	public void delete(Long id) {
		// TODO Auto-generated method stub
		constantDao.delete(id);
	}


	@Override
	public List<Constant> getByName(String flagName) {
		// TODO Auto-generated method stub
		return constantDao.getByName(flagName);
	}
    
}
