Java + Spring + hibernate : Dao implementation that is about to change in the future -


i'm developing web server spring 3 , hibernate 4.

in server have following interfaces:

  1. genericdao
  2. userdao extends genericdao
  3. productdao extends genericdao
  4. ... more daos here

and 3 implementations:

  1. hibernategenericdaoimpl
  2. hibernateuserdaoimpl
  3. hibernateproductdaoimpl
  4. ....more hibernate daos impl here

in future considering highly migrate no-sql db (maybe couchdb). questions is:

"since no-sql has nothing orm, need replace daos impl in project?! (there alot) isn't there more generic way?"

thanks!

what using jparepository : @ http://www.springsource.org/spring-data/jpa

crudrepository usefull , save lot of time. @ jpa-spring documentation define sub-interface of crudrepository store entity class objects. crudrepository define crud service , can add in interface method "findticketbyexpiredatebefore(date date)" spring use naming convention build implentation of requete if requete more complexe can use @query annotation write it


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -