All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.quhaodian.web.data.dao.impl.WebThemeDaoImpl Maven / Gradle / Ivy

There is a newer version: 1.8.38
Show newest version
package com.quhaodian.web.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.web.data.dao.WebThemeDao;
import com.quhaodian.web.data.entity.WebTheme;

/**
* Created by imake on 2017年08月30日10:16:29.
*/
@Repository

public class WebThemeDaoImpl extends CriteriaDaoImpl implements WebThemeDao {

	@Override
	public WebTheme findById(String id) {
	    if (id==null) {
			return null;
		}
		return get(id);
	}

	@Override
	public WebTheme save(WebTheme bean) {

        getSession().save(bean);
		
		
		return bean;
	}

    @Override
	public WebTheme deleteById(String id) {
		WebTheme entity = super.get(id);
		if (entity != null) {
			getSession().delete(entity);
		}
		return entity;
	}
	
	@Override
	protected Class getEntityClass() {
		return WebTheme.class;
	}
	
	@Autowired
	public void setSuperSessionFactory(SessionFactory sessionFactory){
	    super.setSessionFactory(sessionFactory);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy