The idea is to create crud-repository with rigid and predictable contract without ORM and JPA.
Also if you ever think to migrate from hibernate repositories to plain jdbc repositories
you'll probably find it useful.
It mimics findOne
, findAll
, save
and other operations in order to
make the transition easier.
This library is supposed to work with Postgres database.
- Create entity with
@Table
annotation - Define
@Id
and@Column
for every corresponding field - If your table uses sequence for id generation - declare
DeferredId<T>
field with@DbSideId
annotation - Create instance of
StandardOperations
class inside your dao / repository - Enjoy
For more information and examples please take a look into test folder.