com.haoxuer.discover.article.data.dao.impl.SensitiveWordDaoImpl Maven / Gradle / Ivy
package com.haoxuer.discover.article.data.dao.impl;
import com.haoxuer.discover.article.data.dao.SensitiveWordDao;
import com.haoxuer.discover.article.data.entity.SensitiveWord;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import com.haoxuer.discover.data.core.CriteriaDaoImpl;
/**
* Created by imake on 2017年08月15日09:52:13.
*/
@Repository
public class SensitiveWordDaoImpl extends CriteriaDaoImpl implements SensitiveWordDao {
@Override
public SensitiveWord findById(Long id) {
if (id==null) {
return null;
}
return get(id);
}
@Override
public SensitiveWord save(SensitiveWord bean) {
getSession().save(bean);
return bean;
}
@Override
public SensitiveWord deleteById(Long id) {
SensitiveWord entity = super.get(id);
if (entity != null) {
getSession().delete(entity);
}
return entity;
}
@Override
protected Class getEntityClass() {
return SensitiveWord.class;
}
@Autowired
public void setSuperSessionFactory(SessionFactory sessionFactory){
super.setSessionFactory(sessionFactory);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy