UserManagerImpl

package com.huaweisymantec.rmc.core.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.huaweisymantec.rmc.core.dao.UserDao;
import com.huaweisymantec.rmc.core.dao.impl.UserDaoImpl;
import com.huaweisymantec.rmc.core.domain.User;
import com.huaweisymantec.rmc.core.service.UserManager;
import com.huaweisymantec.rmc.core.utils.GenericDao;
@Component("um")
public class UserManagerImpl implements UserManager {

public UserDao ud;
public void addUser(User u) {
ud.saveUser(u);

}
public UserDao getUd() {
return ud;
}
@Resource
public void setUd(UserDao ud) {
this.ud = ud;
}
public boolean isExist(String username) {
return ud.checkUserExistByName(username);
}

public User getUser(String username) {
return  ud.getUserByName(username);
}
public void updateUser(User user) {
ud.updateUser(user);

}
public void delUser(User user) {
ud.delUser(user);

}


}

你可能感兴趣的:(DAO)