com.quhaodian.user.data.dao.impl.UserRoleCatalogDaoImpl Maven / Gradle / Ivy
package com.quhaodian.user.data.dao.impl;
import com.quhaodian.data.core.CatalogDaoImpl;
import com.quhaodian.user.data.dao.UserRoleCatalogDao;
import com.quhaodian.user.data.entity.UserRoleCatalog;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
/**
* Created by imake on 2017年08月09日13:36:13.
*/
@Repository
public class UserRoleCatalogDaoImpl extends CatalogDaoImpl implements UserRoleCatalogDao {
@Override
public UserRoleCatalog findById(Integer id) {
if (id == null) {
return null;
}
return get(id);
}
@Override
public UserRoleCatalog save(UserRoleCatalog bean) {
add(bean);
return bean;
}
@Override
public UserRoleCatalog deleteById(Integer id) {
UserRoleCatalog entity = super.get(id);
if (entity != null) {
getSession().delete(entity);
}
return entity;
}
@Override
protected Class getEntityClass() {
return UserRoleCatalog.class;
}
@Autowired
public void setSuperSessionFactory(SessionFactory sessionFactory) {
super.setSessionFactory(sessionFactory);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy