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