Skip to content
This repository was archived by the owner on Apr 6, 2018. It is now read-only.

Commit 09d2f72

Browse files
committed
* First implementation of a spring based generic JPA dao as well as simplified spring configuration
* Implementation is based on code published by Eberhard Wolff in JavaMagazin git-svn-id: svn+ssh://svn.synyx.de/var/svn/synyx/spring-jpa-dao@186 5a64d73e-33d6-4ccc-9058-23f8668ecac9
1 parent 0c4e075 commit 09d2f72

35 files changed

+1328
-0
lines changed

trunk/.classpath

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>
4+
<classpathentry kind="src" path="src/main/java"/>
5+
<classpathentry kind="src" path="src/test/java"/>
6+
<classpathentry excluding="**" kind="src" output="src/main/resources" path="src/main/resources"/>
7+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
8+
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
9+
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
10+
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
11+
<classpathentry kind="output" path="target/classes"/>
12+
</classpath>

trunk/.project

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>spring-jpa-dao</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.maven.ide.eclipse.maven2Builder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>org.eclipse.jdt.core.javabuilder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
<buildCommand>
19+
<name>org.eclipse.wst.common.project.facet.core.builder</name>
20+
<arguments>
21+
</arguments>
22+
</buildCommand>
23+
<buildCommand>
24+
<name>org.eclipse.wst.validation.validationbuilder</name>
25+
<arguments>
26+
</arguments>
27+
</buildCommand>
28+
<buildCommand>
29+
<name>org.springframework.ide.eclipse.core.springbuilder</name>
30+
<arguments>
31+
</arguments>
32+
</buildCommand>
33+
</buildSpec>
34+
<natures>
35+
<nature>org.springframework.ide.eclipse.core.springnature</nature>
36+
<nature>org.eclipse.jdt.core.javanature</nature>
37+
<nature>org.maven.ide.eclipse.maven2Nature</nature>
38+
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
39+
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
40+
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
41+
</natures>
42+
</projectDescription>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#Wed Jan 16 16:11:27 CET 2008
2+
eclipse.preferences.version=1
3+
internal.default.compliance=default
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#Tue Jan 15 18:06:07 CET 2008
2+
eclipse.preferences.version=1
3+
org.eclipse.jpt.core.discoverAnnotatedClasses=true
4+
org.eclipse.jpt.core.platform=generic
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#Mon Jan 14 20:28:08 CET 2008
2+
classpath.helper/org.eclipse.jdt.launching.JRE_CONTAINER\:\:org.eclipse.jdt.internal.launching.macosx.MacOSXType\:\:JVM\ 1.5.0\ (MacOS\ X\ Default)/owners=jst.java\:5.0
3+
eclipse.preferences.version=1
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project-modules id="moduleCoreId" project-version="1.5.0">
3+
<wb-module deploy-name="spring-jpa-dao">
4+
<wb-resource deploy-path="/" source-path="/src/main/webapp"/>
5+
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
6+
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/test/java"/>
7+
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
8+
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/test/resources"/>
9+
<property name="java-output-path" value="build/classes"/>
10+
<property name="context-root" value="spring-jpa-dao"/>
11+
</wb-module>
12+
</project-modules>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<faceted-project>
3+
<fixed facet="jst.java"/>
4+
<fixed facet="jst.web"/>
5+
<installed facet="jst.java" version="5.0"/>
6+
<installed facet="jst.web" version="2.4"/>
7+
<installed facet="jpt.jpa" version="1.0"/>
8+
</faceted-project>
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#Wed Jan 16 14:55:11 CET 2008
2+
eclipse.preferences.version=1
3+
org.springframework.ide.eclipse.core.builders.enable.aopreferencemodelbuilder=true
4+
org.springframework.ide.eclipse.core.validator.enable.org.springframework.ide.eclipse.beans.core.beansvalidator=true
5+
org.springframework.ide.eclipse.core.validator.enable.org.springframework.ide.eclipse.webflow.core.validator=true
6+
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanAlias-org.springframework.ide.eclipse.beans.core.beansvalidator=true
7+
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanClass-org.springframework.ide.eclipse.beans.core.beansvalidator=true
8+
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanConstructorArgument-org.springframework.ide.eclipse.beans.core.beansvalidator=true
9+
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanDefinition-org.springframework.ide.eclipse.beans.core.beansvalidator=true
10+
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanDefinitionHolder-org.springframework.ide.eclipse.beans.core.beansvalidator=true
11+
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanFactory-org.springframework.ide.eclipse.beans.core.beansvalidator=true
12+
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanInitDestroyMethod-org.springframework.ide.eclipse.beans.core.beansvalidator=true
13+
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanProperty-org.springframework.ide.eclipse.beans.core.beansvalidator=true
14+
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanReference-org.springframework.ide.eclipse.beans.core.beansvalidator=true
15+
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.requiredProperty-org.springframework.ide.eclipse.beans.core.beansvalidator=true
16+
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.action-org.springframework.ide.eclipse.webflow.core.validator=true
17+
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.actionstate-org.springframework.ide.eclipse.webflow.core.validator=true
18+
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.attribute-org.springframework.ide.eclipse.webflow.core.validator=true
19+
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.attributemapper-org.springframework.ide.eclipse.webflow.core.validator=true
20+
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.beanaction-org.springframework.ide.eclipse.webflow.core.validator=true
21+
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.evaluationaction-org.springframework.ide.eclipse.webflow.core.validator=true
22+
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.evaluationresult-org.springframework.ide.eclipse.webflow.core.validator=true
23+
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.exceptionhandler-org.springframework.ide.eclipse.webflow.core.validator=true
24+
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.import-org.springframework.ide.eclipse.webflow.core.validator=true
25+
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.inputattribute-org.springframework.ide.eclipse.webflow.core.validator=true
26+
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.mapping-org.springframework.ide.eclipse.webflow.core.validator=true
27+
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.outputattribute-org.springframework.ide.eclipse.webflow.core.validator=true
28+
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.set-org.springframework.ide.eclipse.webflow.core.validator=true
29+
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.state-org.springframework.ide.eclipse.webflow.core.validator=true
30+
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.subflowstate-org.springframework.ide.eclipse.webflow.core.validator=true
31+
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.transition-org.springframework.ide.eclipse.webflow.core.validator=true
32+
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.variable-org.springframework.ide.eclipse.webflow.core.validator=true
33+
org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.webflowstate-org.springframework.ide.eclipse.webflow.core.validator=true

trunk/.springBeans

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<beansProjectDescription>
3+
<configExtensions>
4+
<configExtension>xml</configExtension>
5+
</configExtensions>
6+
<configs>
7+
<config>src/test/resources/namespace-applicationContext.xml</config>
8+
<config>src/test/resources/infrastructure.xml</config>
9+
<config>src/test/resources/applicationContext.xml</config>
10+
</configs>
11+
<configSets>
12+
<configSet>
13+
<name><![CDATA[Namespace]]></name>
14+
<allowBeanDefinitionOverriding>true</allowBeanDefinitionOverriding>
15+
<incomplete>false</incomplete>
16+
<configs>
17+
<config>src/test/resources/infrastructure.xml</config>
18+
<config>src/test/resources/namespace-applicationContext.xml</config>
19+
</configs>
20+
</configSet>
21+
<configSet>
22+
<name><![CDATA[Without namespace]]></name>
23+
<allowBeanDefinitionOverriding>true</allowBeanDefinitionOverriding>
24+
<incomplete>false</incomplete>
25+
<configs>
26+
<config>src/test/resources/applicationContext.xml</config>
27+
<config>src/test/resources/infrastructure.xml</config>
28+
</configs>
29+
</configSet>
30+
</configSets>
31+
</beansProjectDescription>

trunk/createDDL.jdbc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CREATE TABLE PERSON (ID INTEGER AUTO_INCREMENT NOT NULL, NAME VARCHAR(255), WEIGHT INTEGER, PRIMARY KEY (ID))

0 commit comments

Comments
 (0)