Package com.jeecms.core.dao.impl

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

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.FtpDao;
import com.jeecms.core.entity.Ftp;

@Repository
public class FtpDaoImpl extends HibernateBaseDao<Ftp, Integer> implements
    FtpDao {
  @SuppressWarnings("unchecked")
  public List<Ftp> getList() {
    String hql = "from Ftp bean";
    return find(hql);
  }

  public Ftp findById(Integer id) {
    Ftp entity = get(id);
    return entity;
  }

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

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

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

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

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.