openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From awh...@apache.org
Subject svn commit: r428533 - in /incubator/openjpa/trunk: ./ openjpa-kernel-4/ openjpa-kernel-4/src/ openjpa-kernel-4/src/main/ openjpa-kernel-4/src/main/java/ openjpa-kernel-4/src/main/java/org/ openjpa-kernel-4/src/main/java/org/apache/ openjpa-kernel-4/src...
Date Thu, 03 Aug 2006 21:30:31 GMT
Author: awhite
Date: Thu Aug  3 14:30:30 2006
New Revision: 428533

URL: http://svn.apache.org/viewvc?rev=428533&view=rev
Log:
Add (presumably forgotten) JDK 1.4 GregorianCalendar.  1.4 has a public mutator
method that wasn't available in previous versions, and we must intercept it.


Added:
    incubator/openjpa/trunk/openjpa-kernel-4/
    incubator/openjpa/trunk/openjpa-kernel-4/pom.xml
    incubator/openjpa/trunk/openjpa-kernel-4/src/
    incubator/openjpa/trunk/openjpa-kernel-4/src/main/
    incubator/openjpa/trunk/openjpa-kernel-4/src/main/java/
    incubator/openjpa/trunk/openjpa-kernel-4/src/main/java/org/
    incubator/openjpa/trunk/openjpa-kernel-4/src/main/java/org/apache/
    incubator/openjpa/trunk/openjpa-kernel-4/src/main/java/org/apache/openjpa/
    incubator/openjpa/trunk/openjpa-kernel-4/src/main/java/org/apache/openjpa/util/
    incubator/openjpa/trunk/openjpa-kernel-4/src/main/java/org/apache/openjpa/util/ProxyGregorianCalendar4.java
    incubator/openjpa/trunk/openjpa-kernel-4/src/main/resources/
Modified:
    incubator/openjpa/trunk/openjpa-project/pom.xml
    incubator/openjpa/trunk/pom.xml

Added: incubator/openjpa/trunk/openjpa-kernel-4/pom.xml
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel-4/pom.xml?rev=428533&view=auto
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel-4/pom.xml (added)
+++ incubator/openjpa/trunk/openjpa-kernel-4/pom.xml Thu Aug  3 14:30:30 2006
@@ -0,0 +1,36 @@
+<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.openjpa</groupId>
+    <artifactId>openjpa-kernel-4</artifactId>
+    <packaging>jar</packaging>
+    <name>Kernel 1.4</name>
+    <description>Kernel 1.4</description>
+    <url>http://incubator.apache.org/projects/openjpa</url>
+    <parent>
+        <groupId>org.apache.openjpa</groupId>
+        <artifactId>openjpa</artifactId>
+        <version>0.9.0</version>
+    </parent>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.openjpa</groupId>
+            <artifactId>openjpa-kernel</artifactId>
+            <version>${pom.version}</version>
+            <scope>compile</scope>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>1.4</source>
+                    <target>1.4</target>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>

Added: incubator/openjpa/trunk/openjpa-kernel-4/src/main/java/org/apache/openjpa/util/ProxyGregorianCalendar4.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel-4/src/main/java/org/apache/openjpa/util/ProxyGregorianCalendar4.java?rev=428533&view=auto
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel-4/src/main/java/org/apache/openjpa/util/ProxyGregorianCalendar4.java
(added)
+++ incubator/openjpa/trunk/openjpa-kernel-4/src/main/java/org/apache/openjpa/util/ProxyGregorianCalendar4.java
Thu Aug  3 14:30:30 2006
@@ -0,0 +1,60 @@
+package org.apache.openjpa.util;
+
+import java.util.Locale;
+import java.util.TimeZone;
+
+/**
+ * {@link ProxyGregorianCalendar} subclass that overrides the mutating
+ * {@link #set} method, which is final in Java 1.3 but public in Java 1.4
+ * and higher.
+ *
+ * @author Marc Prud'hommeaux
+ * @nojavadoc
+ */
+public class ProxyGregorianCalendar4
+    extends ProxyGregorianCalendar {
+
+    public ProxyGregorianCalendar4() {
+        super();
+    }
+
+    public ProxyGregorianCalendar4(int year, int month, int dayOfMonth) {
+        super(year, month, dayOfMonth);
+    }
+
+    public ProxyGregorianCalendar4(int year, int month, int dayOfMonth,
+        int hourOfDay, int minute) {
+        super(year, month, dayOfMonth, hourOfDay, minute);
+    }
+
+    public ProxyGregorianCalendar4(int year, int month, int dayOfMonth,
+        int hourOfDay, int minute, int second) {
+        super(year, month, dayOfMonth, hourOfDay, minute, second);
+    }
+
+    public ProxyGregorianCalendar4(Locale aLocale) {
+        super(aLocale);
+    }
+
+    public ProxyGregorianCalendar4(TimeZone zone) {
+        super(zone);
+    }
+
+    public ProxyGregorianCalendar4(TimeZone zone, Locale aLocale) {
+        super(zone, aLocale);
+    }
+
+    public void set(int field, int value) {
+        if (get(field) != value) {
+            Proxies.dirty(this);
+            super.set(field, value);
+        }
+    }
+
+    public ProxyCalendar newInstance(TimeZone timeZone) {
+        if (timeZone == null)
+            return new ProxyGregorianCalendar4();
+        else
+            return new ProxyGregorianCalendar4(timeZone);
+    }
+}

Modified: incubator/openjpa/trunk/openjpa-project/pom.xml
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-project/pom.xml?rev=428533&r1=428532&r2=428533&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-project/pom.xml (original)
+++ incubator/openjpa/trunk/openjpa-project/pom.xml Thu Aug  3 14:30:30 2006
@@ -137,6 +137,11 @@
         </dependency>
         <dependency>
             <groupId>org.apache.openjpa</groupId>
+            <artifactId>openjpa-kernel-4</artifactId>
+            <version>${pom.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.openjpa</groupId>
             <artifactId>openjpa-kernel-5</artifactId>
             <version>${pom.version}</version>
         </dependency>

Modified: incubator/openjpa/trunk/pom.xml
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/pom.xml?rev=428533&r1=428532&r2=428533&view=diff
==============================================================================
--- incubator/openjpa/trunk/pom.xml (original)
+++ incubator/openjpa/trunk/pom.xml Thu Aug  3 14:30:30 2006
@@ -90,6 +90,15 @@
     </modules>
     <profiles>
         <profile>
+            <id>jdk1.4</id>
+            <activation>
+                <jdk>1.4</jdk>
+            </activation>
+            <modules>
+                <module>openjpa-kernel-4</module>
+            </modules>
+        </profile>
+        <profile>
             <id>jdk1.5</id>
             <activation>
                 <jdk>1.5</jdk>
@@ -97,6 +106,7 @@
             <modules>
                 <module>openjpa-persistence</module>
                 <module>openjpa-persistence-jdbc</module>
+                <module>openjpa-kernel-4</module>
                 <module>openjpa-kernel-5</module>
                 <module>openjpa-jdbc-5</module>
             </modules>



Mime
View raw message