package com.pas.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.pas.dao.UserTypeDao;
import com.pas.model.UserType;
import com.pas.service.UserTypeService;

@Service
public class UserTypeServiceImpl implements UserTypeService {
	@Autowired
	private UserTypeDao userTypeDao;	
	
	@Transactional
	public void add(UserType userType) {
		userTypeDao.add(userType);
	}
	
	@Transactional
	public void edit(UserType userType) {
		userTypeDao.edit(userType);
	}
	
	@Transactional
	public void delete(int userTypeId) {
		userTypeDao.delete(userTypeId);
	}
	
	@Transactional
	public UserType getUserType(int userTypeId) {
		return (UserType) userTypeDao.getUserType(userTypeId);
	}
	
	@Transactional
	public List<UserType> getAllUserType() {
		return (List<UserType>) userTypeDao.getAllUserType();
	}
}