About: AutoDAO is Java DAO on steroids

AutoDAO goal is to make creation of Java DAO classes as simple as possible.

You design DAO interface, write necessary HQL, mark it with annotations and you are done. There is no need to write unnecessary code or complex XML configuration. One line in Spring config file and you are ready to use your DAO interfaces through injection.

public interface BookDao {
  @Finder(query="from Book where title = ?")
  Book getByTitle(String title);

  @Finder(query="from Book where title like :titlePart and author = :author")
  List<Book> findByAuthorAndTitlePart(@Named("titlePart") String titlePart, @Named("author") String author);

Main features

  • Zero persistence code for common DAO queries
  • Annotation-driven zero-configuration with DAO interfaces auto-discovery
  • Hibernate 3 and 4 support
  • JPA 2.0 support
  • Native SQL queries
  • Ready to use compile-time checked CRUD operations
  • Paging, Named parameters, Named queries and HQL-validation support to make usage of complex HQL simpler
  • Custom parameter types, Joda-time support, transactions and other nifty things just to make your life even more fun


Read Quickstart or User Guide.

How to get

Maven 2

AutoDAO is available from central Maven repository:


Non-Maven users

Use download section.

Latest snapshots

AutoDAO snapshots are available via Maven snapshot repository.


Support for AutoDAO project is provided via mailing lists

Found bug/have a patch/want a feature

Please file issues to AutoDAO issue tracker

Idea behind a project

This project was inspired by Don't repeat the DAO! article by Per Mellqvist.