@cronapp/templates 4.3.0 → 4.4.0-RC.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -30,10 +30,8 @@ public class ${clazz.name + "PK"} implements Serializable {
|
|
|
30
30
|
private static final long serialVersionUID = 1L;
|
|
31
31
|
<#list clazz.adjustedPrimaryKeys as field>
|
|
32
32
|
<#assign name = "${field.name}">
|
|
33
|
-
<#if field.
|
|
34
|
-
<#
|
|
35
|
-
<#assign name = "${field.name?string[0..field.name?last_index_of('_') - 1]}">
|
|
36
|
-
</#if>
|
|
33
|
+
<#if field.pathName?has_content && field.pathName?contains('.')>
|
|
34
|
+
<#assign name = "${field.pathName?string[0..field.pathName?index_of('.') - 1]}">
|
|
37
35
|
</#if>
|
|
38
36
|
|
|
39
37
|
/**
|
|
@@ -51,10 +49,8 @@ public class ${clazz.name + "PK"} implements Serializable {
|
|
|
51
49
|
|
|
52
50
|
<#list clazz.adjustedPrimaryKeys as field>
|
|
53
51
|
<#assign name = "${field.name}">
|
|
54
|
-
<#if field.
|
|
55
|
-
<#
|
|
56
|
-
<#assign name = "${field.name?string[0..field.name?last_index_of('_') - 1]}">
|
|
57
|
-
</#if>
|
|
52
|
+
<#if field.pathName?has_content && field.pathName?contains('.')>
|
|
53
|
+
<#assign name = "${field.pathName?string[0..field.pathName?index_of('.') - 1]}">
|
|
58
54
|
</#if>
|
|
59
55
|
/**
|
|
60
56
|
* Obtém ${name}
|
|
@@ -86,10 +82,8 @@ public class ${clazz.name + "PK"} implements Serializable {
|
|
|
86
82
|
${clazz.name + "PK"} object = (${clazz.name + "PK"})obj;
|
|
87
83
|
<#list clazz.adjustedPrimaryKeys as field>
|
|
88
84
|
<#assign name = "${field.name}">
|
|
89
|
-
<#if field.
|
|
90
|
-
<#
|
|
91
|
-
<#assign name = "${field.name?string[0..field.name?last_index_of('_') - 1]}">
|
|
92
|
-
</#if>
|
|
85
|
+
<#if field.pathName?has_content && field.pathName?contains('.')>
|
|
86
|
+
<#assign name = "${field.pathName?string[0..field.pathName?index_of('.') - 1]}">
|
|
93
87
|
</#if>
|
|
94
88
|
if (${name} != null ? !${name}.equals(object.${name}) : object.${name} != null) return false;
|
|
95
89
|
</#list>
|
|
@@ -104,10 +98,8 @@ ${clazz.name + "PK"} object = (${clazz.name + "PK"})obj;
|
|
|
104
98
|
int result = 1;
|
|
105
99
|
<#list clazz.adjustedPrimaryKeys as field>
|
|
106
100
|
<#assign name = "${field.name}">
|
|
107
|
-
<#if field.
|
|
108
|
-
<#
|
|
109
|
-
<#assign name = "${field.name?string[0..field.name?last_index_of('_') - 1]}">
|
|
110
|
-
</#if>
|
|
101
|
+
<#if field.pathName?has_content && field.pathName?contains('.')>
|
|
102
|
+
<#assign name = "${field.pathName?string[0..field.pathName?index_of('.') - 1]}">
|
|
111
103
|
</#if>
|
|
112
104
|
<#if !field.isTypePrimitive()>
|
|
113
105
|
result = 31 * result + ((${name} == null) ? 0 : ${name}.hashCode());
|