cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r958860 - in /cayenne/main/branches/STABLE-3.0: docs/doc/src/main/resources/ framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/ framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/dbentity/
Date Tue, 29 Jun 2010 08:01:45 GMT
Author: aadamchik
Date: Tue Jun 29 08:01:45 2010
New Revision: 958860

URL: http://svn.apache.org/viewvc?rev=958860&view=rev
Log:
CAY-1455 "NULL" JDBC type is shown for DbAttribute data types in the Modeler

* patch by Rostislav Kravchenko + some refactoring

Modified:
    cayenne/main/branches/STABLE-3.0/docs/doc/src/main/resources/RELEASE-NOTES.txt
    cayenne/main/branches/STABLE-3.0/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/TypesMapping.java
    cayenne/main/branches/STABLE-3.0/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/dbentity/DbEntityAttributeTab.java

Modified: cayenne/main/branches/STABLE-3.0/docs/doc/src/main/resources/RELEASE-NOTES.txt
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.0/docs/doc/src/main/resources/RELEASE-NOTES.txt?rev=958860&r1=958859&r2=958860&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.0/docs/doc/src/main/resources/RELEASE-NOTES.txt (original)
+++ cayenne/main/branches/STABLE-3.0/docs/doc/src/main/resources/RELEASE-NOTES.txt Tue Jun
29 08:01:45 2010
@@ -18,7 +18,8 @@ CAY-1354 Wrong Types mapping for selecte
 CAY-1380 Support for Escaped LIKE Clauses in Expressions
 CAY-1402 Ability to use Terminating "@size" in Nested Properties Against Collections
 CAY-1416 ExpressionFactory.noMatchExp.toEJBQL() produces incorrect output
-CAY-1417 EJBQL doesn't support null numeric parameters
+CAY-1417 EJBQL doesn't support null numeric parameters 
+CAY-1455 "NULL" JDBC type is shown for DbAttribute data types in the Modeler
 
 ----------------------------------
 Release: 3.0 (final) 

Modified: cayenne/main/branches/STABLE-3.0/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/TypesMapping.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.0/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/TypesMapping.java?rev=958860&r1=958859&r2=958860&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.0/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/TypesMapping.java
(original)
+++ cayenne/main/branches/STABLE-3.0/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/TypesMapping.java
Tue Jun 29 08:01:45 2010
@@ -27,6 +27,7 @@ import java.sql.SQLException;
 import java.sql.Types;
 import java.util.ArrayList;
 import java.util.Calendar;
+import java.util.Collection;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -259,9 +260,12 @@ public class TypesMapping {
                 || type == Types.NUMERIC;
     }
 
-    /** Returns an array of string names of the default JDBC data types. */
+    /** 
+     * Returns an array of string names of the default JDBC data types. 
+     */
     public static String[] getDatabaseTypes() {
-        return sqlStringType.keySet().toArray(new String[0]);
+        Collection<String> types = sqlStringType.keySet();
+        return types.toArray(new String[types.size()]);
     }
 
     /**

Modified: cayenne/main/branches/STABLE-3.0/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/dbentity/DbEntityAttributeTab.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.0/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/dbentity/DbEntityAttributeTab.java?rev=958860&r1=958859&r2=958860&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.0/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/dbentity/DbEntityAttributeTab.java
(original)
+++ cayenne/main/branches/STABLE-3.0/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/dbentity/DbEntityAttributeTab.java
Tue Jun 29 08:01:45 2010
@@ -136,7 +136,7 @@ public class DbEntityAttributeTab extend
 
         DbAttributeTableModel model = (DbAttributeTableModel) table.getModel();
         
-        List listAttrs = model.getObjectList();
+        List<?> listAttrs = model.getObjectList();
         int[] newSel = new int[attrs.length];
         
         for (int i = 0; i < attrs.length; i++) {
@@ -220,6 +220,9 @@ public class DbEntityAttributeTab extend
         String[] types = TypesMapping.getDatabaseTypes();
         JComboBox comboBox = CayenneWidgetFactory.createComboBox(types, true);
         
+        // Types.NULL makes no sense as a column type
+        comboBox.removeItem("NULL");
+        
         AutoCompletion.enable(comboBox);
         
         col.setCellEditor(CayenneWidgetFactory.createCellEditor(comboBox));



Mime
View raw message