You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by sk...@apache.org on 2015/10/13 13:28:10 UTC
cayenne git commit: CAY-1999 | Unneeded Property import for
superclasses with no properties
Repository: cayenne
Updated Branches:
refs/heads/master 0ad40964e -> 42f4ebbd7
CAY-1999 | Unneeded Property import for superclasses with no properties
Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/42f4ebbd
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/42f4ebbd
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/42f4ebbd
Branch: refs/heads/master
Commit: 42f4ebbd7fb6ef034c349cd08829fef4a9ae686f
Parents: 0ad4096
Author: Savva Kolbachev <s....@gmail.com>
Authored: Tue Oct 13 14:26:38 2015 +0300
Committer: Savva Kolbachev <s....@gmail.com>
Committed: Tue Oct 13 14:26:38 2015 +0300
----------------------------------------------------------------------
.../src/main/resources/templates/v1_2/client-superclass.vm | 3 +--
.../src/main/resources/templates/v1_2/embeddable-singleclass.vm | 2 +-
.../src/main/resources/templates/v1_2/embeddable-superclass.vm | 2 +-
cayenne-tools/src/main/resources/templates/v1_2/singleclass.vm | 3 +--
cayenne-tools/src/main/resources/templates/v1_2/superclass.vm | 3 +--
5 files changed, 5 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cayenne/blob/42f4ebbd/cayenne-tools/src/main/resources/templates/v1_2/client-superclass.vm
----------------------------------------------------------------------
diff --git a/cayenne-tools/src/main/resources/templates/v1_2/client-superclass.vm b/cayenne-tools/src/main/resources/templates/v1_2/client-superclass.vm
index 7d8117c..bd457fa 100644
--- a/cayenne-tools/src/main/resources/templates/v1_2/client-superclass.vm
+++ b/cayenne-tools/src/main/resources/templates/v1_2/client-superclass.vm
@@ -36,8 +36,7 @@
${importUtils.setPackage($superPackageName)}##
${importUtils.addReservedType("${$superPackageName}.${superClassName}")}##
${importUtils.addType("${basePackageName}.${baseClassName}")}##
-#if((${object.DeclaredAttributes} and !${object.DeclaredAttributes.isEmpty()})
-or (${object.DeclaredRelationships} and !${object.DeclaredRelationships.isEmpty()}))
+#if((${object.DeclaredAttributes} && !${object.DeclaredAttributes.isEmpty()}) || (${object.DeclaredRelationships} && !${object.DeclaredRelationships.isEmpty()}))
${importUtils.addType('org.apache.cayenne.exp.Property')}##
#end
#foreach( $attr in ${object.DeclaredAttributes} )
http://git-wip-us.apache.org/repos/asf/cayenne/blob/42f4ebbd/cayenne-tools/src/main/resources/templates/v1_2/embeddable-singleclass.vm
----------------------------------------------------------------------
diff --git a/cayenne-tools/src/main/resources/templates/v1_2/embeddable-singleclass.vm b/cayenne-tools/src/main/resources/templates/v1_2/embeddable-singleclass.vm
index a51a714..b40c9ff 100644
--- a/cayenne-tools/src/main/resources/templates/v1_2/embeddable-singleclass.vm
+++ b/cayenne-tools/src/main/resources/templates/v1_2/embeddable-singleclass.vm
@@ -38,7 +38,7 @@ ${importUtils.setPackage($subPackageName)}##
${importUtils.addReservedType("${subPackageName}.${subClassName}")}##
${importUtils.addType("${basePackageName}.${baseClassName}")}##
${importUtils.addType("org.apache.cayenne.Persistent")}##
-#if(${object.Attributes} and !${object.Attributes.isEmpty()})
+#if(${object.Attributes} && !${object.Attributes.isEmpty()})
${importUtils.addType('org.apache.cayenne.exp.Property')}##
#end
#foreach( $attr in ${object.Attributes} )
http://git-wip-us.apache.org/repos/asf/cayenne/blob/42f4ebbd/cayenne-tools/src/main/resources/templates/v1_2/embeddable-superclass.vm
----------------------------------------------------------------------
diff --git a/cayenne-tools/src/main/resources/templates/v1_2/embeddable-superclass.vm b/cayenne-tools/src/main/resources/templates/v1_2/embeddable-superclass.vm
index 00efe07..8dd6a4c 100644
--- a/cayenne-tools/src/main/resources/templates/v1_2/embeddable-superclass.vm
+++ b/cayenne-tools/src/main/resources/templates/v1_2/embeddable-superclass.vm
@@ -38,7 +38,7 @@ ${importUtils.setPackage($superPackageName)}##
${importUtils.addReservedType("${superPackageName}.${superClassName}")}##
${importUtils.addType("${basePackageName}.${baseClassName}")}##
${importUtils.addType("org.apache.cayenne.Persistent")}##
-#if(${object.Attributes} and !${object.Attributes.isEmpty()})
+#if(${object.Attributes} && !${object.Attributes.isEmpty()})
${importUtils.addType('org.apache.cayenne.exp.Property')}##
#end
#foreach( $attr in ${object.Attributes} )
http://git-wip-us.apache.org/repos/asf/cayenne/blob/42f4ebbd/cayenne-tools/src/main/resources/templates/v1_2/singleclass.vm
----------------------------------------------------------------------
diff --git a/cayenne-tools/src/main/resources/templates/v1_2/singleclass.vm b/cayenne-tools/src/main/resources/templates/v1_2/singleclass.vm
index cf3e80d..540a8ad 100644
--- a/cayenne-tools/src/main/resources/templates/v1_2/singleclass.vm
+++ b/cayenne-tools/src/main/resources/templates/v1_2/singleclass.vm
@@ -36,8 +36,7 @@
${importUtils.setPackage($subPackageName)}##
${importUtils.addReservedType("${subPackageName}.${subClassName}")}##
${importUtils.addType("${basePackageName}.${baseClassName}")}##
-#if((${object.DeclaredAttributes} and !${object.DeclaredAttributes.isEmpty()})
-or (${object.DeclaredRelationships} and !${object.DeclaredRelationships.isEmpty()}))
+#if((${object.DeclaredAttributes} && !${object.DeclaredAttributes.isEmpty()}) || (${object.DeclaredRelationships} && !${object.DeclaredRelationships.isEmpty()}))
${importUtils.addType('org.apache.cayenne.exp.Property')}##
#end
#foreach( $attr in ${object.DeclaredAttributes} )
http://git-wip-us.apache.org/repos/asf/cayenne/blob/42f4ebbd/cayenne-tools/src/main/resources/templates/v1_2/superclass.vm
----------------------------------------------------------------------
diff --git a/cayenne-tools/src/main/resources/templates/v1_2/superclass.vm b/cayenne-tools/src/main/resources/templates/v1_2/superclass.vm
index 36747ac..4cee2be 100644
--- a/cayenne-tools/src/main/resources/templates/v1_2/superclass.vm
+++ b/cayenne-tools/src/main/resources/templates/v1_2/superclass.vm
@@ -35,8 +35,7 @@
${importUtils.setPackage($superPackageName)}##
${importUtils.addReservedType("${superPackageName}.${superClassName}")}##
${importUtils.addType("${basePackageName}.${baseClassName}")}##
-#if((${object.DeclaredAttributes} and !${object.DeclaredAttributes.isEmpty()})
-or (${object.DeclaredRelationships} and !${object.DeclaredRelationships.isEmpty()}))
+#if((${object.DeclaredAttributes} && !${object.DeclaredAttributes.isEmpty()}) || (${object.DeclaredRelationships} && !${object.DeclaredRelationships.isEmpty()}))
${importUtils.addType('org.apache.cayenne.exp.Property')}##
#end
#foreach( $attr in ${object.DeclaredAttributes} )