Download free for 30 days
Sign in
Upload
Language (EN)
Support
Business
Mobile
Social Media
Marketing
Technology
Art & Photos
Career
Design
Education
Presentations & Public Speaking
Government & Nonprofit
Healthcare
Internet
Law
Leadership & Management
Automotive
Engineering
Software
Recruiting & HR
Retail
Sales
Services
Science
Small Business & Entrepreneurship
Food
Environment
Economy & Finance
Data & Analytics
Investor Relations
Sports
Spiritual
News & Politics
Travel
Self Improvement
Real Estate
Entertainment & Humor
Health & Medicine
Devices & Hardware
Lifestyle
Change Language
Language
English
Español
Português
Français
Deutsche
Cancel
Save
EN
Uploaded by
denis Udod
PPT, PDF
421 views
LatJUG. JPA2 Done Right
Java User Group Latvia February 2011 JPA2 Done Right Denis Udod http://goo.gl/rzD0q
Technology
◦
Read more
0
Save
Share
Embed
Embed presentation
Download
Downloaded 10 times
1
/ 21
2
/ 21
3
/ 21
4
/ 21
5
/ 21
6
/ 21
7
/ 21
8
/ 21
9
/ 21
10
/ 21
11
/ 21
12
/ 21
13
/ 21
14
/ 21
15
/ 21
16
/ 21
17
/ 21
18
/ 21
19
/ 21
20
/ 21
21
/ 21
More Related Content
ODP
Gradle - next generation of build tools
by
Igor Khotin
PPT
Java. Exceptions - how to cook, how to eat.
by
denis Udod
PDF
Premium Club Brochure 2009 2010
by
Michelek8
PPT
Agile latvia evening_unit_testing_in_practice
by
denis Udod
PDF
The Premium Club AT&T SportsDeck
by
Michelek8
PPT
LatJUG. Mar-2011
by
denis Udod
PPT
LatJUG. Complete Idiots Guide2Android
by
denis Udod
PDF
Imagens Vernissage Residence Club
by
Alexandre Quadros
Gradle - next generation of build tools
by
Igor Khotin
Java. Exceptions - how to cook, how to eat.
by
denis Udod
Premium Club Brochure 2009 2010
by
Michelek8
Agile latvia evening_unit_testing_in_practice
by
denis Udod
The Premium Club AT&T SportsDeck
by
Michelek8
LatJUG. Mar-2011
by
denis Udod
LatJUG. Complete Idiots Guide2Android
by
denis Udod
Imagens Vernissage Residence Club
by
Alexandre Quadros
Viewers also liked
PDF
Evidence Qualitylife
by
Alexandre Quadros
PDF
LatJUG. Java Bytecode Fundamentals
by
denis Udod
PDF
Elegance Freguesia
by
Alexandre Quadros
PPTX
LatJUG.Jun-2011
by
denis Udod
PPT
JUG.LV What do you know about Logging?
by
denis Udod
PDF
LatJUG. Spring Roo
by
denis Udod
PDF
The Premium Club 2010
by
Michelek8
KEY
LatJUG. JSF2.0 - The JavaEE6 Standard
by
denis Udod
PPT
LatJUG. Google App Engine
by
denis Udod
PPT
LatJUG Feb-2011
by
denis Udod
Evidence Qualitylife
by
Alexandre Quadros
LatJUG. Java Bytecode Fundamentals
by
denis Udod
Elegance Freguesia
by
Alexandre Quadros
LatJUG.Jun-2011
by
denis Udod
JUG.LV What do you know about Logging?
by
denis Udod
LatJUG. Spring Roo
by
denis Udod
The Premium Club 2010
by
Michelek8
LatJUG. JSF2.0 - The JavaEE6 Standard
by
denis Udod
LatJUG. Google App Engine
by
denis Udod
LatJUG Feb-2011
by
denis Udod
LatJUG. JPA2 Done Right
1.
JPA2 Done Right
2.
Easy JPA2 JPA2.0
+ Hibernate3.6 + HSQLDB2.0 + Maven3
3.
Easy JPA2 JPA2.0
+ Hibernate3.6 + HSQLDB2.0 + Maven3 Create project mvn archetype:generate …
4.
Easy JPA2 JPA2.0
+ Hibernate3.6 + HSQLDB2.0 + Maven3 Create project mvn archetype:generate … Edit pom.xml Add repository jboss Add dependency hibernate-core hibernate-entitymanager hsqldb
5.
Easy JPA2 JPA2.0
+ Hibernate3.6 + HSQLDB2.0 + Maven3 Ready to import into IDE
6.
Easy JPA2 persistence.xml
<?xml version="1.0" encoding="UTF-8"?> <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd" version="2.0"> <persistence-unit name="org.hibernate.jpa"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <class>lv.jug.jpa.CustomerEntity</class> <properties> <property name="hibernate.connection.url" value="jdbc:hsqldb:./.db/testfiles"/> <property name="hibernate.connection.driver_class" value="org.hsqldb.jdbc.JDBCDriver"/> <property name="hibernate.connection.username" value="SA"/> <property name="hibernate.connection.password" value=""/> <property name="hibernate.archive.autodetection" value="class"/> <property name="hibernate.show_sql" value="true"/> <property name="hibernate.format_sql" value="true"/> <property name="hbm2ddl.auto" value="update"/> </properties> </persistence-unit> </persistence>
7.
Easy JPA2 persistence.xml
<?xml version="1.0" encoding="UTF-8"?> <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd" version="2.0"> <persistence-unit name="org.hibernate.jpa"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <class>lv.jug.jpa.CustomerEntity</class> <properties> <property name="hibernate.connection.url" value="jdbc:hsqldb:./.db/testfiles"/> <property name="hibernate.connection.driver_class" value="org.hsqldb.jdbc.JDBCDriver"/> <property name="hibernate.connection.username" value="SA"/> <property name="hibernate.connection.password" value=""/> <property name="hibernate.archive.autodetection" value="class"/> <property name="hibernate.show_sql" value="true"/> <property name="hibernate.format_sql" value="true"/> <property name="hbm2ddl.auto" value="update"/> </properties> </persistence-unit> </persistence>
8.
Easy JPA2 CustomerEntity
9.
Easy JPA2 И
вс e
10.
Easy JPA2 ?
И все же не все ?
11.
Easy JPA2? Попробуем
что нас получилось...
12.
Easy JPA2 Идея:
Для каждого Entity надо DAO
13.
Easy JPA2
? Идея: Для каждого Entity надо DAO
14.
Not Easy JPA2
? Не хватит и 2-х экранов
15.
Not Easy JPA2
? Опять много кода
16.
Done Right JPA2.0
+ Hiernate3.6 + HSQLDB2.0 + Maven3 + Hades http://redmine.synyx.org/projects/hades
17.
Done Right JPA2.0
+ Hiernate3.6 + HSQLDB2.0 + Maven3 + Hades http://redmine.synyx.org/projects/hades Edit pom.xml Add dependency org.synyx.hades
18.
Done Right Создадим
новое “hades-style” DAO
19.
Easy JPA2 И
вс e
20.
Easy JPA2 И
вс e не нужно больше плодить «одинаковый код» Все DAO стало декларативным
21.
Easy JPA2 Hades
http://hades.synys.org Apache license 2.0
Download