Package com.jeecms.core.dao.impl

Source Code of com.jeecms.core.dao.impl.ConfigDaoImpl

package com.jeecms.core.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.jeecms.common.hibernate3.HibernateBaseDao;
import com.jeecms.core.dao.ConfigDao;
import com.jeecms.core.entity.Config;

@Repository
public class ConfigDaoImpl extends HibernateBaseDao<Config, String> implements
    ConfigDao {
  @SuppressWarnings("unchecked")
  public List<Config> getList() {
    String hql = "from Config";
    return find(hql);
  }

  public Config findById(String id) {
    Config entity = get(id);
    return entity;
  }

  public Config save(Config bean) {
    getSession().save(bean);
    return bean;
  }

  public Config deleteById(String id) {
    Config entity = super.get(id);
    if (entity != null) {
      getSession().delete(entity);
    }
    return entity;
  }

  @Override
  protected Class<Config> getEntityClass() {
    return Config.class;
  }
}
TOP

Related Classes of com.jeecms.core.dao.impl.ConfigDaoImpl

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.