@@ -0,0 +1,1530 @@
+package com.hida.dao;%0A%0Aimport java.io.Serializable;%0Aimport java.lang.reflect.ParameterizedType;%0A%0Aimport org.hibernate.Criteria;%0Aimport org.hibernate.Session;%0Aimport org.hibernate.SessionFactory;%0Aimport org.springframework.beans.factory.annotation.Autowired;%0A%0A/**%0A * missing javadocs%0A *%0A * @author lruffin%0A * @param %3CPK%3E%0A * @param %3CT%3E%0A */%0Apublic abstract class AbstractDao%3CPK extends Serializable, T%3E %7B%0A%0A    /**%0A     *      %0A     */%0A    private final Class%3CT%3E persistentClass;%0A%0A    /**%0A     * %0A     */%0A    @SuppressWarnings(%22unchecked%22)%0A    public AbstractDao() %7B%0A        this.persistentClass = (Class%3CT%3E) ((ParameterizedType) this.getClass().getGenericSuperclass()).getActualTypeArguments()%5B1%5D;%0A    %7D%0A%0A    /**%0A     * %0A     */%0A    @Autowired%0A    private SessionFactory sessionFactory;%0A%0A    /**%0A     * %0A     * @return %0A     */%0A    protected Session getSession() %7B%0A        return sessionFactory.getCurrentSession();%0A    %7D%0A%0A    /**%0A     * %0A     * @param key%0A     * @return %0A     */%0A    @SuppressWarnings(%22unchecked%22)%0A    public T getByKey(PK key) %7B%0A        return (T) getSession().get(persistentClass, key);%0A    %7D%0A%0A    /**%0A     * %0A     * @param entity %0A     */%0A        %0A    public void persist(T entity) %7B%0A        getSession().persist(entity);%0A    %7D%0A%0A    /**%0A     * %0A     * @param entity %0A     */%0A    public void delete(T entity) %7B%0A        getSession().delete(entity);%0A    %7D%0A%0A    /**%0A     * %0A     * @return %0A     */%0A    protected Criteria createEntityCriteria() %7B%0A        return getSession().createCriteria(persistentClass);%0A    %7D%0A%0A%7D%0A

Add AbstractDao to dao