Open Sourcing Brahma-DAO: A typesafe DAO generator for Hibernate

Aashrai Ravooru
GoZefo Engineering
Published in
2 min readSep 27, 2018

--

At Gozefo we are big users of Hibernate, most of our e-commerce level data is stored in MySQL and Hibernate provides a decent set of APIs like Entity classes, Abstract DAO’s, validation annotations etc which let us move very fast in our development.

That said most of our interactions with our tables in hibernate is via simple CRUD queries and Hibernate’s extremely verbose Criteria API for queries has become very repetitive for us and has lead to a lot of boilerplate in our semi-monolith sized projects. Editing a pre-written DAO especially the search method had become an unnecessarily tedious task for us, so we decided to optimize the time we spent writing and editing our DAO’s.

Introducing Brahma-DAO an open source library which uses annotation processing to generate a DAO class with support for all CRUD operations that we so regularly require. Creating a DAO for an Entity class is now as simple as using an annotation@GenerateDao.

Brahma-DAO is 100% open source and we welcome all kinds of pull requests and help with the docs.

If you love programming and destroying java boilerplate Gozefo Engineering is hiring!!.

--

--