![JAR search and dependency download from the Maven repository](/logo.png)
com.quhaodian.article.data.dao.impl.ArticleCommentDaoImpl Maven / Gradle / Ivy
The newest version!
package com.quhaodian.article.data.dao.impl;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import com.quhaodian.data.core.CriteriaDaoImpl;
import com.quhaodian.article.data.dao.ArticleCommentDao;
import com.quhaodian.article.data.entity.ArticleComment;
/**
* Created by imake on 2017年08月15日09:52:13.
*/
@Repository
public class ArticleCommentDaoImpl extends CriteriaDaoImpl implements ArticleCommentDao {
@Override
public ArticleComment findById(Long id) {
if (id==null) {
return null;
}
return get(id);
}
@Override
public ArticleComment save(ArticleComment bean) {
getSession().save(bean);
return bean;
}
@Override
public ArticleComment deleteById(Long id) {
ArticleComment entity = super.get(id);
if (entity != null) {
getSession().delete(entity);
}
return entity;
}
@Override
protected Class getEntityClass() {
return ArticleComment.class;
}
@Autowired
public void setSuperSessionFactory(SessionFactory sessionFactory){
super.setSessionFactory(sessionFactory);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy