Skip to content

Commit

Permalink
Latest code generation
Browse files Browse the repository at this point in the history
rh-pre-commit.version: 2.0.3
rh-pre-commit.check-secrets: ENABLED
  • Loading branch information
computate committed Dec 19, 2023
1 parent 434d30e commit 9bf5101
Show file tree
Hide file tree
Showing 8 changed files with 220 additions and 346 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,30 @@ public Future<SiteUser> sqlPATCHSiteUser(SiteUser o, Boolean inheritPk) {

for(String entityVar : methodNames) {
switch(entityVar) {
case "setDeleted":
o2.setDeleted(jsonObject.getBoolean(entityVar));
if(bParams.size() > 0)
bSql.append(", ");
bSql.append(SiteUser.VAR_deleted + "=$" + num);
num++;
bParams.add(o2.sqlDeleted());
break;
case "setSessionId":
o2.setSessionId(jsonObject.getString(entityVar));
if(bParams.size() > 0)
bSql.append(", ");
bSql.append(SiteUser.VAR_sessionId + "=$" + num);
num++;
bParams.add(o2.sqlSessionId());
break;
case "setUserKey":
o2.setUserKey(jsonObject.getString(entityVar));
if(bParams.size() > 0)
bSql.append(", ");
bSql.append(SiteUser.VAR_userKey + "=$" + num);
num++;
bParams.add(o2.sqlUserKey());
break;
case "setInheritPk":
o2.setInheritPk(jsonObject.getString(entityVar));
if(bParams.size() > 0)
Expand All @@ -524,29 +548,13 @@ public Future<SiteUser> sqlPATCHSiteUser(SiteUser o, Boolean inheritPk) {
num++;
bParams.add(o2.sqlArchived());
break;
case "setDeleted":
o2.setDeleted(jsonObject.getBoolean(entityVar));
if(bParams.size() > 0)
bSql.append(", ");
bSql.append(SiteUser.VAR_deleted + "=$" + num);
num++;
bParams.add(o2.sqlDeleted());
break;
case "setSessionId":
o2.setSessionId(jsonObject.getString(entityVar));
if(bParams.size() > 0)
bSql.append(", ");
bSql.append(SiteUser.VAR_sessionId + "=$" + num);
num++;
bParams.add(o2.sqlSessionId());
break;
case "setUserKey":
o2.setUserKey(jsonObject.getString(entityVar));
case "setSeeDeleted":
o2.setSeeDeleted(jsonObject.getBoolean(entityVar));
if(bParams.size() > 0)
bSql.append(", ");
bSql.append(SiteUser.VAR_userKey + "=$" + num);
bSql.append(SiteUser.VAR_seeDeleted + "=$" + num);
num++;
bParams.add(o2.sqlUserKey());
bParams.add(o2.sqlSeeDeleted());
break;
case "setUserId":
o2.setUserId(jsonObject.getString(entityVar));
Expand Down Expand Up @@ -604,14 +612,6 @@ public Future<SiteUser> sqlPATCHSiteUser(SiteUser o, Boolean inheritPk) {
num++;
bParams.add(o2.sqlSeeArchived());
break;
case "setSeeDeleted":
o2.setSeeDeleted(jsonObject.getBoolean(entityVar));
if(bParams.size() > 0)
bSql.append(", ");
bSql.append(SiteUser.VAR_seeDeleted + "=$" + num);
num++;
bParams.add(o2.sqlSeeDeleted());
break;
}
}
bSql.append(" WHERE pk=$" + num);
Expand Down Expand Up @@ -897,6 +897,33 @@ public Future<Void> sqlPOSTSiteUser(SiteUser o, Boolean inheritPk) {
Set<String> entityVars = jsonObject.fieldNames();
for(String entityVar : entityVars) {
switch(entityVar) {
case SiteUser.VAR_deleted:
o2.setDeleted(jsonObject.getBoolean(entityVar));
if(bParams.size() > 0) {
bSql.append(", ");
}
bSql.append(SiteUser.VAR_deleted + "=$" + num);
num++;
bParams.add(o2.sqlDeleted());
break;
case SiteUser.VAR_sessionId:
o2.setSessionId(jsonObject.getString(entityVar));
if(bParams.size() > 0) {
bSql.append(", ");
}
bSql.append(SiteUser.VAR_sessionId + "=$" + num);
num++;
bParams.add(o2.sqlSessionId());
break;
case SiteUser.VAR_userKey:
o2.setUserKey(jsonObject.getString(entityVar));
if(bParams.size() > 0) {
bSql.append(", ");
}
bSql.append(SiteUser.VAR_userKey + "=$" + num);
num++;
bParams.add(o2.sqlUserKey());
break;
case SiteUser.VAR_inheritPk:
o2.setInheritPk(jsonObject.getString(entityVar));
if(bParams.size() > 0) {
Expand Down Expand Up @@ -924,32 +951,14 @@ public Future<Void> sqlPOSTSiteUser(SiteUser o, Boolean inheritPk) {
num++;
bParams.add(o2.sqlArchived());
break;
case SiteUser.VAR_deleted:
o2.setDeleted(jsonObject.getBoolean(entityVar));
if(bParams.size() > 0) {
bSql.append(", ");
}
bSql.append(SiteUser.VAR_deleted + "=$" + num);
num++;
bParams.add(o2.sqlDeleted());
break;
case SiteUser.VAR_sessionId:
o2.setSessionId(jsonObject.getString(entityVar));
if(bParams.size() > 0) {
bSql.append(", ");
}
bSql.append(SiteUser.VAR_sessionId + "=$" + num);
num++;
bParams.add(o2.sqlSessionId());
break;
case SiteUser.VAR_userKey:
o2.setUserKey(jsonObject.getString(entityVar));
case SiteUser.VAR_seeDeleted:
o2.setSeeDeleted(jsonObject.getBoolean(entityVar));
if(bParams.size() > 0) {
bSql.append(", ");
}
bSql.append(SiteUser.VAR_userKey + "=$" + num);
bSql.append(SiteUser.VAR_seeDeleted + "=$" + num);
num++;
bParams.add(o2.sqlUserKey());
bParams.add(o2.sqlSeeDeleted());
break;
case SiteUser.VAR_userId:
o2.setUserId(jsonObject.getString(entityVar));
Expand Down Expand Up @@ -1014,15 +1023,6 @@ public Future<Void> sqlPOSTSiteUser(SiteUser o, Boolean inheritPk) {
num++;
bParams.add(o2.sqlSeeArchived());
break;
case SiteUser.VAR_seeDeleted:
o2.setSeeDeleted(jsonObject.getBoolean(entityVar));
if(bParams.size() > 0) {
bSql.append(", ");
}
bSql.append(SiteUser.VAR_seeDeleted + "=$" + num);
num++;
bParams.add(o2.sqlSeeDeleted());
break;
}
}
}
Expand Down
64 changes: 23 additions & 41 deletions src/main/resources/templates/enUS/BaseModelGenPage.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,24 @@
{{#*inline "jsTooltipBaseModelPage"}}{{/inline}}
{{#*inline "htmTooltipBaseModelPage"}}{{/inline}}
{{#*inline "jsStyleBaseModelPage"}}
return {
radius: 8
, fillColor: '#ff7800'
, color: '#000'
, weight: 1
, opacity: 1
, fillOpacity: 0.8
};
if(feature.geometry.type == 'Point') {
return {
radius: 8
, fillColor: '#ff7800'
, color: '#000'
, weight: 1
, opacity: 1
, fillOpacity: 0.8
};
} else {
return {
fillColor: '#ff7800'
, color: (feature.properties.areaServedColors ? feature.properties.areaServedColors[feature.index] : (feature.properties.color ? feature.properties.color : '#000'))
, weight: 5
, opacity: 1
, fillOpacity: 0.8
};
}
{{/inline}}
{{#*inline "htmUrlBaseModel"}}{{pageUri}}?q={{query.q}}&amp;rows={{#if rows}}{{rows}}{{else}}{{pagination.rows}}{{/if}}&amp;rows={{#if start}}{{start}}{{else}}{{pagination.start}}{{/if}}{{#each query.fq}}{{#eq fq this}}{{else}}&fq={{fq}}:{{val}}{{/eq}}{{/each}}{{#each query.sort}}{{#eq sort this}}{{else}}&sort={{var}} {{order}}{{/eq}}{{/each}}{{/inline}}
{{#*inline "htmHeadBaseModelPage"}}{{#block "htmTitle"}}{{/block}}{{#block "htmMeta"}}{{/block}}{{#block "htmStyle"}}{{/block}}{{#block "htmScripts"}}{{/block}}{{#block "htmScript"}}{{/block}}{{/inline}}
Expand Down Expand Up @@ -321,33 +331,6 @@
<span class=""></span>
</span>
</h2>
{{#block "htmBodyGraphLocation"}}{{/block}}
{{#block "htmBodyGraph"}}{{/block}}
<div class="pageContent w3-content ">
<div id="site-calendar-box">
<div id="site-calendar"><!-- // --></div>
</div>
{{/inline}}
{{#*inline "htmBodyCount1AllBaseModelPage"}} <!-- #*inline "htmBodyCount1AllBaseModelPage" -->
<h1 class="w3-center ">
<a href="{{pageUri}}" class="w3-bar-item w3-btn w3-block w3- w3-hover-">
{{#if classIconCssClasses}}
<i class="{{ classIconCssClasses }} site-menu-icon "></i>
{{/if}}
<span class=""></span>
</a>
</h1>
<h2 class="w3-center ">
<span class="w3-bar-item w3-padding w3-center w3-block w3-">
<span class="">{{baseModel_.objectTitle}}</span>
</span>
</h2>
{{#block "htmBodyGraphLocation"}}{{/block}}
{{#block "htmBodyGraph"}}{{/block}}
<div class="pageContent w3-content ">
<div id="site-calendar-box">
<div id="site-calendar"><!-- // --></div>
</div>
{{/inline}}
{{#*inline "htmBodyCount1BaseModelPage"}} <!-- #*inline "htmBodyCount1BaseModelPage" -->
<h1>
Expand All @@ -363,12 +346,6 @@
<span class="">{{baseModel_.objectTitle}}</span>
</span>
</h2>
{{#block "htmBodyGraphLocation"}}{{/block}}
{{#block "htmBodyGraph"}}{{/block}}
<div class="pageContent w3-content ">
<div id="site-calendar-box">
<div id="site-calendar"><!-- // --></div>
</div>
{{/inline}}
{{#*inline "htmBodyAllBaseModelPage"}} <!-- #*inline "htmBodyAllBaseModelPage" -->
<h1>
Expand Down Expand Up @@ -518,6 +495,11 @@
</div>
{{#block "htmBodyGraphLocation"}}{{/block}}
{{#block "htmBodyGraph"}}{{/block}}
<div class="pageContent w3-content ">
<div id="site-calendar-box">
<div id="site-calendar"><!-- // --></div>
</div>
</div>
<div class="pageContent w3-content ">
{{#eq baseModelCount int0}}
{{#block "htmBodyCount0"}}{{/block}}
Expand Down
64 changes: 23 additions & 41 deletions src/main/resources/templates/enUS/BaseResultGenPage.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,24 @@
{{#*inline "jsTooltipBaseResultPage"}}{{/inline}}
{{#*inline "htmTooltipBaseResultPage"}}{{/inline}}
{{#*inline "jsStyleBaseResultPage"}}
return {
radius: 8
, fillColor: '#ff7800'
, color: '#000'
, weight: 1
, opacity: 1
, fillOpacity: 0.8
};
if(feature.geometry.type == 'Point') {
return {
radius: 8
, fillColor: '#ff7800'
, color: '#000'
, weight: 1
, opacity: 1
, fillOpacity: 0.8
};
} else {
return {
fillColor: '#ff7800'
, color: (feature.properties.areaServedColors ? feature.properties.areaServedColors[feature.index] : (feature.properties.color ? feature.properties.color : '#000'))
, weight: 5
, opacity: 1
, fillOpacity: 0.8
};
}
{{/inline}}
{{#*inline "htmUrlBaseResult"}}{{pageUri}}?q={{query.q}}&amp;rows={{#if rows}}{{rows}}{{else}}{{pagination.rows}}{{/if}}&amp;rows={{#if start}}{{start}}{{else}}{{pagination.start}}{{/if}}{{#each query.fq}}{{#eq fq this}}{{else}}&fq={{fq}}:{{val}}{{/eq}}{{/each}}{{#each query.sort}}{{#eq sort this}}{{else}}&sort={{var}} {{order}}{{/eq}}{{/each}}{{/inline}}
{{#*inline "htmHeadBaseResultPage"}}{{#block "htmTitle"}}{{/block}}{{#block "htmMeta"}}{{/block}}{{#block "htmStyle"}}{{/block}}{{#block "htmScripts"}}{{/block}}{{#block "htmScript"}}{{/block}}{{/inline}}
Expand Down Expand Up @@ -321,33 +331,6 @@
<span class=""></span>
</span>
</h2>
{{#block "htmBodyGraphLocation"}}{{/block}}
{{#block "htmBodyGraph"}}{{/block}}
<div class="pageContent w3-content ">
<div id="site-calendar-box">
<div id="site-calendar"><!-- // --></div>
</div>
{{/inline}}
{{#*inline "htmBodyCount1AllBaseResultPage"}} <!-- #*inline "htmBodyCount1AllBaseResultPage" -->
<h1 class="w3-center ">
<a href="{{pageUri}}" class="w3-bar-item w3-btn w3-block w3- w3-hover-">
{{#if classIconCssClasses}}
<i class="{{ classIconCssClasses }} site-menu-icon "></i>
{{/if}}
<span class=""></span>
</a>
</h1>
<h2 class="w3-center ">
<span class="w3-bar-item w3-padding w3-center w3-block w3-">
<span class="">{{baseResult_.objectTitle}}</span>
</span>
</h2>
{{#block "htmBodyGraphLocation"}}{{/block}}
{{#block "htmBodyGraph"}}{{/block}}
<div class="pageContent w3-content ">
<div id="site-calendar-box">
<div id="site-calendar"><!-- // --></div>
</div>
{{/inline}}
{{#*inline "htmBodyCount1BaseResultPage"}} <!-- #*inline "htmBodyCount1BaseResultPage" -->
<h1>
Expand All @@ -363,12 +346,6 @@
<span class="">{{baseResult_.objectTitle}}</span>
</span>
</h2>
{{#block "htmBodyGraphLocation"}}{{/block}}
{{#block "htmBodyGraph"}}{{/block}}
<div class="pageContent w3-content ">
<div id="site-calendar-box">
<div id="site-calendar"><!-- // --></div>
</div>
{{/inline}}
{{#*inline "htmBodyAllBaseResultPage"}} <!-- #*inline "htmBodyAllBaseResultPage" -->
<h1>
Expand Down Expand Up @@ -518,6 +495,11 @@
</div>
{{#block "htmBodyGraphLocation"}}{{/block}}
{{#block "htmBodyGraph"}}{{/block}}
<div class="pageContent w3-content ">
<div id="site-calendar-box">
<div id="site-calendar"><!-- // --></div>
</div>
</div>
<div class="pageContent w3-content ">
{{#eq baseResultCount int0}}
{{#block "htmBodyCount0"}}{{/block}}
Expand Down
Loading

0 comments on commit 9bf5101

Please sign in to comment.