@cronapp/templates 2.9.1-SP.2 → 2.9.1-SP.21

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.
@@ -100,7 +100,7 @@
100
100
  </div>
101
101
  <#elseif field.isDate() >
102
102
  <label for="textinput-${field.name}-${model.random}" class="item item-input item-stacked-label"
103
- data-component="crn-input-floating">
103
+ data-component="crn-input-floating" id="lbl-${field.name}-${model.random}">
104
104
  <span class="input-label">${model.formMapLabels[field.name]!}</span>
105
105
  <input aria-label="<#if field.label?has_content>${field.label}<#else>${field.name}</#if>" type="date"
106
106
  placeholder="<#if field.label?has_content>${field.label}<#else>${field.name}</#if>"
@@ -111,7 +111,7 @@
111
111
  </label>
112
112
  <#elseif field.isTimestamp()>
113
113
  <label for="textinput-${field.name}-${model.random}" class="item item-input item-stacked-label"
114
- data-component="crn-input-floating">
114
+ data-component="crn-input-floating" id="lbl-${field.name}-${model.random}">
115
115
  <span class="input-label">${model.formMapLabels[field.name]!}</span>
116
116
  <input aria-label="<#if field.label?has_content>${field.label}<#else>${field.name}</#if>"
117
117
  type="datetime"
@@ -123,7 +123,7 @@
123
123
  </label>
124
124
  <#elseif field.isTime()>
125
125
  <label for="textinput-${field.name}-${model.random}" class="item item-input item-stacked-label"
126
- data-component="crn-input-floating">
126
+ data-component="crn-input-floating" id="lbl-${field.name}-${model.random}">
127
127
  <span class="input-label">${model.formMapLabels[field.name]!}</span>
128
128
  <input aria-label="<#if field.label?has_content>${field.label}<#else>${field.name}</#if>" type="time"
129
129
  placeholder="<#if field.label?has_content>${field.label}<#else>${field.name}</#if>"
@@ -134,7 +134,7 @@
134
134
  </label>
135
135
  <#elseif field.isNumber() >
136
136
  <label for="textinput-${field.name}-${model.random}" class="item item-input item-stacked-label"
137
- data-component="crn-input-floating">
137
+ data-component="crn-input-floating" id="lbl-${field.name}-${model.random}">
138
138
  <span class="input-label">${model.formMapLabels[field.name]!}</span>
139
139
  <input aria-label="<#if field.label?has_content>${field.label}<#else>${field.name}</#if>" type="integer"
140
140
  placeholder="<#if field.label?has_content>${field.label}<#else>${field.name}</#if>"
@@ -145,7 +145,7 @@
145
145
  </label>
146
146
  <#elseif (field.isByte() || field.isInteger()) >
147
147
  <label for="textinput-${field.name}-${model.random}" class="item item-input item-stacked-label"
148
- data-component="crn-input-floating">
148
+ data-component="crn-input-floating" id="lbl-${field.name}-${model.random}">
149
149
  <span class="input-label">${model.formMapLabels[field.name]!}</span>
150
150
  <input aria-label="<#if field.label?has_content>${field.label}<#else>${field.name}</#if>"
151
151
  type="integer"
@@ -157,7 +157,7 @@
157
157
  </label>
158
158
  <#elseif field.isLong() >
159
159
  <label for="textinput-${field.name}-${model.random}" class="item item-input item-stacked-label"
160
- data-component="crn-input-floating">
160
+ data-component="crn-input-floating" id="lbl-${field.name}-${model.random}">
161
161
  <span class="input-label">${model.formMapLabels[field.name]!}</span>
162
162
  <input aria-label="<#if field.label?has_content>${field.label}<#else>${field.name}</#if>"
163
163
  type="number"
@@ -169,7 +169,7 @@
169
169
  </label>
170
170
  <#elseif field.isDecimal() >
171
171
  <label for="textinput-${field.name}-${model.random}" class="item item-input item-stacked-label"
172
- data-component="crn-input-floating">
172
+ data-component="crn-input-floating" id="lbl-${field.name}-${model.random}">
173
173
  <span class="input-label">${model.formMapLabels[field.name]!}</span>
174
174
  <input aria-label="<#if field.label?has_content>${field.label}<#else>${field.name}</#if>" type="number"
175
175
  placeholder="<#if field.label?has_content>${field.label}<#else>${field.name}</#if>"
@@ -180,7 +180,7 @@
180
180
  </label>
181
181
  <#elseif field.isChar() >
182
182
  <label for="textinput-${field.name}-${model.random}" class="item item-input item-stacked-label"
183
- data-component="crn-input-floating">
183
+ data-component="crn-input-floating" id="lbl-${field.name}-${model.random}">
184
184
  <span class="input-label">${model.formMapLabels[field.name]!}</span>
185
185
  <input aria-label="<#if field.label?has_content>${field.label}<#else>${field.name}</#if>" type="text" maxlength="1"
186
186
  placeholder="<#if field.label?has_content>${field.label}<#else>${field.name}</#if>"
@@ -232,7 +232,7 @@
232
232
  </div>
233
233
  <#else>
234
234
  <label for="textinput-${field.name}-${model.random}" class="item item-input item-stacked-label"
235
- data-component="crn-input-floating">
235
+ data-component="crn-input-floating" id="lbl-${field.name}-${model.random}">
236
236
  <span class="input-label">${model.formMapLabels[field.name]!}</span>
237
237
  <input
238
238
  type="text"
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@cronapp/templates",
3
- "version": "2.9.1-SP.2",
3
+ "version": "2.9.1-SP.21",
4
4
  "cronapp-ide-minimum-version": "2.5.0"
5
5
  }
@@ -35,17 +35,17 @@
35
35
  <input type="hidden" name="csrf_token" value="CIwNZNlR4XbisJF39I8yWnWX9wX4WFoz" />
36
36
  <div class="list" ng-disabled="!User.editing &amp;&amp; !User.inserting">
37
37
  <!-- email begin -->
38
- <label for="textinput-email" class="item item-input item-stacked-label" data-component="crn-input-floating">
38
+ <label for="textinput-email" class="item item-input item-stacked-label" data-component="crn-input-floating" id="lbl-textinput-email">
39
39
  <span>Email</span>
40
40
  <input aria-label="Email" type="text" placeholder="Email" ng-model="User.active.email" id="textinput-email" name="textinput-email">
41
41
  </label>
42
42
  <!-- name begin -->
43
- <label for="textinput-name" class="item item-input item-stacked-label" data-component="crn-input-floating">
43
+ <label for="textinput-name" class="item item-input item-stacked-label" data-component="crn-input-floating" id="lbl-textinput-name">
44
44
  <span>{{'Users.view.Name' | translate}}</span>
45
45
  <input aria-label="{{'Users.view.Name' | translate}}" type="text" placeholder="{{'Users.view.Name' | translate}}" ng-model="User.active.name" id="textinput-name" name="textinput-name" required="required">
46
46
  </label>
47
47
  <!-- login begin -->
48
- <label for="textinput-login" class="item item-input item-stacked-label" data-component="crn-input-floating">
48
+ <label for="textinput-login" class="item item-input item-stacked-label" data-component="crn-input-floating" id="lbl-textinput-login">
49
49
  <span>{{'Users.view.Login' | translate}}</span>
50
50
  <input aria-label="{{'Users.view.Login' | translate}}" type="text" placeholder="{{'Users.view.Login' | translate}}" ng-model="User.active.userName" id="textinput-login" name="textinput-login" required="required">
51
51
  </label>
@@ -59,7 +59,7 @@
59
59
  </div>
60
60
  </div>
61
61
  <!-- password begin -->
62
- <label for="textinput-password" class="item item-input item-stacked-label" data-component="crn-input-floating">
62
+ <label for="textinput-password" class="item item-input item-stacked-label" data-component="crn-input-floating" id="lbl-textinput-password">
63
63
  <span>{{'Home.view.Password' | translate}}</span>
64
64
  <input type="password" aria-label="{{'Home.view.Password' | translate}}" type="text" placeholder="{{'Home.view.Password' | translate}}" ng-model="User.active.password" id="textinput-password" name="textinput-password" required="required">
65
65
  </label>
@@ -10,11 +10,11 @@
10
10
  <input type="hidden" name="csrf_token" value="CIwNZNlR4XbisJF39I8yWnWX9wX4WFoz">
11
11
  <div class="list list-inset login-mobile" data-container="true">
12
12
 
13
- <div class="item item-input component-holder" data-component="crn-input" for="crn-input-username" title="{{'Login.view.Username' | translate}}">
13
+ <div class="item item-input component-holder" data-component="crn-input" for="crn-input-username" title="{{'Login.view.Username' | translate}}" id="lbl-input-username">
14
14
  <input aria-label="{{'Login.view.Username' | translate}}" autocomplete="username" autocorrect="off" autocapitalize="off" type="text" placeholder="{{'Login.view.Username' | translate}}" ng-model="vars.username" id="crn-input-username" keyboard="username">
15
15
  </div>
16
16
 
17
- <div class="item item-input component-holder" data-component="crn-input" for="crn-input-password" title="{{'Login.view.Password' | translate}}">
17
+ <div class="item item-input component-holder" data-component="crn-input" for="crn-input-password" title="{{'Login.view.Password' | translate}}" id="lbl-input-password">
18
18
  <input aria-label="{{'Login.view.Password' | translate}}" autocomplete="current-password" type="password" placeholder="{{'Login.view.Password' | translate}}" ng-model="vars.password" id="crn-input-password" keyboard="password">
19
19
  </div>
20
20
 
@@ -1,6 +1,6 @@
1
1
  <ion-view class="pane" role="region">
2
2
  <ion-content data-container="true" data-component="crn-ion-content" class="scroll-content menu-view">
3
- <ion-list class=" disable-user-behavior list">
3
+ <div class=" disable-user-behavior list">
4
4
  <!-- Menu -->
5
5
  <div class="component-holder" data-component="crn-navbar" id="menu-blue">
6
6
  <div class="nav navbar-nav">
@@ -10,6 +10,6 @@
10
10
  </div>
11
11
  </div>
12
12
  <!-- Menu -->
13
- </ion-list>
13
+ </div>
14
14
  </ion-content>
15
15
  </ion-view>
@@ -1,6 +1,6 @@
1
1
  <ion-view class="pane">
2
2
  <ion-content data-container="true" data-component="crn-ion-content" class="scroll-content menu-view">
3
- <ion-list class=" disable-user-behavior list">
3
+ <div class=" disable-user-behavior list">
4
4
  <!-- Menu -->
5
5
  <div class="component-holder" data-component="crn-navbar" id="menu-blue">
6
6
  <div class="nav navbar-nav">
@@ -10,6 +10,6 @@
10
10
  </cron-mobile-menu>
11
11
  </div>
12
12
  <!-- Menu -->
13
- </ion-list>
13
+ </div>
14
14
  </ion-content>
15
15
  </ion-view>
@@ -1,22 +1,26 @@
1
+ ## Consulte a documentação do Docker em https://docs.cronapp.io para informações sobre o conteúdo desse arquivo.
2
+
1
3
  FROM alpine:3.12.0 as maven_builder
2
4
  RUN apk add --no-cache --update-cache maven openjdk11 npm git bash
3
5
  WORKDIR /app
4
6
  ADD pom.xml /app/pom.xml
5
7
  RUN git config --global url."https://".insteadOf git://
6
- # Usando repositórios externo - JAR e NPM
7
- RUN mvn dependency:go-offline -B
8
- ADD . /app
9
- # Consulte https://docs.cronapp.io e busque por Novos parâmetros para gerar .war para mais informações sobre o TIER e CONTEXT_USE
10
8
  ARG TIER
11
9
  ARG CONTEXT_USE
12
10
  ARG MOBILE_APP
11
+
12
+ ## Para repositório EXTERNO não é necessário alterações.
13
+ ## Para repositório INTERNO comente as linhas 16, 17 e 18 e retire os comentários nas linhas 21, 22, 23 e 24.
14
+
15
+ ## Usando repositórios externo - JAR e NPM
16
+ RUN mvn dependency:go-offline -B
17
+ ADD . /app
13
18
  RUN cd /app && mvn package -X -Dcronapp.profile=${TIER} -Dcronapp.useContext=${CONTEXT_USE} -Dcronapp.mobileapp=${MOBILE_APP}
14
- # Usando repositórios JAR e NPM interno, comente as linhas equivalente acima, e logo após descomente do ADD até o último comando RUN
19
+
20
+ ## Usando repositórios interno - JAR e NPM
15
21
  #ADD settings.xml $HOME/.m2/settings.xml
16
22
  #RUN npm config set registry https://my.registry.com/your-repository/name && mvn -s /app/settings.xml dependency:go-offline -B
17
23
  #ADD . /app
18
- #ARG TIER
19
- #ARG CONTEXT_USE
20
24
  #RUN cd /app && mvn -s /app/settings.xml package -X -Dcronapp.profile=${TIER} -Dcronapp.useContext=${CONTEXT_USE} -Dcronapp.mobileapp=${MOBILE_APP}
21
25
 
22
26
  FROM tomcat:9.0.17-jre11
@@ -20,6 +20,6 @@
20
20
  </div>
21
21
  </nav>
22
22
  </div>
23
- <div class="container-fluid main-view <#if !(menuPosition??) || menuPosition == "Horizontal">main-view-horizontal<#else>main-view-vertical</#if>">
23
+ <div ui-view class="container-fluid main-view <#if !(menuPosition??) || menuPosition == "Horizontal">main-view-horizontal<#else>main-view-vertical</#if>">
24
24
  <h1 class="title text-left h3" xattr-position="text-left" xattr-type="h3" data-component="crn-text-component" id="crn-text-component-public-home">{{'Home.view.Home' | translate}}</h1>
25
25
  </div>
@@ -18,14 +18,14 @@
18
18
  * @generated
19
19
  */
20
20
  public ${classClass.name} set${fieldName?cap_first}(${field.type} ${fieldName}) {
21
- <#if field.isEncryption() && !clazz.hasStrongPassword()>
21
+ <#if field.isEncryption() && field.getPasswordPolicy() != "full">
22
22
  this.${fieldName} = ${fieldName}.startsWith(ENCRYPT) ? ${fieldName} : new BCryptPasswordEncoder().encode(${fieldName});
23
23
  <#else>
24
24
  this.${fieldName} = ${fieldName};
25
- </#if>
25
+ </#if>
26
26
  return this;
27
27
  }
28
- </#macro>
28
+ </#macro>
29
29
 
30
30
  package ${entityPackage}<#if subPackage??>.${subPackage}</#if>;
31
31
 
@@ -39,13 +39,16 @@ import cronapi.rest.security.CronappSecurity;
39
39
  <#if clazz.rest>
40
40
  import cronapi.swagger.CronappSwagger;
41
41
  </#if>
42
- <#if clazz.hasRowVersion() || clazz.hasXML()>
42
+ <#if clazz.hasRowVersion() || clazz.hasXML() || clazz.hasUUID()>
43
43
  import org.eclipse.persistence.annotations.Convert;
44
44
  import org.eclipse.persistence.annotations.Converter;
45
45
  </#if>
46
46
  <#if clazz.hasRowVersion()>
47
47
  import cronapi.database.VersionConverter;
48
48
  </#if>
49
+ <#if clazz.hasUUID()>
50
+ import cronapi.database.UUIDConverter;
51
+ </#if>
49
52
  <#if clazz.hasUseOuterJoin()?? && clazz.hasUseOuterJoin()>
50
53
  import org.eclipse.persistence.annotations.JoinFetch;
51
54
  import org.eclipse.persistence.annotations.JoinFetchType;
@@ -68,9 +71,8 @@ import cronapi.database.ByteConverter;
68
71
  import cronapp.framework.persistence.ValidPassword;
69
72
  import cronapp.framework.persistence.ValidPasswords;
70
73
  import cronapp.framework.persistence.PasswordEncoderListener;
71
- <#else>
72
- import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
73
74
  </#if>
75
+ import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
74
76
  </#if>
75
77
  <#list clazz.imports as import>
76
78
  import ${import};
@@ -104,7 +106,7 @@ import org.eclipse.persistence.annotations.*;
104
106
  </#if>
105
107
  _0", columnNames={
106
108
  <#list clazz.fieldsUniqueKey as field>
107
- "${field.dbFieldName}"
109
+ "${field.dbFieldName}"
108
110
  <#if field?has_next>
109
111
  ,
110
112
  </#if>
@@ -125,7 +127,7 @@ import org.eclipse.persistence.annotations.*;
125
127
  @TenantDiscriminatorColumns({
126
128
  </#if>
127
129
  <#list clazz.multitententFields as field>
128
- @TenantDiscriminatorColumn(name = "${field.dbFieldName}", contextProperty = "${field.multitenantContext}")<#if field_has_next>,</#if>
130
+ @TenantDiscriminatorColumn(name = "${field.dbFieldName?replace("\"", "\\\"")}", contextProperty = "${field.multitenantContext}")<#if field_has_next>,</#if>
129
131
  </#list>
130
132
  <#if (clazz.multitententFields?size > 1)>
131
133
  })
@@ -147,17 +149,23 @@ import org.eclipse.persistence.annotations.*;
147
149
  converterClass=ByteConverter.class
148
150
  )
149
151
  </#if>
152
+ <#if clazz.hasUUID()>
153
+ @Converter(
154
+ name="uuid",
155
+ converterClass=UUIDConverter.class
156
+ )
157
+ </#if>
150
158
  <#if clazz.hasStrongPassword() && clazz.hasEncryption()>
151
159
  @ValidPasswords({
152
160
  <#list clazz.fields as field>
153
- <#if field.isEncryption()>
161
+ <#if field.isEncryption() && field.getPasswordPolicy() == "full">
154
162
  @ValidPassword(passwordProperty = "${field.name}", passwordHistoryProperty = "${field.name}History"),
155
163
  </#if>
156
164
  </#list>
157
- })
165
+ })
158
166
  </#if>
159
167
  public class ${clazz.name} implements Serializable {
160
- <#if clazz.hasEncryption() && !clazz.hasStrongPassword()>
168
+ <#if clazz.hasEncryption()>
161
169
  /**
162
170
  * Variável privada para verificação da criptofrafia
163
171
  *
@@ -185,6 +193,9 @@ public class ${clazz.name} implements Serializable {
185
193
  @GeneratedValue(strategy = GenerationType.IDENTITY)
186
194
  </#if>
187
195
  </#if>
196
+ <#if (field.isUUID())!false>
197
+ @Convert("uuid")
198
+ </#if>
188
199
  <#if field.isVersion()>
189
200
  @Version
190
201
  <#elseif field.isDate()>
@@ -197,7 +208,7 @@ public class ${clazz.name} implements Serializable {
197
208
  <#if (field.relationNames?size == 1)>
198
209
  <#list field.relationNames?keys as key>
199
210
  <#if key??>
200
- @JoinColumn(name="${key}", nullable = ${field.nullable?c}, referencedColumnName = "${field.relationNames[key]}", insertable=${field.insertable?c}, updatable=${field.updatable?c})
211
+ @JoinColumn(name="${(key)?replace("\"", "\\\"")}", nullable = ${field.nullable?c}, referencedColumnName = "${field.relationNames[key]?replace("\"", "\\\"")}", insertable=${field.insertable?c}, updatable=${field.updatable?c})
201
212
  </#if>
202
213
  </#list>
203
214
  <#elseif (field.relationNames?size > 1)>
@@ -205,14 +216,14 @@ public class ${clazz.name} implements Serializable {
205
216
  @JoinColumns({
206
217
  <#list field.relationNames?keys as key>
207
218
  <#if key??>
208
- @JoinColumn(name="${key}", nullable = ${field.nullable?c}, referencedColumnName = "${field.relationNames[key]}", insertable=${field.insertable?c}, updatable=${field.updatable?c})
219
+ @JoinColumn(name="${(key)?replace("\"", "\\\"")}", nullable = ${field.nullable?c}, referencedColumnName = "${field.relationNames[key]?replace("\"", "\\\"")}", insertable=${field.insertable?c}, updatable=${field.updatable?c})
209
220
  <#if (i>1)>,</#if>
210
221
  </#if>
211
222
  <#assign i = i-1>
212
223
  </#list>
213
224
  })
214
225
  <#else>
215
- @Column(name = "${field.dbFieldName}", nullable = ${field.nullable?c}<#if !field.primaryKey>, unique = ${field.unique?c}</#if><#if field.length??>, length=${field.length?c}</#if><#if field.precision??>, precision=${field.precision?c}</#if><#if field.scale??>, scale=${field.scale?c}</#if>, insertable=${field.insertable?c}, updatable=${field.updatable?c}<#if field.columnDefinition??>, columnDefinition = "${field.columnDefinition}"</#if>)
226
+ @Column(name = "${field.dbFieldName?replace("\"", "\\\"")}", nullable = ${field.nullable?c}<#if !field.primaryKey>, unique = ${field.unique?c}</#if><#if field.length??>, length=${field.length?c}</#if><#if field.precision??>, precision=${field.precision?c}</#if><#if field.scale??>, scale=${field.scale?c}</#if>, insertable=${field.insertable?c}, updatable=${field.updatable?c}<#if field.columnDefinition??>, columnDefinition = "${field.columnDefinition}"</#if>)
216
227
  </#if>
217
228
  ${field.modifier} <#if field.arrayRelation>${field.type}<#else>${field.type}</#if> ${name}<#if field.defaultValue?has_content> = ${field.defaultValue}<#elseif field.primaryKey && field.generationType?? && field.generationType == "UUID"> = UUID.randomUUID().toString().toUpperCase()</#if>;
218
229
  </#if>
@@ -225,6 +236,9 @@ public class ${clazz.name} implements Serializable {
225
236
  */
226
237
  <#if (field.rowVersion)!false>
227
238
  @Convert("version")
239
+ </#if>
240
+ <#if (field.isUUID())!false>
241
+ @Convert("uuid")
228
242
  </#if>
229
243
  <#if (field.XML)!false>
230
244
  @Convert("bytes")
@@ -237,7 +251,7 @@ public class ${clazz.name} implements Serializable {
237
251
  <#if (field.relationNames?size == 1)>
238
252
  <#list field.relationNames?keys as key>
239
253
  <#if key??>
240
- @JoinColumn(name="${key}", nullable = ${field.nullable?c}, referencedColumnName = "${field.relationNames[key]}", insertable=${field.insertable?c}, updatable=${field.updatable?c}<#if field.cascade>, foreignKey = @ForeignKey(name = "<#if tableName??>${tableName}<#else>${clazz.name?upper_case}</#if>_${key?upper_case}_${field.dbTableRelationClazz}_${field.relationNames[key]?upper_case}", foreignKeyDefinition = "FOREIGN KEY (${key}) REFERENCES ${field.dbTableRelationClazz} (${field.relationNames[key]}) ON DELETE CASCADE")<#elseif field.fkName?has_content>, foreignKey = @ForeignKey(name = "${field.fkName}", foreignKeyDefinition = "FOREIGN KEY (${key}) REFERENCES ${field.dbTableRelationClazz} (${field.relationNames[key]})")</#if>)
254
+ @JoinColumn(name="${(key)?replace("\"", "\\\"")}", nullable = ${field.nullable?c}, referencedColumnName = "${field.relationNames[key]?replace("\"", "\\\"")}", insertable=${field.insertable?c}, updatable=${field.updatable?c}<#if field.cascade>, foreignKey = @ForeignKey(name = "<#if tableName??>${tableName?replace("\"", "\\\"")}<#else>${(clazz.name?upper_case)?replace("\"", "\\\"")}</#if>_${(key?upper_case)?replace("\"", "\\\"")}_${field.dbTableRelationClazz?replace("\"", "\\\"")}_${(field.relationNames[key]?upper_case)?replace("\"", "\\\"")}", foreignKeyDefinition = "FOREIGN KEY (${(key)?replace("\"", "\\\"")}) REFERENCES ${field.dbTableRelationClazz} (${field.relationNames[key]?replace("\"", "\\\"")}) ON DELETE CASCADE")<#elseif field.fkName?has_content>, foreignKey = @ForeignKey(name = "${field.fkName?replace("\"", "\\\"")}", foreignKeyDefinition = "FOREIGN KEY (${(key)?replace("\"", "\\\"")}) REFERENCES ${field.dbTableRelationClazz} (${field.relationNames[key]?replace("\"", "\\\"")})")</#if>)
241
255
  </#if>
242
256
  </#list>
243
257
  <#elseif (field.relationNames?size > 1)>
@@ -245,14 +259,14 @@ public class ${clazz.name} implements Serializable {
245
259
  @JoinColumns({
246
260
  <#list field.relationNames?keys as key>
247
261
  <#if key??>
248
- @JoinColumn(name="${key}", nullable = ${field.nullable?c}, referencedColumnName = "${field.relationNames[key]}", insertable=${field.insertable?c}, updatable=${field.updatable?c}<#if field.fkName?has_content>, foreignKey = @ForeignKey(name = "${field.fkName}", foreignKeyDefinition = "FOREIGN KEY (${key}) REFERENCES ${field.dbTableRelationClazz} (${field.relationNames[key]})")</#if>)
262
+ @JoinColumn(name="${(key)?replace("\"", "\\\"")}", nullable = ${field.nullable?c}, referencedColumnName = "${field.relationNames[key]?replace("\"", "\\\"")}", insertable=${field.insertable?c}, updatable=${field.updatable?c}<#if field.fkName?has_content>, foreignKey = @ForeignKey(name = "${field.fkName?replace("\"", "\\\"")}", foreignKeyDefinition = "FOREIGN KEY (${(key)?replace("\"", "\\\"")}) REFERENCES ${field.dbTableRelationClazz} (${field.relationNames[key]?replace("\"", "\\\"")})")</#if>)
249
263
  <#if (i>1)>,</#if>
250
264
  </#if>
251
265
  <#assign i = i-1>
252
266
  </#list>
253
267
  })
254
268
  <#elseif field.arrayRelation>
255
- @OneToMany(fetch = FetchType.LAZY, mappedBy="${field.mappedBy}", insertable=${field.insertable?c}, updatable=${field.updatable?c})
269
+ @OneToMany(fetch = FetchType.LAZY, mappedBy="${field.mappedBy?replace("\"", "\\\"")}", insertable=${field.insertable?c}, updatable=${field.updatable?c})
256
270
  <#else>
257
271
  <#if field.transient>
258
272
  @Transient
@@ -266,7 +280,7 @@ public class ${clazz.name} implements Serializable {
266
280
  <#elseif field.isTimestamp()>
267
281
  @Temporal(TemporalType.TIMESTAMP)
268
282
  </#if>
269
- @Column(name = "${field.dbFieldName}", nullable = ${field.nullable?c}<#if !field.primaryKey>, unique = ${field.unique?c}</#if><#if field.length??>, length=${field.length?c}</#if><#if field.precision??>, precision=${field.precision?c}</#if><#if field.scale??>, scale=${field.scale?c}</#if>, insertable=${field.insertable?c}, updatable=${field.updatable?c}<#if field.columnDefinition??>, columnDefinition = "${field.columnDefinition}"</#if>)
283
+ @Column(name = "${field.dbFieldName?replace("\"", "\\\"")}", nullable = ${field.nullable?c}<#if !field.primaryKey>, unique = ${field.unique?c}</#if><#if field.length??>, length=${field.length?c}</#if><#if field.precision??>, precision=${field.precision?c}</#if><#if field.scale??>, scale=${field.scale?c}</#if>, insertable=${field.insertable?c}, updatable=${field.updatable?c}<#if field.columnDefinition??>, columnDefinition = "${field.columnDefinition}"</#if>)
270
284
  </#if>
271
285
  </#if>
272
286
  <#if field.getUseOuterJoin()>
@@ -276,7 +290,7 @@ public class ${clazz.name} implements Serializable {
276
290
  @JsonIgnore
277
291
  </#if>
278
292
  <#if field.isCloudStorage()>
279
- @CronapiCloud(type = "${field.getStorageType()}", value="${field.getStorageKey()}", id="${field.getStorageId()}", secret="${field.getStorageSecret()}")
293
+ @CronapiCloud(type = "${field.getStorageType()}", value="${field.getStorageKey()}", id="${field.getStorageId()}", secret="${field.getStorageSecret()}", regionAWS="${field.getRegionAWS()}")
280
294
  </#if>
281
295
  <#if field.isFileDataBase()>
282
296
  @CronapiByteHeaderSignature
@@ -288,11 +302,11 @@ public class ${clazz.name} implements Serializable {
288
302
  ${field.modifier} <#if field.arrayRelation>${field.type}<#else>${field.type}</#if> ${field.name}<#if field.defaultValue?has_content> = ${field.defaultValue}</#if>;
289
303
  </#if>
290
304
 
291
- <#if field.isEncryption()>
305
+ <#if field.isEncryption() && field.getPasswordPolicy() == "full">
292
306
  /**
293
307
  * @generated
294
308
  */
295
- <@single_line>@Column(name = "${field.dbFieldName}_history"
309
+ <@single_line>@Column(name = "${field.dbFieldName?replace("\"", "\\\"")}_history"
296
310
  <#if !field.insertable>, insertable = ${field.insertable?c}</#if>
297
311
  <#if !field.updatable>, updatable = ${field.updatable?c}</#if>
298
312
  )</@single_line>
@@ -309,7 +323,7 @@ public class ${clazz.name} implements Serializable {
309
323
 
310
324
  <#list clazz.fields as field>
311
325
  <@getter_setter clazz field "${field.name}" />
312
- <#if field.isEncryption()>
326
+ <#if field.isEncryption() && field.getPasswordPolicy() == "full">
313
327
  <@getter_setter clazz field "${field.name}History" />
314
328
  </#if>
315
329
  </#list>
@@ -32,7 +32,7 @@ public class ${clazz.name + "PK"} implements Serializable {
32
32
  <#assign name = "${field.name}">
33
33
  <#if field.getProperty("FOREIGN")??>
34
34
  <#if name?contains('_')>
35
- <#assign name = "${field.name?string[0..field.name?index_of('_') - 1]}">
35
+ <#assign name = "${field.name?string[0..field.name?last_index_of('_') - 1]}">
36
36
  </#if>
37
37
  </#if>
38
38
 
@@ -53,7 +53,7 @@ public class ${clazz.name + "PK"} implements Serializable {
53
53
  <#assign name = "${field.name}">
54
54
  <#if field.getProperty("FOREIGN")??>
55
55
  <#if name?contains('_')>
56
- <#assign name = "${field.name?string[0..field.name?index_of('_') - 1]}">
56
+ <#assign name = "${field.name?string[0..field.name?last_index_of('_') - 1]}">
57
57
  </#if>
58
58
  </#if>
59
59
  /**
@@ -88,7 +88,7 @@ ${clazz.name + "PK"} object = (${clazz.name + "PK"})obj;
88
88
  <#assign name = "${field.name}">
89
89
  <#if field.getProperty("FOREIGN")??>
90
90
  <#if name?contains('_')>
91
- <#assign name = "${field.name?string[0..field.name?index_of('_') - 1]}">
91
+ <#assign name = "${field.name?string[0..field.name?last_index_of('_') - 1]}">
92
92
  </#if>
93
93
  </#if>
94
94
  if (${name} != null ? !${name}.equals(object.${name}) : object.${name} != null) return false;
@@ -106,7 +106,7 @@ ${clazz.name + "PK"} object = (${clazz.name + "PK"})obj;
106
106
  <#assign name = "${field.name}">
107
107
  <#if field.getProperty("FOREIGN")??>
108
108
  <#if name?contains('_')>
109
- <#assign name = "${field.name?string[0..field.name?index_of('_') - 1]}">
109
+ <#assign name = "${field.name?string[0..field.name?last_index_of('_') - 1]}">
110
110
  </#if>
111
111
  </#if>
112
112
  <#if !field.isTypePrimitive()>