Package org.mybatis.scripting.freemarker
Class ParamObjectAdapter
java.lang.Object
org.mybatis.scripting.freemarker.ParamObjectAdapter
- All Implemented Interfaces:
freemarker.template.TemplateHashModel
,freemarker.template.TemplateModel
Important: if you are using some object that already has property "p", then MyBatisParamDirective will be unavailable
from script.
- Author:
- elwood
-
Field Summary
Fields inherited from interface freemarker.template.TemplateModel
NOTHING
-
Constructor Summary
ConstructorDescriptionParamObjectAdapter
(Object paramObject, ArrayList generatedParams, freemarker.template.Version incompatibleImprovementsVersion) -
Method Summary
Modifier and TypeMethodDescriptionfreemarker.template.TemplateModel
boolean
isEmpty()
void
putAdditionalParam
(String key, freemarker.template.TemplateModel value) Puts the additional parameter into adapter, it will be available if no existing property with same key exists.
-
Constructor Details
-
ParamObjectAdapter
-
-
Method Details
-
putAdditionalParam
Puts the additional parameter into adapter, it will be available if no existing property with same key exists. For example, it is suitable to add custom objects and directives into dataContext. -
getGeneratedParams
-
get
public freemarker.template.TemplateModel get(String key) throws freemarker.template.TemplateModelException - Specified by:
get
in interfacefreemarker.template.TemplateHashModel
- Throws:
freemarker.template.TemplateModelException
-
isEmpty
public boolean isEmpty() throws freemarker.template.TemplateModelException- Specified by:
isEmpty
in interfacefreemarker.template.TemplateHashModel
- Throws:
freemarker.template.TemplateModelException
-