Class DaoHelper<TT,KT>

java.lang.Object
com.flowlogix.jeedao.DaoHelper<TT,KT>
Type Parameters:
TT - Entity Type
KT - Primary Key Type

public final class DaoHelper<TT,KT> extends Object
Lightweight wrapper around common JPA methods This is the primary class in the com.flowlogix.jeedao package

Main value-add is ability to easily add hints and query criteria to findAll() and findRange(int, int) methods, as well as count() methods

Another differentiator is that this class doesn't require inheritance, although some use cases could inherit from InheritableDaoHelper class.

Simple Example:

@Stateless
public class ExampleDAO {
    @PersistenceContext
    EntityManager em;
    @Delegate
    DaoHelper<UserEntity, Long> helper = new DaoHelper<>(() -> em, UserEntity.class);
}
Author:
lprimak