/*
 * This file is part of EasyExchange.
 *
 * (c) 2014 - Machiel Molenaar <machiel@machiel.me>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

package com.mtech.easyexchange.dao;

import org.hibernate.Session;
import org.hibernate.criterion.Criterion;

import java.io.Serializable;
import java.util.List;

public interface AbstractDao<T, ID extends Serializable> {

    public Session getCurrentSession();

    public T find(ID id);

    public void save(T entity);

    public void delete(T entity);

    public List<T> findBy(Criterion... criterions);

    public T findOneBy(Criterion... criterions);

}
