cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject [08/11] cayenne git commit: CAY-2176 Java 7 diamond class generation templates
Date Sun, 18 Dec 2016 18:21:09 GMT
CAY-2176 Java 7 diamond class generation templates

* regenerated unit tests with the new templates and no String properties
* cleaned up String property refs in unit tests
* removing server-side Persistent tests (objects that do not inherit from CayenneDataObject)


Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/1510b054
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/1510b054
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/1510b054

Branch: refs/heads/master
Commit: 1510b054dfe4d0505ca56a88a146b41a43846bdd
Parents: 5042973
Author: Andrus Adamchik <andrus@objectstyle.com>
Authored: Sun Dec 18 19:18:18 2016 +0300
Committer: Andrus Adamchik <andrus@objectstyle.com>
Committed: Sun Dec 18 21:02:09 2016 +0300

----------------------------------------------------------------------
 .../cayenne/access/DataContextCharTypeIT.java   |   5 +-
 .../cayenne/access/ReturnTypesMappingIT.java    |   6 +-
 .../cayenne/query/SelectQueryReturnTypesIT.java |   8 +-
 .../return_types/auto/_ReturnTypesMap1.java     | 114 +++++++------------
 .../return_types/auto/_ReturnTypesMap2.java     |  17 +--
 .../return_types/auto/_ReturnTypesMapLobs1.java |  11 +-
 .../testdo/soft_delete/auto/_SoftDelete.java    |  17 +--
 .../table_primitives/auto/_TablePrimitives.java |  15 ++-
 .../test/resources/cayenne-small-testmap.xml    |   4 -
 9 files changed, 77 insertions(+), 120 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/1510b054/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextCharTypeIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextCharTypeIT.java
b/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextCharTypeIT.java
index cf84989..08983bc 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextCharTypeIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextCharTypeIT.java
@@ -21,7 +21,6 @@ package org.apache.cayenne.access;
 import org.apache.cayenne.ObjectContext;
 import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.exp.Expression;
-import org.apache.cayenne.exp.ExpressionFactory;
 import org.apache.cayenne.query.SelectQuery;
 import org.apache.cayenne.testdo.return_types.ReturnTypesMap1;
 import org.apache.cayenne.unit.UnitDbAdapter;
@@ -55,14 +54,14 @@ public class DataContextCharTypeIT extends ServerCase {
             
             context.commitChanges();
             
-            Expression qual = ExpressionFactory.matchExp(ReturnTypesMap1.CHAR_COLUMN_PROPERTY,
"  text");
+            Expression qual = ReturnTypesMap1.CHAR_COLUMN.eq("  text");
             SelectQuery query = new SelectQuery(ReturnTypesMap1.class, qual);
             List<ReturnTypesMap1> result =  context.performQuery(query);
             
             assertTrue("CHAR type trimming is not valid.", result.get(0).getCharColumn().startsWith("
 text"));
             assertTrue("CHAR type trimming is not valid.", result.get(1).getCharColumn().startsWith("
 text"));
             
-            qual = ExpressionFactory.matchExp(ReturnTypesMap1.CHAR_COLUMN_PROPERTY, "text");
+            qual = ReturnTypesMap1.CHAR_COLUMN.eq("text");
             query = new SelectQuery(ReturnTypesMap1.class, qual);
             result =  context.performQuery(query);
             

http://git-wip-us.apache.org/repos/asf/cayenne/blob/1510b054/cayenne-server/src/test/java/org/apache/cayenne/access/ReturnTypesMappingIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/ReturnTypesMappingIT.java
b/cayenne-server/src/test/java/org/apache/cayenne/access/ReturnTypesMappingIT.java
index 6fe3937..9bb40ff 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/ReturnTypesMappingIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/ReturnTypesMappingIT.java
@@ -261,7 +261,7 @@ public class    ReturnTypesMappingIT extends ServerCase {
         ReturnTypesMap1 test = context.newObject(ReturnTypesMap1.class);
 
         String charValue = "درخت‌های جستجوی متوازن، نیازی ندارد
که به صورت!";
-        test.setNCharColumn(charValue);
+        test.setNcharColumn(charValue);
         context.commitChanges();
 		
         DataRow testRead = (DataRow) context.performQuery(MappedSelect.query("SelectReturnTypesMap1")).get(0);
@@ -324,7 +324,7 @@ public class    ReturnTypesMappingIT extends ServerCase {
                         "\"Balanced,\" \"Broad,\" یا \"Bushy\" ممکن است استفاده
شده‌باشند [چون همهٔ برگ‌ها در یک سطح قرار دارند].
دیگران اظهار داشتند که حرف \"B\" از کلمهٔ بوئینگ گرفته
شده است [به این دلیل که پدیدآوردنده درسال 1972 در آزمایشگاه‌های
تحقیقاتی علمی شرکت بوئینگ کار می‌کرد]. با این وجود
پنداشتن درخت بی به عنوان درخت \"بِیِر\" نیز درخور است.[۲]");
             }
             String clobValue = buffer.toString();
-            test.setNClobColumn(clobValue);
+            test.setNclobColumn(clobValue);
             context.commitChanges();
 			
             DataRow testRead = (DataRow) context.performQuery(MappedSelect.query("SelectReturnTypesLobsMap1")).get(0);
@@ -903,7 +903,7 @@ public class    ReturnTypesMappingIT extends ServerCase {
         ReturnTypesMap1 test = context.newObject(ReturnTypesMap1.class);
 
         String varcharValue = "ی متوازن، نیازی ندارد که ب";
-        test.setNVarcharColumn(varcharValue);
+        test.setNvarcharColumn(varcharValue);
         context.commitChanges();
 		
         DataRow testRead = (DataRow) context.performQuery(MappedSelect.query("SelectReturnTypesMap1")).get(0);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/1510b054/cayenne-server/src/test/java/org/apache/cayenne/query/SelectQueryReturnTypesIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/query/SelectQueryReturnTypesIT.java
b/cayenne-server/src/test/java/org/apache/cayenne/query/SelectQueryReturnTypesIT.java
index 2bb20c5..6c0a06a 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/query/SelectQueryReturnTypesIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/query/SelectQueryReturnTypesIT.java
@@ -76,7 +76,7 @@ public class SelectQueryReturnTypesIT extends ServerCase {
         createNumericsDataSet();
 
         // to simplify result checking, do double NOT
-        Expression left = new ASTBitwiseNot(new ASTBitwiseNot(new ASTObjPath(ReturnTypesMap1.INTEGER_COLUMN_PROPERTY)));
+        Expression left = new ASTBitwiseNot(new ASTBitwiseNot(new ASTObjPath(ReturnTypesMap1.INTEGER_COLUMN.getName())));
         Expression right = new ASTScalar(2);
         Expression greater = new ASTGreater();
         greater.setOperand(0, left);
@@ -99,7 +99,7 @@ public class SelectQueryReturnTypesIT extends ServerCase {
         createNumericsDataSet();
 
         // to simplify result checking, do double NOT
-        Expression left = new ASTBitwiseOr(new Object[] { new ASTObjPath(ReturnTypesMap1.INTEGER_COLUMN_PROPERTY),
+        Expression left = new ASTBitwiseOr(new Object[] { new ASTObjPath(ReturnTypesMap1.INTEGER_COLUMN.getName()),
                 new ASTScalar(1) });
         Expression right = new ASTScalar(1);
         Expression equal = new ASTEqual();
@@ -123,7 +123,7 @@ public class SelectQueryReturnTypesIT extends ServerCase {
         createNumericsDataSet();
 
         // to simplify result checking, do double NOT
-        Expression left = new ASTBitwiseAnd(new Object[] { new ASTObjPath(ReturnTypesMap1.INTEGER_COLUMN_PROPERTY),
+        Expression left = new ASTBitwiseAnd(new Object[] { new ASTObjPath(ReturnTypesMap1.INTEGER_COLUMN.getName()),
                 new ASTScalar(1) });
         Expression right = new ASTScalar(0);
         Expression equal = new ASTEqual();
@@ -147,7 +147,7 @@ public class SelectQueryReturnTypesIT extends ServerCase {
         createNumericsDataSet();
 
         // to simplify result checking, do double NOT
-        Expression left = new ASTBitwiseXor(new Object[] { new ASTObjPath(ReturnTypesMap1.INTEGER_COLUMN_PROPERTY),
+        Expression left = new ASTBitwiseXor(new Object[] { new ASTObjPath(ReturnTypesMap1.INTEGER_COLUMN.getName()),
                 new ASTScalar(1) });
         Expression right = new ASTScalar(5);
         Expression equal = new ASTEqual();

http://git-wip-us.apache.org/repos/asf/cayenne/blob/1510b054/cayenne-server/src/test/java/org/apache/cayenne/testdo/return_types/auto/_ReturnTypesMap1.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/return_types/auto/_ReturnTypesMap1.java
b/cayenne-server/src/test/java/org/apache/cayenne/testdo/return_types/auto/_ReturnTypesMap1.java
index df8f17a..93d0249 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/return_types/auto/_ReturnTypesMap1.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/return_types/auto/_ReturnTypesMap1.java
@@ -1,11 +1,11 @@
 package org.apache.cayenne.testdo.return_types.auto;
 
-import java.math.BigDecimal;
-import java.util.Date;
-
 import org.apache.cayenne.CayenneDataObject;
 import org.apache.cayenne.exp.Property;
 
+import java.math.BigDecimal;
+import java.util.Date;
+
 /**
  * Class _ReturnTypesMap1 was generated by Cayenne.
  * It is probably a good idea to avoid changing this class manually,
@@ -16,60 +16,28 @@ public abstract class _ReturnTypesMap1 extends CayenneDataObject {
 
     private static final long serialVersionUID = 1L; 
 
-    @Deprecated
-    public static final String BIGINT_COLUMN_PROPERTY = "bigintColumn";
-    @Deprecated
-    public static final String BIT_COLUMN_PROPERTY = "bitColumn";
-    @Deprecated
-    public static final String BOOLEAN_COLUMN_PROPERTY = "booleanColumn";
-    @Deprecated
-    public static final String CHAR_COLUMN_PROPERTY = "charColumn";
-    @Deprecated
-    public static final String DATE_COLUMN_PROPERTY = "dateColumn";
-    @Deprecated
-    public static final String DECIMAL_COLUMN_PROPERTY = "decimalColumn";
-    @Deprecated
-    public static final String DOUBLE_COLUMN_PROPERTY = "doubleColumn";
-    @Deprecated
-    public static final String FLOAT_COLUMN_PROPERTY = "floatColumn";
-    @Deprecated
-    public static final String INTEGER_COLUMN_PROPERTY = "integerColumn";
-    @Deprecated
-    public static final String LONGVARCHAR_COLUMN_PROPERTY = "longvarcharColumn";
-    @Deprecated
-    public static final String NUMERIC_COLUMN_PROPERTY = "numericColumn";
-    @Deprecated
-    public static final String REAL_COLUMN_PROPERTY = "realColumn";
-    @Deprecated
-    public static final String SMALLINT_COLUMN_PROPERTY = "smallintColumn";
-    @Deprecated
-    public static final String TIME_COLUMN_PROPERTY = "timeColumn";
-    @Deprecated
-    public static final String TIMESTAMP_COLUMN_PROPERTY = "timestampColumn";
-    @Deprecated
-    public static final String TINYINT_COLUMN_PROPERTY = "tinyintColumn";
-    @Deprecated
-    public static final String VARCHAR_COLUMN_PROPERTY = "varcharColumn";
-
     public static final String AAAID_PK_COLUMN = "AAAID";
 
-    public static final Property<Long> BIGINT_COLUMN = new Property<Long>("bigintColumn");
-    public static final Property<Boolean> BIT_COLUMN = new Property<Boolean>("bitColumn");
-    public static final Property<Boolean> BOOLEAN_COLUMN = new Property<Boolean>("booleanColumn");
-    public static final Property<String> CHAR_COLUMN = new Property<String>("charColumn");
-    public static final Property<Date> DATE_COLUMN = new Property<Date>("dateColumn");
-    public static final Property<BigDecimal> DECIMAL_COLUMN = new Property<BigDecimal>("decimalColumn");
-    public static final Property<Double> DOUBLE_COLUMN = new Property<Double>("doubleColumn");
-    public static final Property<Float> FLOAT_COLUMN = new Property<Float>("floatColumn");
-    public static final Property<Integer> INTEGER_COLUMN = new Property<Integer>("integerColumn");
-    public static final Property<String> LONGVARCHAR_COLUMN = new Property<String>("longvarcharColumn");
-    public static final Property<BigDecimal> NUMERIC_COLUMN = new Property<BigDecimal>("numericColumn");
-    public static final Property<Float> REAL_COLUMN = new Property<Float>("realColumn");
-    public static final Property<Short> SMALLINT_COLUMN = new Property<Short>("smallintColumn");
-    public static final Property<Date> TIME_COLUMN = new Property<Date>("timeColumn");
-    public static final Property<Date> TIMESTAMP_COLUMN = new Property<Date>("timestampColumn");
-    public static final Property<Byte> TINYINT_COLUMN = new Property<Byte>("tinyintColumn");
-    public static final Property<String> VARCHAR_COLUMN = new Property<String>("varcharColumn");
+    public static final Property<Long> BIGINT_COLUMN = new Property<>("bigintColumn");
+    public static final Property<Boolean> BIT_COLUMN = new Property<>("bitColumn");
+    public static final Property<Boolean> BOOLEAN_COLUMN = new Property<>("booleanColumn");
+    public static final Property<String> CHAR_COLUMN = new Property<>("charColumn");
+    public static final Property<Date> DATE_COLUMN = new Property<>("dateColumn");
+    public static final Property<BigDecimal> DECIMAL_COLUMN = new Property<>("decimalColumn");
+    public static final Property<Double> DOUBLE_COLUMN = new Property<>("doubleColumn");
+    public static final Property<Float> FLOAT_COLUMN = new Property<>("floatColumn");
+    public static final Property<Integer> INTEGER_COLUMN = new Property<>("integerColumn");
+    public static final Property<String> LONGNVARCHAR_COLUMN = new Property<>("longnvarcharColumn");
+    public static final Property<String> LONGVARCHAR_COLUMN = new Property<>("longvarcharColumn");
+    public static final Property<String> NCHAR_COLUMN = new Property<>("ncharColumn");
+    public static final Property<BigDecimal> NUMERIC_COLUMN = new Property<>("numericColumn");
+    public static final Property<String> NVARCHAR_COLUMN = new Property<>("nvarcharColumn");
+    public static final Property<Float> REAL_COLUMN = new Property<>("realColumn");
+    public static final Property<Short> SMALLINT_COLUMN = new Property<>("smallintColumn");
+    public static final Property<Date> TIME_COLUMN = new Property<>("timeColumn");
+    public static final Property<Date> TIMESTAMP_COLUMN = new Property<>("timestampColumn");
+    public static final Property<Byte> TINYINT_COLUMN = new Property<>("tinyintColumn");
+    public static final Property<String> VARCHAR_COLUMN = new Property<>("varcharColumn");
 
     public void setBigintColumn(Long bigintColumn) {
         writeProperty("bigintColumn", bigintColumn);
@@ -99,13 +67,6 @@ public abstract class _ReturnTypesMap1 extends CayenneDataObject {
         return (String)readProperty("charColumn");
     }
 
-    public void setNCharColumn(String ncharColumn) {
-        writeProperty("ncharColumn", ncharColumn);
-    }
-    public String getNCharColumn() {
-        return (String)readProperty("ncharColumn");
-    }
-
     public void setDateColumn(Date dateColumn) {
         writeProperty("dateColumn", dateColumn);
     }
@@ -141,6 +102,13 @@ public abstract class _ReturnTypesMap1 extends CayenneDataObject {
         return (Integer)readProperty("integerColumn");
     }
 
+    public void setLongnvarcharColumn(String longnvarcharColumn) {
+        writeProperty("longnvarcharColumn", longnvarcharColumn);
+    }
+    public String getLongnvarcharColumn() {
+        return (String)readProperty("longnvarcharColumn");
+    }
+
     public void setLongvarcharColumn(String longvarcharColumn) {
         writeProperty("longvarcharColumn", longvarcharColumn);
     }
@@ -148,11 +116,11 @@ public abstract class _ReturnTypesMap1 extends CayenneDataObject {
         return (String)readProperty("longvarcharColumn");
     }
 
-    public void setLongnvarcharColumn(String longnvarcharColumn) {
-        writeProperty("longnvarcharColumn", longnvarcharColumn);
+    public void setNcharColumn(String ncharColumn) {
+        writeProperty("ncharColumn", ncharColumn);
     }
-    public String getLongnvarcharColumn() {
-        return (String)readProperty("longnvarcharColumn");
+    public String getNcharColumn() {
+        return (String)readProperty("ncharColumn");
     }
 
     public void setNumericColumn(BigDecimal numericColumn) {
@@ -162,6 +130,13 @@ public abstract class _ReturnTypesMap1 extends CayenneDataObject {
         return (BigDecimal)readProperty("numericColumn");
     }
 
+    public void setNvarcharColumn(String nvarcharColumn) {
+        writeProperty("nvarcharColumn", nvarcharColumn);
+    }
+    public String getNvarcharColumn() {
+        return (String)readProperty("nvarcharColumn");
+    }
+
     public void setRealColumn(Float realColumn) {
         writeProperty("realColumn", realColumn);
     }
@@ -197,13 +172,6 @@ public abstract class _ReturnTypesMap1 extends CayenneDataObject {
         return (Byte)readProperty("tinyintColumn");
     }
 
-    public void setNVarcharColumn(String nvarcharColumn) {
-        writeProperty("nvarcharColumn", nvarcharColumn);
-    }
-    public String getNVarcharColumn() {
-        return (String)readProperty("nvarcharColumn");
-    }
-
     public void setVarcharColumn(String varcharColumn) {
         writeProperty("varcharColumn", varcharColumn);
     }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/1510b054/cayenne-server/src/test/java/org/apache/cayenne/testdo/return_types/auto/_ReturnTypesMap2.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/return_types/auto/_ReturnTypesMap2.java
b/cayenne-server/src/test/java/org/apache/cayenne/testdo/return_types/auto/_ReturnTypesMap2.java
index ece568c..8c3c57c 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/return_types/auto/_ReturnTypesMap2.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/return_types/auto/_ReturnTypesMap2.java
@@ -13,21 +13,12 @@ public abstract class _ReturnTypesMap2 extends CayenneDataObject {
 
     private static final long serialVersionUID = 1L; 
 
-    @Deprecated
-    public static final String BINARY_COLUMN_PROPERTY = "binaryColumn";
-    @Deprecated
-    public static final String BLOB_COLUMN_PROPERTY = "blobColumn";
-    @Deprecated
-    public static final String LONGVARBINARY_COLUMN_PROPERTY = "longvarbinaryColumn";
-    @Deprecated
-    public static final String VARBINARY_COLUMN_PROPERTY = "varbinaryColumn";
-
     public static final String AAAID_PK_COLUMN = "AAAID";
 
-    public static final Property<byte[]> BINARY_COLUMN = new Property<byte[]>("binaryColumn");
-    public static final Property<byte[]> BLOB_COLUMN = new Property<byte[]>("blobColumn");
-    public static final Property<byte[]> LONGVARBINARY_COLUMN = new Property<byte[]>("longvarbinaryColumn");
-    public static final Property<byte[]> VARBINARY_COLUMN = new Property<byte[]>("varbinaryColumn");
+    public static final Property<byte[]> BINARY_COLUMN = new Property<>("binaryColumn");
+    public static final Property<byte[]> BLOB_COLUMN = new Property<>("blobColumn");
+    public static final Property<byte[]> LONGVARBINARY_COLUMN = new Property<>("longvarbinaryColumn");
+    public static final Property<byte[]> VARBINARY_COLUMN = new Property<>("varbinaryColumn");
 
     public void setBinaryColumn(byte[] binaryColumn) {
         writeProperty("binaryColumn", binaryColumn);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/1510b054/cayenne-server/src/test/java/org/apache/cayenne/testdo/return_types/auto/_ReturnTypesMapLobs1.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/return_types/auto/_ReturnTypesMapLobs1.java
b/cayenne-server/src/test/java/org/apache/cayenne/testdo/return_types/auto/_ReturnTypesMapLobs1.java
index 29bc39c..53b7aa7 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/return_types/auto/_ReturnTypesMapLobs1.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/return_types/auto/_ReturnTypesMapLobs1.java
@@ -13,13 +13,10 @@ public abstract class _ReturnTypesMapLobs1 extends CayenneDataObject {
 
     private static final long serialVersionUID = 1L; 
 
-    @Deprecated
-    public static final String CLOB_COLUMN_PROPERTY = "clobColumn";
-
     public static final String AAAID_PK_COLUMN = "AAAID";
 
-    public static final Property<String> CLOB_COLUMN = new Property<String>("clobColumn");
-    public static final Property<String> NCLOB_COLUMN = new Property<String>("nclobColumn");
+    public static final Property<String> CLOB_COLUMN = new Property<>("clobColumn");
+    public static final Property<String> NCLOB_COLUMN = new Property<>("nclobColumn");
 
     public void setClobColumn(String clobColumn) {
         writeProperty("clobColumn", clobColumn);
@@ -28,10 +25,10 @@ public abstract class _ReturnTypesMapLobs1 extends CayenneDataObject {
         return (String)readProperty("clobColumn");
     }
 
-    public void setNClobColumn(String nclobColumn) {
+    public void setNclobColumn(String nclobColumn) {
         writeProperty("nclobColumn", nclobColumn);
     }
-    public String getNClobColumn() {
+    public String getNclobColumn() {
         return (String)readProperty("nclobColumn");
     }
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/1510b054/cayenne-server/src/test/java/org/apache/cayenne/testdo/soft_delete/auto/_SoftDelete.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/soft_delete/auto/_SoftDelete.java
b/cayenne-server/src/test/java/org/apache/cayenne/testdo/soft_delete/auto/_SoftDelete.java
index 363490f..a3dded8 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/soft_delete/auto/_SoftDelete.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/soft_delete/auto/_SoftDelete.java
@@ -1,32 +1,35 @@
 package org.apache.cayenne.testdo.soft_delete.auto;
 
 import org.apache.cayenne.CayenneDataObject;
+import org.apache.cayenne.exp.Property;
 
 /**
- * Class _SoftTest was generated by Cayenne.
+ * Class _SoftDelete was generated by Cayenne.
  * It is probably a good idea to avoid changing this class manually,
  * since it may be overwritten next time code is regenerated.
  * If you need to make any customizations, please use subclass.
  */
 public abstract class _SoftDelete extends CayenneDataObject {
 
-    public static final String DELETED_PROPERTY = "deleted";
-    public static final String NAME_PROPERTY = "name";
+    private static final long serialVersionUID = 1L; 
 
     public static final String ID_PK_COLUMN = "ID";
 
+    public static final Property<Boolean> DELETED = new Property<>("deleted");
+    public static final Property<String> NAME = new Property<>("name");
+
     public void setDeleted(Boolean deleted) {
-        writeProperty(DELETED_PROPERTY, deleted);
+        writeProperty("deleted", deleted);
     }
     public Boolean getDeleted() {
-        return (Boolean)readProperty(DELETED_PROPERTY);
+        return (Boolean)readProperty("deleted");
     }
 
     public void setName(String name) {
-        writeProperty(NAME_PROPERTY, name);
+        writeProperty("name", name);
     }
     public String getName() {
-        return (String)readProperty(NAME_PROPERTY);
+        return (String)readProperty("name");
     }
 
     protected abstract void onPrePersist();

http://git-wip-us.apache.org/repos/asf/cayenne/blob/1510b054/cayenne-server/src/test/java/org/apache/cayenne/testdo/table_primitives/auto/_TablePrimitives.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/table_primitives/auto/_TablePrimitives.java
b/cayenne-server/src/test/java/org/apache/cayenne/testdo/table_primitives/auto/_TablePrimitives.java
index bed40fc..bc55726 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/table_primitives/auto/_TablePrimitives.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/table_primitives/auto/_TablePrimitives.java
@@ -1,6 +1,7 @@
 package org.apache.cayenne.testdo.table_primitives.auto;
 
 import org.apache.cayenne.CayenneDataObject;
+import org.apache.cayenne.exp.Property;
 
 /**
  * Class _TablePrimitives was generated by Cayenne.
@@ -10,24 +11,26 @@ import org.apache.cayenne.CayenneDataObject;
  */
 public abstract class _TablePrimitives extends CayenneDataObject {
 
-    public static final String BOOLEAN_COLUMN_PROPERTY = "booleanColumn";
-    public static final String INT_COLUMN_PROPERTY = "intColumn";
+    private static final long serialVersionUID = 1L; 
 
     public static final String ID_PK_COLUMN = "ID";
 
+    public static final Property<Boolean> BOOLEAN_COLUMN = new Property<>("booleanColumn");
+    public static final Property<Integer> INT_COLUMN = new Property<>("intColumn");
+
     public void setBooleanColumn(boolean booleanColumn) {
-        writeProperty(BOOLEAN_COLUMN_PROPERTY, booleanColumn);
+        writeProperty("booleanColumn", booleanColumn);
     }
 	public boolean isBooleanColumn() {
-        Boolean value = (Boolean)readProperty(BOOLEAN_COLUMN_PROPERTY);
+        Boolean value = (Boolean)readProperty("booleanColumn");
         return (value != null) ? value.booleanValue() : false;
     }
 
     public void setIntColumn(int intColumn) {
-        writeProperty(INT_COLUMN_PROPERTY, intColumn);
+        writeProperty("intColumn", intColumn);
     }
     public int getIntColumn() {
-        Object value = readProperty(INT_COLUMN_PROPERTY);
+        Object value = readProperty("intColumn");
         return (value != null) ? (Integer) value : 0;
     }
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/1510b054/cayenne-server/src/test/resources/cayenne-small-testmap.xml
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/resources/cayenne-small-testmap.xml b/cayenne-server/src/test/resources/cayenne-small-testmap.xml
deleted file mode 100644
index 6c7d55b..0000000
--- a/cayenne-server/src/test/resources/cayenne-small-testmap.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<domain project-version="9">
-	<map name="small-testmap"/>
-</domain>


Mime
View raw message