Package com.jeecms.core.dao.impl

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

package com.jeecms.core.dao.impl;

import org.springframework.stereotype.Repository;

import com.jeecms.common.hibernate3.HibernateBaseDao;
import com.jeecms.core.dao.DbFileDao;
import com.jeecms.core.entity.DbFile;

@Repository
public class DbFileDaoImpl extends HibernateBaseDao<DbFile, String> implements
    DbFileDao {
  public DbFile findById(String id) {
    DbFile entity = get(id);
    return entity;
  }

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

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

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

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

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.