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

com.quhaodian.activiti.data.dao.impl.ActivityCatalogDaoImpl Maven / Gradle / Ivy

There is a newer version: 1.8.1
Show newest version
package com.quhaodian.activiti.data.dao.impl;

import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.quhaodian.activiti.data.dao.ActivityCatalogDao;
import com.quhaodian.activiti.data.entity.ActivityCatalog;
import com.quhaodian.data.core.CatalogDaoImpl;

/**
* Created by imake on 2017年08月15日09:57:56.
*/
@Repository

public class ActivityCatalogDaoImpl extends CatalogDaoImpl implements ActivityCatalogDao {

	@Override
	public ActivityCatalog findById(Integer id) {
	    if (id==null) {
			return null;
		}
		return get(id);
	}

	@Override
	public ActivityCatalog save(ActivityCatalog bean) {

		add(bean);
		
		
		return bean;
	}

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy