Author: aadamchik
Date: Fri Jul 14 10:19:07 2006
New Revision: 421954
URL: http://svn.apache.org/viewvc?rev=421954&view=rev
Log:
bringing the JPA provider up to date with the latest cayenne
* switched to 3.0 brnahc dependency
* fixed ClassDesciptor
Modified:
incubator/cayenne/jpa/trunk/cayenne-jpa/.classpath
incubator/cayenne/jpa/trunk/cayenne-jpa/pom.xml
incubator/cayenne/jpa/trunk/cayenne-jpa/src/main/java/org/apache/cayenne/jpa/cspi/CjpaEntityDescriptor.java
Modified: incubator/cayenne/jpa/trunk/cayenne-jpa/.classpath
URL:
http://svn.apache.org/viewvc/incubator/cayenne/jpa/trunk/cayenne-jpa/.classpath?rev=421954&r1=421953&r2=421954&view=diff
==============================================================================
--- incubator/cayenne/jpa/trunk/cayenne-jpa/.classpath (original)
+++ incubator/cayenne/jpa/trunk/cayenne-jpa/.classpath Fri Jul 14 10:19:07 2006
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/main/java"/>
- <classpathentry kind="src" path="src/main/resources"/>
- <classpathentry output="target/test-classes" kind="src"
path="src/test/java"/>
- <classpathentry output="target/test-classes" kind="src"
path="src/test/resources"/>
- <classpathentry sourcepath="/JRE_SRC_15" kind="var" path="JRE_LIB_15"/>
+ <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>
Modified: incubator/cayenne/jpa/trunk/cayenne-jpa/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/cayenne/jpa/trunk/cayenne-jpa/pom.xml?rev=421954&r1=421953&r2=421954&view=diff
==============================================================================
--- incubator/cayenne/jpa/trunk/cayenne-jpa/pom.xml (original)
+++ incubator/cayenne/jpa/trunk/cayenne-jpa/pom.xml Fri Jul 14 10:19:07 2006
@@ -1,73 +1,96 @@
-<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">
+<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>
- <groupId>org.apache.cayenne</groupId>
- <artifactId>cayenne-jpa</artifactId>
- <packaging>jar</packaging>
- <version>3.0-incubating-SNAPSHOT</version>
- <name>Cayenne JPA Implementation</name>
- <url>http://incubator.apache.org/cayenne</url>
- <organization>
- <name>Apache Software Foundation (incubating)</name>
- </organization>
-
- <description>
-This project is dedicated to making Cayenne a JPA provider.
- </description>
- <mailingLists>
- <mailingList>
- <name>Development List</name>
- <subscribe>[EMAIL PROTECTED]</subscribe>
- <unsubscribe>[EMAIL PROTECTED]</unsubscribe>
- <post>[email protected]</post>
- <archive>http://objectstyle.org/cayenne/lists/cayenne-user</archive>
- </mailingList>
- <mailingList>
- <name>User List</name>
- <subscribe>[EMAIL PROTECTED]</subscribe>
- <unsubscribe>[EMAIL PROTECTED]</unsubscribe>
- <post>[email protected]</post>
- <archive>http://objectstyle.org/cayenne/lists/cayenne-user</archive>
- </mailingList>
- <mailingList>
- <name>Commits List</name>
- <subscribe>[EMAIL PROTECTED]</subscribe>
- <unsubscribe>[EMAIL PROTECTED]</unsubscribe>
- </mailingList>
- </mailingLists>
- <developers>
- <developer>
- <id>andrus</id>
- <name>Andrus Adamchik</name>
- <email>[EMAIL PROTECTED]</email>
- <organizationUrl>http://adamchik.org</organizationUrl>
- </developer>
- <developer>
- <name>Cris Daniluk</name>
- </developer>
- <developer>
- <name>Michael Gentry</name>
- </developer>
- <developer>
- <name>Tore Halset</name>
- </developer>
- <developer>
- <name>Mike Kienenberger</name>
- </developer>
- <developer>
- <name>Kevin Menard</name>
- </developer>
- </developers>
- <issueManagement>
- <system>JIRA</system>
-
<url>http://issues.apache.org/cayenne/secure/BrowseProject.jspa?id=10000</url>
- </issueManagement>
- <scm>
-
<connection>scm:svn:http://svn.apache.org/repos/asf/incubator/cayenne/</connection>
- <developerConnection>scm:svn:https://[EMAIL
PROTECTED]/repos/asf/incubator/cayenne/</developerConnection>
- <url>http://svn.apache.org/repos/asf/incubator/cayenne/</url>
- </scm>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.cayenne</groupId>
+ <artifactId>cayenne-jpa</artifactId>
+ <packaging>jar</packaging>
+ <version>3.0-incubating-SNAPSHOT</version>
+ <name>Cayenne JPA Implementation</name>
+ <url>http://incubator.apache.org/cayenne</url>
+ <organization>
+ <name>Apache Software Foundation (incubating)</name>
+ </organization>
+
+ <description>
+ This project is dedicated to making Cayenne a JPA provider.
+ </description>
+ <mailingLists>
+ <mailingList>
+ <name>Development List</name>
+ <subscribe>
+ [EMAIL PROTECTED]
+ </subscribe>
+ <unsubscribe>
+ [EMAIL PROTECTED]
+ </unsubscribe>
+ <post>[email protected]</post>
+ <archive>
+
http://objectstyle.org/cayenne/lists/cayenne-user
+ </archive>
+ </mailingList>
+ <mailingList>
+ <name>User List</name>
+ <subscribe>
+ [EMAIL PROTECTED]
+ </subscribe>
+ <unsubscribe>
+ [EMAIL PROTECTED]
+ </unsubscribe>
+ <post>[email protected]</post>
+ <archive>
+
http://objectstyle.org/cayenne/lists/cayenne-user
+ </archive>
+ </mailingList>
+ <mailingList>
+ <name>Commits List</name>
+ <subscribe>
+ [EMAIL PROTECTED]
+ </subscribe>
+ <unsubscribe>
+ [EMAIL PROTECTED]
+ </unsubscribe>
+ </mailingList>
+ </mailingLists>
+ <developers>
+ <developer>
+ <id>andrus</id>
+ <name>Andrus Adamchik</name>
+ <email>[EMAIL PROTECTED]</email>
+ <organizationUrl>http://adamchik.org</organizationUrl>
+ </developer>
+ <developer>
+ <name>Cris Daniluk</name>
+ </developer>
+ <developer>
+ <name>Michael Gentry</name>
+ </developer>
+ <developer>
+ <name>Tore Halset</name>
+ </developer>
+ <developer>
+ <name>Mike Kienenberger</name>
+ </developer>
+ <developer>
+ <name>Kevin Menard</name>
+ </developer>
+ </developers>
+ <issueManagement>
+ <system>JIRA</system>
+ <url>
+
http://issues.apache.org/cayenne/secure/BrowseProject.jspa?id=10000
+ </url>
+ </issueManagement>
+ <scm>
+ <connection>
+
scm:svn:http://svn.apache.org/repos/asf/incubator/cayenne/
+ </connection>
+ <developerConnection>
+ scm:svn:https://[EMAIL
PROTECTED]/repos/asf/incubator/cayenne/
+ </developerConnection>
+ <url>http://svn.apache.org/repos/asf/incubator/cayenne/</url>
+ </scm>
<repositories>
<repository>
<id>objectstyle</id>
@@ -76,134 +99,140 @@
</repository>
</repositories>
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jpa_3.0_spec</artifactId>
- <version>1.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.objectstyle.cayenne</groupId>
- <artifactId>cayenne-nodeps</artifactId>
- <version>1.2-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>cglib</groupId>
- <artifactId>cglib-nodep</artifactId>
- <version>2.1_3</version>
- </dependency>
- </dependencies>
-
-
- <distributionManagement>
- <site>
- <id>cayenne-website</id>
- <name>Cayenne</name>
- <url>file://${java.io.tmpdir}/foo</url>
- </site>
- <repository>
- <id>local-maven2-repo</id>
- <name>Local Maven 2 Cayenne Repository</name>
- <url>file://${java.io.tmpdir}/cayenne-mvn-repo</url>
- </repository>
- <snapshotRepository>
- <id>local-maven2-snapshot-repo</id>
- <name>Local Maven 2 Snapshot Cayenne Repository</name>
- <url>file://${java.io.tmpdir}/cayenne-mvn-snapshot-repo</url>
- </snapshotRepository>
- </distributionManagement>
-
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>surefire-report-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <configuration>
- <showProtected>true</showProtected>
- <showPackage>false</showPackage>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
-
<manifestFile>src/main/resources/META-INF/MANIFEST.MF</manifestFile>
- </archive>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-project-info-reports-plugin</artifactId>
- <reportSets>
- <reportSet>
- <reports>
- <report>project-team</report>
- <report>mailing-list</report>
- <report>cim</report>
- <report>issue-tracking</report>
- <report>license</report>
- <report>scm</report>
- <report>javadoc</report>
- </reports>
- </reportSet>
- </reportSets>
- </plugin>
- </plugins>
- </reporting>
-
- <profiles>
- <profile>
- <id>generate-assembly</id>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-javadoc-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-javadoc</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-source-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-source</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jpa_3.0_spec</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.objectstyle.cayenne</groupId>
+ <artifactId>cayenne-nodeps</artifactId>
+ <version>3.0-incubating-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>cglib</groupId>
+ <artifactId>cglib-nodep</artifactId>
+ <version>2.1_3</version>
+ </dependency>
+ </dependencies>
+
+
+ <distributionManagement>
+ <site>
+ <id>cayenne-website</id>
+ <name>Cayenne</name>
+ <url>file://${java.io.tmpdir}/foo</url>
+ </site>
+ <repository>
+ <id>local-maven2-repo</id>
+ <name>Local Maven 2 Cayenne Repository</name>
+ <url>file://${java.io.tmpdir}/cayenne-mvn-repo</url>
+ </repository>
+ <snapshotRepository>
+ <id>local-maven2-snapshot-repo</id>
+ <name>Local Maven 2 Snapshot Cayenne Repository</name>
+ <url>
+
file://${java.io.tmpdir}/cayenne-mvn-snapshot-repo
+ </url>
+ </snapshotRepository>
+ </distributionManagement>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+
<artifactId>surefire-report-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <showProtected>true</showProtected>
+ <showPackage>false</showPackage>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifestFile>
+
src/main/resources/META-INF/MANIFEST.MF
+ </manifestFile>
+ </archive>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>
+ maven-project-info-reports-plugin
+ </artifactId>
+ <reportSets>
+ <reportSet>
+ <reports>
+
<report>project-team</report>
+
<report>mailing-list</report>
+ <report>cim</report>
+
<report>issue-tracking</report>
+ <report>license</report>
+ <report>scm</report>
+ <report>javadoc</report>
+ </reports>
+ </reportSet>
+ </reportSets>
+ </plugin>
+ </plugins>
+ </reporting>
+
+ <profiles>
+ <profile>
+ <id>generate-assembly</id>
+ <build>
+ <plugins>
+ <plugin>
+
<artifactId>maven-javadoc-plugin</artifactId>
+ <executions>
+ <execution>
+
<id>attach-javadoc</id>
+ <goals>
+
<goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+
<artifactId>maven-source-plugin</artifactId>
+ <executions>
+ <execution>
+
<id>attach-source</id>
+ <goals>
+
<goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
Modified:
incubator/cayenne/jpa/trunk/cayenne-jpa/src/main/java/org/apache/cayenne/jpa/cspi/CjpaEntityDescriptor.java
URL:
http://svn.apache.org/viewvc/incubator/cayenne/jpa/trunk/cayenne-jpa/src/main/java/org/apache/cayenne/jpa/cspi/CjpaEntityDescriptor.java?rev=421954&r1=421953&r2=421954&view=diff
==============================================================================
---
incubator/cayenne/jpa/trunk/cayenne-jpa/src/main/java/org/apache/cayenne/jpa/cspi/CjpaEntityDescriptor.java
(original)
+++
incubator/cayenne/jpa/trunk/cayenne-jpa/src/main/java/org/apache/cayenne/jpa/cspi/CjpaEntityDescriptor.java
Fri Jul 14 10:19:07 2006
@@ -23,7 +23,9 @@
import org.objectstyle.cayenne.map.ObjEntity;
import org.objectstyle.cayenne.map.ObjRelationship;
import org.objectstyle.cayenne.property.ClassDescriptor;
+import org.objectstyle.cayenne.property.FieldAccessor;
import org.objectstyle.cayenne.property.ListProperty;
+import org.objectstyle.cayenne.property.PropertyAccessException;
import org.objectstyle.cayenne.property.PropertyAccessor;
class CjpaEntityDescriptor extends EntityDescriptor {
@@ -58,6 +60,26 @@
.getTargetDescriptor(), accessor, relationship
.getReverseRelationshipName()));
}
+ }
+ }
+
+ /**
+ * Overrides super to return field accessor, regardless of whether the
class is a
+ * DataObject or not.
+ */
+ @Override
+ protected PropertyAccessor makeAccessor(String propertyName, Class
propertyType)
+ throws PropertyAccessException {
+ try {
+ return new FieldAccessor(objectClass, propertyName, propertyType);
+ }
+ catch (Throwable th) {
+
+ throw new PropertyAccessException("Can't create accessor for
property '"
+ + propertyName
+ + "' of class '"
+ + objectClass.getName()
+ + "'", null, null);
}
}
}