Parleys.com Search Index

Home | Devoxx | Devoxx'09
Title: Easing JPA data access with Hades

Summary:
The talk introduces the OpenSource library Hades that significantly eases implementing data access layers with JPA. Thus it will take the audience on a guided tour through code samples introducing the features of Hades:

Description:
The talk introduces the OpenSource library Hades that significantly eases implementing data access layers with JPA. Thus it will take the audience on a guided tour through code samples introducing the features of Hades: * Executing queries by only declaring interface methods * Extending the EntityManager to provide a typed interface, programmatic pagination and sort support * Combining execution of finder methods with pagination * Auditing of entities to keep track of creation and modification date and user * Integration of custom data access code * Integration into Spring applications via Spring namespace and Spring IDE extension

Speaker(s): Oliver Gierke

Keyword(s): JPA hades devoxx 2009 TIA

Slide Content:
1) Oliver Gierke - Synyx GmbH & Co. KG Hades „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 olivergierke www.devoxx.com ■
3) Java Persistence API
4)
5) CRUD GenericDao GenericJpaDao www.devoxx.com
6) Demo I www.devoxx.com
7) Query methods
8) 1. Create interface 2. Declare methods 3. Tune queries www.devoxx.com
9) CRUD GenericDao GenericJpaDao www.devoxx.com
10) CRUD GenericDao GenericJpaDao www.devoxx.com
11) CRUD GenericDao Query methods UserDao GenericJpaDao www.devoxx.com GenericDaoFactory / GenericDaoFactoryBean
12) User findByUsername( String username); Derive
13) @NamedQuery (name=“User.findByLastname“ query=“...“) List findByLastname(...); Named Query
14) @Query(„from User u where ...“) List findByLastname(...); @Query
15) Demo II www.devoxx.com
16) Pagination Sorting
17) @Query(„from User u where u.lastname = ?“) Page findByLastname( String lastname, Pageable pageable);
18) @Param(„name“)
19) @Query(„from User u where u.lastname = ?“) Page findByLastname( String lastname, Pageable pageable);
20) @Query(„from User u where u.lastname = :lastname or u.firstname = :firstname“) List findByLastOrFirstname( @Param(„lastname“) String lname, @Param(„firstname“) String fname)
21) @Modifying
22) @Modifying @Query(„...“) int undefaultAllBut(Role role);
23) Spring integration
24)
25) Spring IDE Plugin
26) Custom DAO code
27) CRUD GenericDao Query methods UserDao Custom implementation UserDaoCustom GenericJpaDao UserDaoImpl www.devoxx.com GenericDaoFactory / GenericDaoFactoryBean
28) CRUD GenericDao Query methods UserDao Custom implementation UserDaoCustom GenericJpaDao UserDaoImpl www.devoxx.com GenericDaoFactory / GenericDaoFactoryBean
29) Additional support
30) Auditing
31) Created? Modified? Who? When?
32) Domain base classes
33) WTF Questions?
(c) Parleys.com NV, 2006-2010 - Technical Info