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

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

There is a newer version: 1.8.38
Show newest version
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);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy