com.quhaodian.web.data.dao.impl.WebConfigDaoImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of discover-website Show documentation
Show all versions of discover-website Show documentation
discover网站配置模块,主要管理网站主题,网站配置等功能
package com.quhaodian.web.data.dao.impl;
import com.quhaodian.data.core.CriteriaDaoImpl;
import com.quhaodian.web.data.dao.WebConfigDao;
import com.quhaodian.web.data.entity.WebConfig;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
/**
* Created by imake on 2017年08月30日09:46:28.
*/
@Repository
public class WebConfigDaoImpl extends CriteriaDaoImpl implements WebConfigDao {
@Override
public WebConfig findById(Long id) {
if (id == null) {
return null;
}
return get(id);
}
@Override
public WebConfig save(WebConfig bean) {
getSession().save(bean);
return bean;
}
@Override
public WebConfig deleteById(Long id) {
WebConfig entity = super.get(id);
if (entity != null) {
getSession().delete(entity);
}
return entity;
}
@Override
protected Class getEntityClass() {
return WebConfig.class;
}
@Autowired
public void setSuperSessionFactory(SessionFactory sessionFactory) {
super.setSessionFactory(sessionFactory);
}
}