Using generic methods for basic crud operations Regarding re-usability, is this OK?  What might go wrong?  What would be a better design?  Performance-related issues and any other comments are welcome.

package sample.library.dao.util;

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

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.hibernate3.HibernateTemplate;
import org.springframework.transaction.annotation.Transactional;

/** 
 * @author mulean
 *
 */
 @Transactional(value = "transactionManager", timeout = 30,  
 rollbackFor = java.lang.Exception.class)
 public class DAOUtil {

@Autowired
HibernateTemplate template; 

public  &lt;T&gt; T updateData(T t){
    template.update(t);
    return t;
}
public  &lt;T&gt; T delete(T t){
    template.delete(t);
    return t;
}

public  &lt;T&gt; Boolean save(T t){
    boolean success = false;
    try{
        template.saveOrUpdate(t);
        success = true;
    }catch(Exception e){
        success = false;
        return success;
    }
        return success;
}
@SuppressWarnings("unchecked")
public  &lt;T&gt; List&lt;T&gt; listData(String className){
    List&lt;T&gt; items = null;
    items = template.find("from "+className.toUpperCase());
    return items;
}
}
What about having generic abstract dao class which will contain these methods? You will most likely have to create some concrete dao classes anyway to have specific methods. 
We are using this approach in our projects (behind JPA facade)

public abstract class AbstractJpaDao&lt;T extends AbstractEntity&gt; implements GenericDao&lt;T&gt; {

    @PersistenceContext
    protected EntityManager entityManager;

    protected final Class&lt;T&gt; entityClass;

    public AbstractJpaDao(Class&lt;T&gt; entityClass) {
        this.entityClass = entityClass;
    }

    @Override
    public T get(Serializable id) {
        Assert.notNull(id, "Entity ID cannot be null");
        return entityManager.find(entityClass, id);
    }

    @Override
    public List&lt;T&gt; findAll() {
        CriteriaBuilder builder = entityManager.getCriteriaBuilder();
        CriteriaQuery&lt;T&gt; query = builder.createQuery(entityClass);
        Root&lt;T&gt; root = query.from(entityClass);
        query.select(root);
        return entityManager.createQuery(query).getResultList();
    }


EDIT
Also do not put @Transactional on your DAO classes but on Services. Service method describes unit of work which should be done whole or rollbacked.
Consider this simple code

public void save() {
 dao1.delete(entity1);
 dao2.delete(entity2);
}


When second dao fails to delete and you have transactional daos not service, the first entity is lost.

And you save method should not return boolean, but let bubble the exception up into the service layer and let service handle the exception.