Class StaticText
- java.lang.Object
-
- net.sf.jkniv.sqlegance.builder.xml.dynamic.StaticText
-
- All Implemented Interfaces:
ITextTag
public class StaticText extends Object implements ITextTag
This class represent text found at NodeValue from tag at XML document. Sample<update id="updateAuthor2" type="NATIVE"> update Author <set> <if test="username != null">username = #{username},</if> <if test="password != null">password = #{password},</if> <if test="email != null">email = #{email},</if> <if test="bio != null">bio = #{bio},</if> </set> where id=#{id} </update>Here we have two StaticText objects:update Author
andwhere id=#{id}- Author:
- Alisson Gomes
-
-
Constructor Summary
Constructors Constructor Description StaticText(String text)build static text object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleaneval(Object rootObjects)Evaluate if attribute test is true.List<? extends ITextTag>getTags()Collections from inner tags (WhereTag,SetTag...)StringgetText()Retrieve the text from XML element.StringgetText(Object rootObjects)Evaluate if attribute test is true or false with OGNL expression.booleanisDynamic()Indicate if text is dynamic or static.booleanisDynamicGroup()Indicate if text contains a dynamic group of tags like: SetTag and WhereTag.
-
-
-
Constructor Detail
-
StaticText
public StaticText(String text)
build static text object.- Parameters:
text- static
-
-
Method Detail
-
eval
public boolean eval(Object rootObjects)
Evaluate if attribute test is true.
-
getText
public String getText()
Retrieve the text from XML element.
-
getText
public String getText(Object rootObjects)
Description copied from interface:ITextTagEvaluate if attribute test is true or false with OGNL expression. Something
-
isDynamic
public boolean isDynamic()
Indicate if text is dynamic or static.
-
isDynamicGroup
public boolean isDynamicGroup()
Description copied from interface:ITextTagIndicate if text contains a dynamic group of tags like: SetTag and WhereTag.- Specified by:
isDynamicGroupin interfaceITextTag- Returns:
- true returned if dynamic, false otherwise.
-
-