@Transactional public class UserRoleDAO extends Object
User| 构造器和说明 |
|---|
UserRoleDAO() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
delete(UserRole persistentInstance) |
List |
findAll() |
List<UserRole> |
findByExample(UserRole instance) |
UserRole |
findById(Integer id) |
List |
findByProperty(String propertyName,
Object value) |
List<UserRole> |
findByUserId(Object userid) |
List<Role> |
findRoleByUserId(Integer userid)
根据用户id,得到用户有哪些角色
|
static UserRoleDAO |
getFromApplicationContext(org.springframework.context.ApplicationContext ctx) |
void |
save(UserRole transientInstance) |
void |
setSessionFactory(org.hibernate.SessionFactory sessionFactory) |
public void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
public void save(UserRole transientInstance)
public void delete(UserRole persistentInstance)
public List<Role> findRoleByUserId(Integer userid)
userId - public List findAll()
public static UserRoleDAO getFromApplicationContext(org.springframework.context.ApplicationContext ctx)