Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DAO for persistence layer

 
Naresh Chaurasia
Ranch Hand
Posts: 361
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
While writing DAO for implementing the persistence layer, are there some core persistence services, that should be implemented by DAO.

Please advise.

Thanks in advance.
 
Arun Kumarr
Ranch Hand
Posts: 661
Eclipse IDE Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
core persistence services

- Please explain and expand what do you mean by core persistence services.
But from what I've understood (and assuming you're not using any ORM) the general services would be,

1. Find rows by primary key.
2. Save a row.
3. Save a bunch of rows.
4. Cascade save rows (typically parent-child entities).
5. Form dynamic sql based on search conditions (search condition can be generic or specific).
6. Update/delete a row based on primary key.
7. Services which would open/close transactions (point-point or distributed).
8. Services which would do logging of DB operations (If you plan to have in your application)
These are some of the things which comes to the top of my mind.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic