mirror of
https://github.com/querydsl/querydsl.git
synced 2026-06-30 21:08:30 +08:00
formalized Path types
This commit is contained in:
parent
0890d647ee
commit
982675ef0c
@ -1,4 +1,4 @@
|
||||
<#assign reserved = ["isnull", "isnotnull", "toString", "hashCode", "getClass", "notify", "notifyAll", "wait"]>
|
||||
<#assign reserved = ["isnull", "isnotnull", "_type", "toString", "hashCode", "getClass", "notify", "notifyAll", "wait"]>
|
||||
package ${package};
|
||||
|
||||
<#if (dtoTypes?size > 0)>
|
||||
@ -38,18 +38,19 @@ ${include}
|
||||
<#list decl.collectionFields as field>
|
||||
public final PathEntityCollection<${field.typeName}> ${field.name} = _collection("${field.name}",${field.typeName}.class);
|
||||
public ${pre}${field.simpleTypeName} ${field.name}(int index) {
|
||||
return new ${pre}${field.simpleTypeName}(this+".${field.name}["+index+"]");
|
||||
return new ${pre}${field.simpleTypeName}(this,"${field.name}["+index+"]");
|
||||
}
|
||||
</#list>
|
||||
<#list decl.entityFields as field>
|
||||
public final PathEntityRenamable<${field.typeName}> ${field.name} = _entity("${field.name}",${field.typeName}.class);
|
||||
</#list>
|
||||
${pre}${decl.simpleName}(String path) {super(${decl.name}.class,path);}
|
||||
${pre}${decl.simpleName}(Path<?> parent, String path) {super(${decl.name}.class, parent, path);}
|
||||
<#list decl.entityFields as field>
|
||||
<#if !reserved?seq_contains(field.name)>
|
||||
private ${pre}${field.simpleTypeName} _${field.name};
|
||||
public ${pre}${field.simpleTypeName} ${field.name}() {
|
||||
if (_${field.name} == null) _${field.name} = new ${pre}${field.simpleTypeName}(this+".${field.name}");
|
||||
if (_${field.name} == null) _${field.name} = new ${pre}${field.simpleTypeName}(this,"${field.name}");
|
||||
return _${field.name};
|
||||
}
|
||||
</#if>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user