cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1334400 - in /cayenne/main/trunk: docs/doc/src/main/resources/ framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/ framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conn/ framework/cayenne-jdk1...
Date Sat, 05 May 2012 11:20:45 GMT
Author: aadamchik
Date: Sat May  5 11:20:44 2012
New Revision: 1334400

URL: http://svn.apache.org/viewvc?rev=1334400&view=rev
Log:
CAY-1706 Build support on JDK 1.7

patch by Andrei Veprev

Modified:
    cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataNode.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/TransactionConnectionDecorator.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conn/ConnectionWrapper.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conn/DriverDataSource.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conn/PoolDataSource.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conn/PoolManager.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/oracle/OracleSQLTemplateAction.java
    cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/objentity/ObjAttributeInfoDialog.java
    cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/objentity/ObjAttributeInfoDialogView.java

Modified: cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt?rev=1334400&r1=1334399&r2=1334400&view=diff
==============================================================================
--- cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt (original)
+++ cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt Sat May  5 11:20:44 2012
@@ -57,6 +57,7 @@ CAY-1693 Initial support for bitwise ope
 CAY-1698 ObjectIdRelationship support for AuditableChild
 CAY-1700 Split long DISJOINT_BY_ID prefetch query on several smaller queries
 CAY-1705 Cayenne plugin compatibility with M2E
+CAY-1706 Build support on JDK 1.7
 
 Bug Fixes Since 3.1M3:
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataNode.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataNode.java?rev=1334400&r1=1334399&r2=1334400&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataNode.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataNode.java
Sat May  5 11:20:44 2012
@@ -22,10 +22,12 @@ package org.apache.cayenne.access;
 import java.io.PrintWriter;
 import java.sql.Connection;
 import java.sql.SQLException;
+import java.sql.SQLFeatureNotSupportedException;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.logging.Logger;
 
 import javax.sql.DataSource;
 
@@ -413,5 +415,14 @@ public class DataNode implements QueryEn
         public <T> T unwrap(Class<T> iface) throws SQLException {
             throw new UnsupportedOperationException();
         }
+
+        /**
+         * @since 3.1
+         *
+         * JDBC 4.1 compatibility under Java 1.5
+         */
+        public Logger getParentLogger() throws SQLFeatureNotSupportedException {
+            throw new UnsupportedOperationException();
+        }
     }
 }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/TransactionConnectionDecorator.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/TransactionConnectionDecorator.java?rev=1334400&r1=1334399&r2=1334400&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/TransactionConnectionDecorator.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/TransactionConnectionDecorator.java
Sat May  5 11:20:44 2012
@@ -36,6 +36,7 @@ import java.sql.Statement;
 import java.sql.Struct;
 import java.util.Map;
 import java.util.Properties;
+import java.util.concurrent.Executor;
 
 /**
  * A wrapper of a JDBC connection that is attached to a transaction. The behavior of this
@@ -333,4 +334,49 @@ class TransactionConnectionDecorator imp
     public SQLXML createSQLXML() throws SQLException {
         throw new UnsupportedOperationException();
     }
+
+    /**
+     * @since 3.1
+     *
+     * JDBC 4.1 compatibility under Java 1.5
+     */
+    public void setSchema(String schema) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     * @since 3.1
+     *
+     * JDBC 4.1 compatibility under Java 1.5
+     */
+    public String getSchema() throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     * @since 3.1
+     *
+     * JDBC 4.1 compatibility under Java 1.5
+     */
+    public void abort(Executor executor) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     * @since 3.1
+     *
+     * JDBC 4.1 compatibility under Java 1.5
+     */
+    public void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException
{
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     * @since 3.1
+     *
+     * JDBC 4.1 compatibility under Java 1.5
+     */
+    public int getNetworkTimeout() throws SQLException {
+        throw new UnsupportedOperationException();
+    }
 }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conn/ConnectionWrapper.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conn/ConnectionWrapper.java?rev=1334400&r1=1334399&r2=1334400&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conn/ConnectionWrapper.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conn/ConnectionWrapper.java
Sat May  5 11:20:44 2012
@@ -36,6 +36,7 @@ import java.sql.Statement;
 import java.sql.Struct;
 import java.util.Map;
 import java.util.Properties;
+import java.util.concurrent.Executor;
 
 /**
  * ConnectionWrapper is a <code>java.sql.Connection</code> implementation that
wraps
@@ -596,4 +597,49 @@ public class ConnectionWrapper implement
     public void setClientInfo(String name, String value) throws SQLClientInfoException {
         throw new UnsupportedOperationException();
     }
+
+    /**
+     * @since 3.1
+     *
+     * JDBC 4.1 compatibility under Java 1.5
+     */
+    public void setSchema(String schema) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     * @since 3.1
+     *
+     * JDBC 4.1 compatibility under Java 1.5
+     */
+    public String getSchema() throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     * @since 3.1
+     *
+     * JDBC 4.1 compatibility under Java 1.5
+     */
+    public void abort(Executor executor) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     * @since 3.1
+     *
+     * JDBC 4.1 compatibility under Java 1.5
+     */
+    public void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException
{
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     * @since 3.1
+     *
+     * JDBC 4.1 compatibility under Java 1.5
+     */
+    public int getNetworkTimeout() throws SQLException {
+        throw new UnsupportedOperationException();
+    }
 }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conn/DriverDataSource.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conn/DriverDataSource.java?rev=1334400&r1=1334399&r2=1334400&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conn/DriverDataSource.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conn/DriverDataSource.java
Sat May  5 11:20:44 2012
@@ -24,7 +24,9 @@ import java.sql.Connection;
 import java.sql.Driver;
 import java.sql.DriverManager;
 import java.sql.SQLException;
+import java.sql.SQLFeatureNotSupportedException;
 import java.util.Properties;
+import java.util.logging.Logger;
 
 import javax.sql.DataSource;
 
@@ -270,4 +272,13 @@ public class DriverDataSource implements
     public <T> T unwrap(Class<T> iface) throws SQLException {
         throw new UnsupportedOperationException();
     }
+
+    /**
+     * @since 3.1
+     *
+     * JDBC 4.1 compatibility under Java 1.5
+     */
+    public Logger getParentLogger() throws SQLFeatureNotSupportedException {
+        throw new UnsupportedOperationException();
+    }
 }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conn/PoolDataSource.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conn/PoolDataSource.java?rev=1334400&r1=1334399&r2=1334400&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conn/PoolDataSource.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conn/PoolDataSource.java
Sat May  5 11:20:44 2012
@@ -22,6 +22,8 @@ package org.apache.cayenne.conn;
 
 import java.io.PrintWriter;
 import java.sql.SQLException;
+import java.sql.SQLFeatureNotSupportedException;
+import java.util.logging.Logger;
 
 import javax.sql.ConnectionPoolDataSource;
 import javax.sql.DataSource;
@@ -71,4 +73,13 @@ public class PoolDataSource implements C
 	public PooledConnection getPooledConnection(String user, String password) throws SQLException
{
 		return new PooledConnectionImpl(nonPooledDatasource, user, password);
 	}
+
+    /**
+     * @since 3.1
+     *
+     * JDBC 4.1 compatibility under Java 1.5
+     */
+    public Logger getParentLogger() throws SQLFeatureNotSupportedException {
+        throw new UnsupportedOperationException();
+    }
 }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conn/PoolManager.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conn/PoolManager.java?rev=1334400&r1=1334399&r2=1334400&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conn/PoolManager.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/conn/PoolManager.java
Sat May  5 11:20:44 2012
@@ -22,9 +22,11 @@ package org.apache.cayenne.conn;
 import java.io.PrintWriter;
 import java.sql.Connection;
 import java.sql.SQLException;
+import java.sql.SQLFeatureNotSupportedException;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.ListIterator;
+import java.util.logging.Logger;
 
 import javax.sql.ConnectionEvent;
 import javax.sql.ConnectionEventListener;
@@ -592,4 +594,13 @@ public class PoolManager implements Data
     public <T> T unwrap(Class<T> iface) throws SQLException {
         throw new UnsupportedOperationException();
     }
+
+    /**
+     * @since 3.1
+     *
+     * JDBC 4.1 compatibility under Java 1.5
+     */
+    public Logger getParentLogger() throws SQLFeatureNotSupportedException {
+        throw new UnsupportedOperationException();
+    }
 }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/oracle/OracleSQLTemplateAction.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/oracle/OracleSQLTemplateAction.java?rev=1334400&r1=1334399&r2=1334400&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/oracle/OracleSQLTemplateAction.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/oracle/OracleSQLTemplateAction.java
Sat May  5 11:20:44 2012
@@ -1100,6 +1100,24 @@ class OracleSQLTemplateAction extends SQ
                 throws SQLException {
             throw new UnsupportedOperationException();
         }
+
+        /**
+         * @since 3.1
+         *
+         * JDBC 4.1 compatibility under Java 1.5
+         */
+        public <T> T getObject(int columnIndex, Class<T> type) throws SQLException
{
+            throw new UnsupportedOperationException();
+        }
+
+        /**
+         * @since 3.1
+         *
+         * JDBC 4.1 compatibility under Java 1.5
+         */
+        public <T> T getObject(String columnLabel, Class<T> type) throws SQLException
{
+            throw new UnsupportedOperationException();
+        }
     }
 
     final class OracleResultSetMetadata implements ResultSetMetaData {

Modified: cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/objentity/ObjAttributeInfoDialog.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/objentity/ObjAttributeInfoDialog.java?rev=1334400&r1=1334399&r2=1334400&view=diff
==============================================================================
--- cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/objentity/ObjAttributeInfoDialog.java
(original)
+++ cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/objentity/ObjAttributeInfoDialog.java
Sat May  5 11:20:44 2012
@@ -127,7 +127,7 @@ public class ObjAttributeInfoDialog exte
     private void initController(ObjAttribute attr) {
 
         for (int i = 0; i < embeddableNames.size(); i++) {
-            ((DefaultComboBoxModel) view.getType().getModel()).addElement(embeddableNames
+            ((DefaultComboBoxModel) view.getTypeComboBox().getModel()).addElement(embeddableNames
                     .get(i)
                     .toString());
         }
@@ -169,7 +169,7 @@ public class ObjAttributeInfoDialog exte
         }
         view.getSourceEntityLabel().setText(attribute.getEntity().getName());
 
-        view.getType().setSelectedItem(attribute.getType());
+        view.getTypeComboBox().setSelectedItem(attribute.getType());
 
         BindingBuilder builder = new BindingBuilder(
                 getApplication().getBindingFactory(),
@@ -238,7 +238,7 @@ public class ObjAttributeInfoDialog exte
             setSelectionPath();
         }
 
-        view.getType().addItemListener(new ItemListener() {
+        view.getTypeComboBox().addItemListener(new ItemListener() {
 
             public void itemStateChanged(ItemEvent e) {
                 if (lastObjectType != null) {
@@ -402,11 +402,11 @@ public class ObjAttributeInfoDialog exte
 
         setUpTableStructure();
 
-        if (view.getType().getSelectedItem() == null) {
+        if (view.getTypeComboBox().getSelectedItem() == null) {
             lastObjectType = "";
         }
         else {
-            lastObjectType = view.getType().getSelectedItem();
+            lastObjectType = view.getTypeComboBox().getSelectedItem();
         }
     }
 
@@ -417,7 +417,7 @@ public class ObjAttributeInfoDialog exte
     public boolean setPath(boolean isChange) {
 
         if (isChange()) {
-            attributeSaved.setType(view.getType().getSelectedItem().toString());
+            attributeSaved.setType(view.getTypeComboBox().getSelectedItem().toString());
             attributeSaved.setName(view.getAttributeName().getText());
         }
 
@@ -464,7 +464,7 @@ public class ObjAttributeInfoDialog exte
 
             if (attribute.getDbAttributePath() != null
                     && !embeddableNames.contains(view
-                            .getType()
+                            .getTypeComboBox()
                             .getSelectedItem()
                             .toString())) {
                 if (!attribute.getDbAttributePath().equals(attributePath.toString())) {
@@ -507,11 +507,11 @@ public class ObjAttributeInfoDialog exte
         return isOvverideTableChange
                 || !attribute.getName().equals(view.getAttributeName().getText())
                 || (attribute.getType() == null && view
-                        .getType()
+                        .getTypeComboBox()
                         .getSelectedItem()
                         .toString() != null)
                 || !attribute.getType().equals(
-                        view.getType().getSelectedItem().toString());
+                        view.getTypeComboBox().getSelectedItem().toString());
     }
 
     public void saveMapping() {

Modified: cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/objentity/ObjAttributeInfoDialogView.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/objentity/ObjAttributeInfoDialogView.java?rev=1334400&r1=1334399&r2=1334400&view=diff
==============================================================================
--- cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/objentity/ObjAttributeInfoDialogView.java
(original)
+++ cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/objentity/ObjAttributeInfoDialogView.java
Sat May  5 11:20:44 2012
@@ -67,7 +67,7 @@ public class ObjAttributeInfoDialogView 
     protected JLabel currentPathLabel;
     protected JLabel sourceEntityLabel;
 
-    protected JComboBox type;
+    protected JComboBox typeComboBox;
     protected JPanel typeManagerPane;
 
     protected CayenneTable overrideAttributeTable;
@@ -93,10 +93,10 @@ public class ObjAttributeInfoDialogView 
         this.currentPathLabel = new JLabel();
         this.sourceEntityLabel = new JLabel();
 
-        this.type = Application.getWidgetFactory().createComboBox(ModelerUtil
+        this.typeComboBox = Application.getWidgetFactory().createComboBox(ModelerUtil
                 .getRegisteredTypeNames(), false);
-        AutoCompletion.enable(type, false, true);
-        type.getRenderer();
+        AutoCompletion.enable(typeComboBox, false, true);
+        typeComboBox.getRenderer();
 
         overrideAttributeTable = new CayenneTable();
         tablePreferences = new TableColumnPreferences(getClass(), "overrideAttributeTable");
@@ -126,7 +126,7 @@ public class ObjAttributeInfoDialogView 
         builder.add(sourceEntityLabel, cc.xywh(3, 7, 1, 1));
 
         builder.addLabel("Type:", cc.xy(1, 9));
-        builder.add(type, cc.xywh(3, 9, 1, 1));
+        builder.add(typeComboBox, cc.xywh(3, 9, 1, 1));
 
         builder.addSeparator("Mapping to Attributes", cc.xywh(1, 11, 7, 1));
 
@@ -198,13 +198,13 @@ public class ObjAttributeInfoDialogView 
                 saveButton, cancelButton
         }), BorderLayout.SOUTH);
 
-        type.addActionListener(new ActionListener() {
+        typeComboBox.addActionListener(new ActionListener() {
 
             public void actionPerformed(ActionEvent e) {
                 boolean isType = false;
                 String[] typeNames = ModelerUtil.getRegisteredTypeNames();
                 for (int i = 0; i < typeNames.length; i++) {
-                    if (type.getSelectedItem() == null || typeNames[i].equals(type.getSelectedItem().toString()))
{
+                    if (typeComboBox.getSelectedItem() == null || typeNames[i].equals(typeComboBox.getSelectedItem().toString()))
{
                         isType = true;
                     }
                 }
@@ -214,14 +214,13 @@ public class ObjAttributeInfoDialogView 
                 while (embs.hasNext()) {
                     embNames.add(embs.next().getClassName());
                 }
-                
-                if (isType || !embNames.contains(type.getSelectedItem()) ) {
+
+                if (isType || !embNames.contains(typeComboBox.getSelectedItem())) {
                     ((CardLayout) typeManagerPane.getLayout()).show(typeManagerPane, FLATTENED_PANEL);
-                }
-                else {
+                } else {
                     ((CardLayout) typeManagerPane.getLayout()).show(typeManagerPane, EMBEDDABLE_PANEL);
                     getCurrentPathLabel().setText("");
-                    
+
                 }
             }
 
@@ -236,8 +235,8 @@ public class ObjAttributeInfoDialogView 
         return tablePreferences;
     }
 
-    public JComboBox getType() {
-        return type;
+    public JComboBox getTypeComboBox() {
+        return typeComboBox;
     }
 
     public MultiColumnBrowser getPathBrowser() {



Mime
View raw message