Your SlideShare is downloading. ×
  • Like

Loading…

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Generic DAOs With Hades

  • 3,519 views
Published

Slides from the talk on the open source project Hades - http://hades.synyx.org

Slides from the talk on the open source project Hades - http://hades.synyx.org

Published in Technology , Education
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
3,519
On SlideShare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
60
Comments
0
Likes
3

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Hades Oliver Gierke - Synyx GmbH & Co. KG „Simple things should be simple, complex things should be possible.“ Alan Kay
  • 2. Speaker ■ Oliver Gierke - gierke@synyx.de ■ Software Architect @ Synyx GmbH & Co. KG ■ JavaEE, Spring (beyond the obvious) ■ Financial industry, automotive ■ Hades project lead www.devoxx.com ■ olivergierke
  • 3. Java Persistence API
  • 4. CRUD GenericDao GenericJpaDao www.devoxx.com
  • 5. Demo I www.devoxx.com
  • 6. Query methods
  • 7. 1. Create interface 2. Declare methods 3. Tune queries www.devoxx.com
  • 8. CRUD Query methods GenericDao UserDao GenericJpaDao GenericDaoFactory / GenericDaoFactoryBean www.devoxx.com
  • 9. User findByUsername( String username); Derive
  • 10. @NamedQuery (name=“User.findByLastname“ query=“...“) List<User> findByLastname(...); Named Query
  • 11. @Query(„from User u where ...“) List<User> findByLastname(...); @Query
  • 12. Demo II www.devoxx.com
  • 13. Pagination Sorting
  • 14. @Query(„from User u where u.lastname = ?“) Page<User> findByLastname( String lastname, Pageable pageable);
  • 15. @Param(„name“)
  • 16. @Query(„from User u where u.lastname = :lastname or u.firstname = :firstname“) List<User> findByLastOrFirstname( @Param(„lastname“) String lname, @Param(„firstname“) String fname)
  • 17. @Modifying
  • 18. @Modifying @Query(„...“) int undefaultAllBut(Role role);
  • 19. Spring integration
  • 20. <hades:dao-config base-package=“foo.**.dao“ />
  • 21. Spring IDE Plugin
  • 22. Custom DAO code
  • 23. Custom CRUD Query methods implementation GenericDao UserDao UserDaoCustom GenericJpaDao UserDaoImpl GenericDaoFactory / GenericDaoFactoryBean www.devoxx.com
  • 24. Demo III www.devoxx.com
  • 25. Additional support
  • 26. Auditing
  • 27. Created? Modified? Who? When?
  • 28. Domain base classes
  • 29. WTF Questions?
  • 30. Meta stuff ■ Current version: 1.0 (stable 1.1-snapshot) ■ Apache license 2.0 ■ http://hades.synyx.org www.devoxx.com