A Finder is an object that queries the domain to get lists of domain objects optionally matching some criteria. A Finder queries the domain but returns representations.

Creating a Finder with the Business Framework, consists in:

  • Creating a finder interface,
  • Creating a finder implementation, located in the infrastructure as it depends upon a persistence technology.

Business Framework Finders are POJOs, there is no mandated interface. Just annotate your finder interface with the @Finder annotation.


Create the interface for your finder. A finder is annotated with @Finder and is declared as read only.

public interface CustomerFinder {

    List<CustomerRepresentation> findAllCustomers();



In the infrastructure layer, provide the implementation (here with JPA):

public class CustomerJpaFinder implements CustomerFinder {

    private FluentAssembler assembler;

    public List<CustomerRepresentation> findAllCustomer() {
        CriteriaBuilder cb = entityManager.getCriteriaBuilder();
        CriteriaQuery<Customer> q = cb.createQuery(Customer.class);

        return fluentAssembler