Class LoadPathsMethod
java.lang.Object
ch.tocco.nice2.templating.impl.freemarker.methods.LoadPathsMethod
- All Implemented Interfaces:
freemarker.template.TemplateMethodModel
,freemarker.template.TemplateMethodModelEx
,freemarker.template.TemplateModel
loads paths for a given freemarker EntityListSequenceModel
parameters:
1. freemarker EntityListSequenceModel (e.g. baseData)
2. paths as String, comma seperated
3. optional, Batch Size as int, default is 5000, may be lowered if there are memory issues
returns a List of Maps that can be accessed similarly to an EntityListSequenceModel
example:
[#assign memberships = loadPaths(baseData, "relUser.firstname,relUser.lastname,relUser.birthdate,relUser.relAddress_user.relAddress.company_c")/]
[#list memberships as membership]
${membership.relUser.firstname} ${membership.relUser.lastname}
...
[/#list]
-
Field Summary
Fields inherited from interface freemarker.template.TemplateModel
NOTHING
-
Constructor Summary
ConstructorDescriptionLoadPathsMethod
(PersistenceService persistenceService, PathQueryTemplateHelper pathQueryTemplateHelper) -
Method Summary
-
Constructor Details
-
LoadPathsMethod
public LoadPathsMethod(PersistenceService persistenceService, PathQueryTemplateHelper pathQueryTemplateHelper)
-
-
Method Details
-
exec
- Specified by:
exec
in interfacefreemarker.template.TemplateMethodModel
- Specified by:
exec
in interfacefreemarker.template.TemplateMethodModelEx
- Throws:
freemarker.template.TemplateModelException
-