[openjpa] branch master updated: OPENJPA-2555 rename DBDictionary property to dateFractionDigits

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[openjpa] branch master updated: OPENJPA-2555 rename DBDictionary property to dateFractionDigits

struberg
This is an automated email from the ASF dual-hosted git repository.

struberg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openjpa.git


The following commit(s) were added to refs/heads/master by this push:
     new a7969c1  OPENJPA-2555 rename DBDictionary property to dateFractionDigits
a7969c1 is described below

commit a7969c120bfba06b883f319788fc50ca0ef06b69
Author: Mark Struberg <[hidden email]>
AuthorDate: Fri Apr 5 13:58:05 2019 +0200

    OPENJPA-2555 rename DBDictionary property to dateFractionDigits
   
    dateFractionDigits is more self-explaning than defaultFractionDigits.
    It also fits better into the already existing date* config settings.
---
 .../main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java    | 10 +++++-----
 .../java/org/apache/openjpa/jdbc/sql/MariaDBDictionary.java    |  2 +-
 .../main/java/org/apache/openjpa/jdbc/sql/MySQLDictionary.java |  2 +-
 .../apache/openjpa/persistence/TestMixedMappingLocation.java   |  2 +-
 .../apache/openjpa/persistence/access/TestExplicitAccess.java  |  2 +-
 .../openjpa/persistence/access/xml/TestXMLExplicitAccess.java  |  2 +-
 .../persistence/jdbc/maps/m2mmapex10/TestMany2ManyMapEx10.java |  2 +-
 .../apache/openjpa/persistence/jdbc/query/TestHintedQuery.java |  2 +-
 .../jdbc/query/TestTemporalTypeQueryParameterBinding.java      |  2 +-
 .../apache/openjpa/persistence/xml/TestSimpleXmlEntity.java    |  2 +-
 .../apache/openjpa/persistence/xml/TestXmlOverrideEntity.java  |  2 +-
 11 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
index 903f3b6..22ac05c 100644
--- a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
+++ b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
@@ -451,9 +451,9 @@ public class DBDictionary
      * This value is only being used if no explicit {@code @Column(scale=n)} is set or n is zero.
      * Use {@code @Column(scale=-1)} to disable the explicit fraction part in the SQL generator.
      * @see #fractionalTypeNameSet
-     * @see #getFractionLength(Column, String)
+     * @see #getDateFractionDigits(Column, String)
      */
-    public int defaultFractionLength = 6;
+    public int dateFractionDigits = 6;
 
 
     protected final Set<String> typeModifierSet = new HashSet<>();
@@ -2009,7 +2009,7 @@ public class DBDictionary
                 colSize = col.getDecimalDigits() == -1 ? 0 : col.getDecimalDigits();
             }
             else {
-                colSize = getFractionLength(col, typeName);
+                colSize = getDateFractionDigits(col, typeName);
             }
             size = "(" + colSize + ")";
         } else if (colSize > 0) {
@@ -2030,8 +2030,8 @@ public class DBDictionary
      * @return the fraction length of types which have a fraction
      * @see #fractionalTypeNameSet
      */
-    protected int getFractionLength(Column col, String typeName) {
-        return defaultFractionLength;
+    protected int getDateFractionDigits(Column col, String typeName) {
+        return dateFractionDigits;
     }
 
     /**
diff --git a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/MariaDBDictionary.java b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/MariaDBDictionary.java
index 454288c..c377954 100644
--- a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/MariaDBDictionary.java
+++ b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/MariaDBDictionary.java
@@ -166,7 +166,7 @@ public class MariaDBDictionary extends DBDictionary {
 
         fixedSizeTypeNameSet.remove("NUMERIC");
 
-        defaultFractionLength = 0;
+        dateFractionDigits = 0;
     }
 
     @Override
diff --git a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/MySQLDictionary.java b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/MySQLDictionary.java
index 256bd36..31aa326 100644
--- a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/MySQLDictionary.java
+++ b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/MySQLDictionary.java
@@ -167,7 +167,7 @@ public class MySQLDictionary
 
         fixedSizeTypeNameSet.remove("NUMERIC");
 
-        defaultFractionLength = 0;
+        dateFractionDigits = 0;
     }
 
     @Override
diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/TestMixedMappingLocation.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/TestMixedMappingLocation.java
index ea09d09..27ebac7 100644
--- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/TestMixedMappingLocation.java
+++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/TestMixedMappingLocation.java
@@ -33,7 +33,7 @@ public class TestMixedMappingLocation extends SingleEMFTestCase {
     @Override
     public void setUp() {
         setUp(DROP_TABLES,
-                "openjpa.jdbc.DBDictionary", "(defaultFractionLength=6)",
+                "openjpa.jdbc.DBDictionary", "(dateFractionDigits=6)",
                 MixedMappingLocationEmbeddedId.class, MixedMappingLocation.class);
     }
     /**
diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/TestExplicitAccess.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/TestExplicitAccess.java
index 1878769..7d186732 100644
--- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/TestExplicitAccess.java
+++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/TestExplicitAccess.java
@@ -41,7 +41,7 @@ public class TestExplicitAccess extends SingleEMFTestCase {
     @Override
     public void setUp() {
         setUp(CLEAR_TABLES,
-            "openjpa.jdbc.DBDictionary", "(defaultFractionLength=6)",
+            "openjpa.jdbc.DBDictionary", "(dateFractionDigits=6)",
             PropAccess.class, FieldAccess.class,
             DefFieldMixedPropAccess.class , DefPropMixedFieldAccess.class,
             AbstractMappedSuperField.class, PropertySub.class,
diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/xml/TestXMLExplicitAccess.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/xml/TestXMLExplicitAccess.java
index 8891028..7d047b0 100644
--- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/xml/TestXMLExplicitAccess.java
+++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/xml/TestXMLExplicitAccess.java
@@ -34,7 +34,7 @@ public class TestXMLExplicitAccess extends SingleEMFTestCase {
     @Override
     public void setUp() throws Exception {
         super.setUp(CLEAR_TABLES,
-                "openjpa.jdbc.DBDictionary", "(defaultFractionLength=6)");
+                "openjpa.jdbc.DBDictionary", "(dateFractionDigits=6)");
     }
 
 
diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/maps/m2mmapex10/TestMany2ManyMapEx10.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/maps/m2mmapex10/TestMany2ManyMapEx10.java
index 5495d30..636ccec 100644
--- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/maps/m2mmapex10/TestMany2ManyMapEx10.java
+++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/maps/m2mmapex10/TestMany2ManyMapEx10.java
@@ -60,7 +60,7 @@ public class TestMany2ManyMapEx10 extends SQLListenerTestCase {
     @Override
     public void setUp() {
         super.setUp(DROP_TABLES,
-                "openjpa.jdbc.DBDictionary", "(defaultFractionLength=6)",
+                "openjpa.jdbc.DBDictionary", "(dateFractionDigits=6)",
                 EmployeePK.class, PhonePK.class,
                 Employee.class, PhoneNumber.class);
         createObj();
diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/query/TestHintedQuery.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/query/TestHintedQuery.java
index c1165db..4fc7b6c 100644
--- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/query/TestHintedQuery.java
+++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/query/TestHintedQuery.java
@@ -39,7 +39,7 @@ public class TestHintedQuery extends SQLListenerTestCase {
     @Override
     public void setUp() {
         super.setUp(CLEAR_TABLES,
-                "openjpa.jdbc.DBDictionary", "(defaultFractionLength=6)",
+                "openjpa.jdbc.DBDictionary", "(dateFractionDigits=6)",
                 TimeKeeper.class);
     }
 
diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/query/TestTemporalTypeQueryParameterBinding.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/query/TestTemporalTypeQueryParameterBinding.java
index a4f4c2a..90c9cbd 100644
--- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/query/TestTemporalTypeQueryParameterBinding.java
+++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/query/TestTemporalTypeQueryParameterBinding.java
@@ -64,7 +64,7 @@ public class TestTemporalTypeQueryParameterBinding extends SingleEMFTestCase {
     @Override
     public void setUp() throws Exception {
         super.setUp(CLEAR_TABLES,
-                "openjpa.jdbc.DBDictionary", "(defaultFractionLength=6)",
+                "openjpa.jdbc.DBDictionary", "(dateFractionDigits=6)",
                 TimeKeeper.class, TimeEntity.class);
         em = emf.createEntityManager();
 
diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/xml/TestSimpleXmlEntity.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/xml/TestSimpleXmlEntity.java
index 0016d57..60bdc16 100644
--- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/xml/TestSimpleXmlEntity.java
+++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/xml/TestSimpleXmlEntity.java
@@ -27,7 +27,7 @@ public class TestSimpleXmlEntity
     @Override
     public void setUp() {
         setUp(CLEAR_TABLES,
-                "openjpa.jdbc.DBDictionary", "(defaultFractionLength=6)",
+                "openjpa.jdbc.DBDictionary", "(dateFractionDigits=6)",
                 org.apache.openjpa.persistence.embed.attrOverrides.AnnoOverEmbed.class);
     }
 
diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/xml/TestXmlOverrideEntity.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/xml/TestXmlOverrideEntity.java
index 9a8fcb7..9c29a77 100644
--- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/xml/TestXmlOverrideEntity.java
+++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/xml/TestXmlOverrideEntity.java
@@ -36,7 +36,7 @@ public class TestXmlOverrideEntity extends SingleEMFTestCase {
     @Override
     public void setUp() throws ClassNotFoundException {
         setUp(CLEAR_TABLES,
-                "openjpa.jdbc.DBDictionary", "(defaultFractionLength=6)",
+                "openjpa.jdbc.DBDictionary", "(dateFractionDigits=6)",
                 org.apache.openjpa.persistence.embed.attrOverrides.AnnoOverEmbed.class);
 
         // make sure that XmlOverrideEntity is registered for our metadata tests