com.clickntap.build.xml.ftl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of click_framework Show documentation
Show all versions of click_framework Show documentation
Java Framework based on Spring Framework, Freemarker and Simplicity
The newest version!
[#assign entities = this.projectElement.element("entities")]
[#if entities??]
[#assign prefix = entities.attributeValue("prefix")]
[#list entities.elements("g") as g]
[#assign package = g.attributeValue("name")]
[#assign xml]
[#list g.elements("entity") as entity]
[/#list]
[#assign range]
[#list g.elements("entity") as entity]
[#assign n = 0]
[#list entity.elements("field") as field]
[#if field.attributeValue("name") == "start_date"] [#assign n = n + 1] [/#if]
[#if field.attributeValue("name") == "end_date"] [#assign n = n + 1] [/#if]
[/#list]
[#if n == 2]
[#noparse]${[/#noparse]this.startDate} or (end_date is null and start_date > [#noparse]${[/#noparse]this.startDate}))
]]>
[/#if]
[/#list]
[/#assign]
${range?trim}
[/#assign]
${this.save(xml,"src/main/resources/"+this.projectPackage.replace(".","/")+"/bo/"+package+"/"+package?capitalize+"Selector.xml")!}
[#list g.elements("entity") as entity]
[#assign xml]
[#list entity.elements("field") as field]
[#if field.attributeValue("name")?contains("password")]
[#assign passwordName = this.getter(field.attributeValue("name"))?replace("get","")]
[/#if]
[/#list]
[#list entities.elements("g") as og]
[#assign opackage = og.attributeValue("name")]
[#list og.elements("entity") as oentity]
[#list oentity.elements("field") as ofield]
[#if ofield.attributeValue("references")??]
[#if ofield.attributeValue("references") == package+"."+entity.attributeValue("name")]
[#if opackage+"."+oentity.attributeValue("name") == package+"."+entity.attributeValue("name")]
[#else]
[#if ofield.attributeValue("method-name")??]
[#else]
[/#if]
[#if ofield.attributeValue("limited")??]
[/#if]
[/#if]
[/#if]
[/#if]
[/#list]
[/#list]
[/#list]
[#list entity.elements("field") as field]
[#if (field.attributeValue("unique")!"") == "yes"]
[/#if]
[#if field.attributeValue("name") == "password"]
[/#if]
[#if field.attributeValue("name")?contains("password")]
[#assign passwordName = this.getter(field.attributeValue("name"))?replace("get","")]
[/#if]
[/#list]
[#list entity.elements("field") as field][#if (field.attributeValue("search")!"") == "yes"] [/#if][/#list]
[/#assign]
[#assign xml = xml?replace("{this.md5}","{this.get('md5')}")]
${this.save(xml,"src/main/resources/"+this.projectPackage.replace(".","/")+"/bo/"+package+"/"+entity.attributeValue("name")+".xml")!}
[/#list]
[/#list]
[/#if]