cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r571982 - in /cayenne/main/trunk/itests/jpa-chapter6: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/pache/ src/main/java/org/pache/cayenne/ src/main/java/org/pache/cayenne/jpa/ src/main/java/org/pache/cayenne/jpa/ite...
Date Sun, 02 Sep 2007 13:49:55 GMT
Author: aadamchik
Date: Sun Sep  2 06:49:53 2007
New Revision: 571982

URL: http://svn.apache.org/viewvc?rev=571982&view=rev
Log:
CAY-757 JPA enhancer should enhance undeclared classes
(setting up itests)

Added:
    cayenne/main/trunk/itests/jpa-chapter6/   (with props)
    cayenne/main/trunk/itests/jpa-chapter6/.classpath
    cayenne/main/trunk/itests/jpa-chapter6/.project
    cayenne/main/trunk/itests/jpa-chapter6/pom.xml
    cayenne/main/trunk/itests/jpa-chapter6/src/
    cayenne/main/trunk/itests/jpa-chapter6/src/main/
    cayenne/main/trunk/itests/jpa-chapter6/src/main/java/
    cayenne/main/trunk/itests/jpa-chapter6/src/main/java/org/
    cayenne/main/trunk/itests/jpa-chapter6/src/main/java/org/pache/
    cayenne/main/trunk/itests/jpa-chapter6/src/main/java/org/pache/cayenne/
    cayenne/main/trunk/itests/jpa-chapter6/src/main/java/org/pache/cayenne/jpa/
    cayenne/main/trunk/itests/jpa-chapter6/src/main/java/org/pache/cayenne/jpa/itest/
    cayenne/main/trunk/itests/jpa-chapter6/src/main/java/org/pache/cayenne/jpa/itest/ch6/
    cayenne/main/trunk/itests/jpa-chapter6/src/main/java/org/pache/cayenne/jpa/itest/ch6/entity/
    cayenne/main/trunk/itests/jpa-chapter6/src/main/java/org/pache/cayenne/jpa/itest/ch6/entity/UndeclaredEntity1.java
    cayenne/main/trunk/itests/jpa-chapter6/src/main/resources/
    cayenne/main/trunk/itests/jpa-chapter6/src/main/resources/META-INF/
    cayenne/main/trunk/itests/jpa-chapter6/src/main/resources/META-INF/persistence.xml
    cayenne/main/trunk/itests/jpa-chapter6/src/test/
    cayenne/main/trunk/itests/jpa-chapter6/src/test/java/
    cayenne/main/trunk/itests/jpa-chapter6/src/test/java/org/
    cayenne/main/trunk/itests/jpa-chapter6/src/test/java/org/apache/
    cayenne/main/trunk/itests/jpa-chapter6/src/test/java/org/apache/cayenne/
    cayenne/main/trunk/itests/jpa-chapter6/src/test/java/org/apache/cayenne/jpa/
    cayenne/main/trunk/itests/jpa-chapter6/src/test/java/org/apache/cayenne/jpa/itest/
    cayenne/main/trunk/itests/jpa-chapter6/src/test/java/org/apache/cayenne/jpa/itest/ch6/
    cayenne/main/trunk/itests/jpa-chapter6/src/test/java/org/apache/cayenne/jpa/itest/ch6/_6_1_2_6_PersistentClassSourcesTest.java
    cayenne/main/trunk/itests/jpa-chapter6/src/test/resources/
    cayenne/main/trunk/itests/jpa-chapter6/src/test/resources/schema-hsqldb.sql

Propchange: cayenne/main/trunk/itests/jpa-chapter6/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Sep  2 06:49:53 2007
@@ -0,0 +1,2 @@
+
+target

Added: cayenne/main/trunk/itests/jpa-chapter6/.classpath
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/itests/jpa-chapter6/.classpath?rev=571982&view=auto
==============================================================================
--- cayenne/main/trunk/itests/jpa-chapter6/.classpath (added)
+++ cayenne/main/trunk/itests/jpa-chapter6/.classpath Sun Sep  2 06:49:53 2007
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src/main/java"/>
+	<classpathentry kind="src" path="src/test/java"/>
+	<classpathentry excluding="**" output="src/main/resources" kind="src" path="src/main/resources"/>
+	<classpathentry excluding="**" output="src/test/resources" kind="src" path="src/test/resources"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>

Added: cayenne/main/trunk/itests/jpa-chapter6/.project
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/itests/jpa-chapter6/.project?rev=571982&view=auto
==============================================================================
--- cayenne/main/trunk/itests/jpa-chapter6/.project (added)
+++ cayenne/main/trunk/itests/jpa-chapter6/.project Sun Sep  2 06:49:53 2007
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>jpa-chapter6</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.maven.ide.eclipse.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.maven.ide.eclipse.maven2Nature</nature>
+	</natures>
+</projectDescription>

Added: cayenne/main/trunk/itests/jpa-chapter6/pom.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/itests/jpa-chapter6/pom.xml?rev=571982&view=auto
==============================================================================
--- cayenne/main/trunk/itests/jpa-chapter6/pom.xml (added)
+++ cayenne/main/trunk/itests/jpa-chapter6/pom.xml Sun Sep  2 06:49:53 2007
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+	Licensed to the Apache Software Foundation (ASF) under one
+	or more contributor license agreements.  See the NOTICE file
+	distributed with this work for additional information
+	regarding copyright ownership.  The ASF licenses this file
+	to you under the Apache License, Version 2.0 (the
+	"License"); you may not use this file except in compliance
+	with the License.  You may obtain a copy of the License at
+	
+	http://www.apache.org/licenses/LICENSE-2.0
+	
+	Unless required by applicable law or agreed to in writing,
+	software distributed under the License is distributed on an
+	"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+	KIND, either express or implied.  See the License for the
+	specific language governing permissions and limitations
+	under the License.   
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+	<modelVersion>4.0.0</modelVersion>
+
+	<parent>
+		<groupId>org.apache.cayenne.itests</groupId>
+		<artifactId>cayenne-itests-parent</artifactId>
+		<version>3.0-SNAPSHOT</version>
+	</parent>
+
+	<description>Integration Tests - JPA Chapter 6</description>
+	<artifactId>jpa-chapter6</artifactId>
+	<name>Integration Tests - JPA Chapter 6</name>
+	<packaging>jar</packaging>
+
+	<dependencies>
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.cayenne.itests</groupId>
+			<artifactId>itest-common</artifactId>
+			<version>${version}</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.geronimo.specs</groupId>
+			<artifactId>geronimo-jpa_3.0_spec</artifactId>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.derby</groupId>
+			<artifactId>derby</artifactId>
+		</dependency>
+	</dependencies>
+
+	<build>
+		<plugins>
+			<plugin>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<configuration>
+					<source>1.5</source>
+					<target>1.5</target>
+				</configuration>
+			</plugin>
+
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-surefire-plugin</artifactId>
+
+				<configuration>
+					<forkMode>once</forkMode>
+					<argLine>
+						-javaagent:${settings.localRepository}/org/apache/cayenne/cayenne-agent/${version}/cayenne-agent-${version}.jar
+					</argLine>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+</project>

Added: cayenne/main/trunk/itests/jpa-chapter6/src/main/java/org/pache/cayenne/jpa/itest/ch6/entity/UndeclaredEntity1.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/itests/jpa-chapter6/src/main/java/org/pache/cayenne/jpa/itest/ch6/entity/UndeclaredEntity1.java?rev=571982&view=auto
==============================================================================
--- cayenne/main/trunk/itests/jpa-chapter6/src/main/java/org/pache/cayenne/jpa/itest/ch6/entity/UndeclaredEntity1.java
(added)
+++ cayenne/main/trunk/itests/jpa-chapter6/src/main/java/org/pache/cayenne/jpa/itest/ch6/entity/UndeclaredEntity1.java
Sun Sep  2 06:49:53 2007
@@ -0,0 +1,11 @@
+package org.pache.cayenne.jpa.itest.ch6.entity;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+
+@Entity
+public class UndeclaredEntity1 {
+
+	@Id
+	protected int id;
+}

Added: cayenne/main/trunk/itests/jpa-chapter6/src/main/resources/META-INF/persistence.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/itests/jpa-chapter6/src/main/resources/META-INF/persistence.xml?rev=571982&view=auto
==============================================================================
--- cayenne/main/trunk/itests/jpa-chapter6/src/main/resources/META-INF/persistence.xml (added)
+++ cayenne/main/trunk/itests/jpa-chapter6/src/main/resources/META-INF/persistence.xml Sun
Sep  2 06:49:53 2007
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+ 
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.
+-->
+
+<persistence>
+	<persistence-unit name="itest">
+		<description>Persistence unit that declares no explicit classes</description>
+	</persistence-unit>
+	
+</persistence>

Added: cayenne/main/trunk/itests/jpa-chapter6/src/test/java/org/apache/cayenne/jpa/itest/ch6/_6_1_2_6_PersistentClassSourcesTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/itests/jpa-chapter6/src/test/java/org/apache/cayenne/jpa/itest/ch6/_6_1_2_6_PersistentClassSourcesTest.java?rev=571982&view=auto
==============================================================================
--- cayenne/main/trunk/itests/jpa-chapter6/src/test/java/org/apache/cayenne/jpa/itest/ch6/_6_1_2_6_PersistentClassSourcesTest.java
(added)
+++ cayenne/main/trunk/itests/jpa-chapter6/src/test/java/org/apache/cayenne/jpa/itest/ch6/_6_1_2_6_PersistentClassSourcesTest.java
Sun Sep  2 06:49:53 2007
@@ -0,0 +1,16 @@
+package org.apache.cayenne.jpa.itest.ch6;
+
+import org.apache.cayenne.itest.jpa.EntityManagerCase;
+
+public class _6_1_2_6_PersistentClassSourcesTest extends EntityManagerCase {
+
+	public void testLoadUndeclared() throws Exception {
+		getDbHelper().deleteAll("UndeclaredEntity1");
+
+//		UndeclaredEntity1 e = new UndeclaredEntity1();
+//		getEntityManager().persist(e);
+//		getEntityManager().getTransaction().commit();
+//
+//		assertEquals(1, getDbHelper().getRowCount("UndeclaredEntity1"));
+	}
+}

Added: cayenne/main/trunk/itests/jpa-chapter6/src/test/resources/schema-hsqldb.sql
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/itests/jpa-chapter6/src/test/resources/schema-hsqldb.sql?rev=571982&view=auto
==============================================================================
--- cayenne/main/trunk/itests/jpa-chapter6/src/test/resources/schema-hsqldb.sql (added)
+++ cayenne/main/trunk/itests/jpa-chapter6/src/test/resources/schema-hsqldb.sql Sun Sep  2
06:49:53 2007
@@ -0,0 +1,4 @@
+create table AUTO_PK_SUPPORT (TABLE_NAME CHAR(100) NOT NULL, NEXT_ID INTEGER NOT NULL, PRIMARY
KEY(TABLE_NAME));
+insert into AUTO_PK_SUPPORT (TABLE_NAME, NEXT_ID) VALUES ('UndeclaredEntity1', 1);
+
+create table UndeclaredEntity1 (id int not null);



Mime
View raw message