Class ConditionalTagHandler
java.lang.Object
com.ibatis.sqlmap.engine.mapping.sql.dynamic.elements.BaseTagHandler
com.ibatis.sqlmap.engine.mapping.sql.dynamic.elements.ConditionalTagHandler
- All Implemented Interfaces:
SqlTagHandler
- Direct Known Subclasses:
IsEmptyTagHandler
,IsEqualTagHandler
,IsGreaterEqualTagHandler
,IsGreaterThanTagHandler
,IsLessEqualTagHandler
,IsLessThanTagHandler
,IsNullTagHandler
,IsParameterPresentTagHandler
,IsPropertyAvailableTagHandler
The Class ConditionalTagHandler.
-
Field Summary
FieldsFields inherited from interface com.ibatis.sqlmap.engine.mapping.sql.dynamic.elements.SqlTagHandler
INCLUDE_BODY, REPEAT_BODY, SKIP_BODY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected long
compare
(SqlTagContext ctx, SqlTag tag, Object parameterObject) Compare.protected long
compareValues
(Class type, Object value1, Object value2) Compare values.protected Object
convertValue
(Class type, String value) Convert value.int
doEndFragment
(SqlTagContext ctx, SqlTag tag, Object parameterObject, StringBuilder bodyContent) Do end fragment.int
doStartFragment
(SqlTagContext ctx, SqlTag tag, Object parameterObject) Do start fragment.protected String
getResolvedProperty
(SqlTagContext ctx, SqlTag tag) This method will add the proper index values to an indexed property string if we are inside an iterate tag.abstract boolean
isCondition
(SqlTagContext ctx, SqlTag tag, Object parameterObject) Checks if is condition.Methods inherited from class com.ibatis.sqlmap.engine.mapping.sql.dynamic.elements.BaseTagHandler
doPrepend
-
Field Details
-
NOT_COMPARABLE
public static final long NOT_COMPARABLEThe Constant NOT_COMPARABLE.- See Also:
-
-
Constructor Details
-
ConditionalTagHandler
public ConditionalTagHandler()
-
-
Method Details
-
isCondition
Checks if is condition.- Parameters:
ctx
- the ctxtag
- the tagparameterObject
- the parameter object- Returns:
- true, if is condition
-
doStartFragment
Description copied from interface:SqlTagHandler
Do start fragment.- Specified by:
doStartFragment
in interfaceSqlTagHandler
- Overrides:
doStartFragment
in classBaseTagHandler
- Parameters:
ctx
- the ctxtag
- the tagparameterObject
- the parameter object- Returns:
- the int
-
doEndFragment
public int doEndFragment(SqlTagContext ctx, SqlTag tag, Object parameterObject, StringBuilder bodyContent) Description copied from interface:SqlTagHandler
Do end fragment.- Specified by:
doEndFragment
in interfaceSqlTagHandler
- Overrides:
doEndFragment
in classBaseTagHandler
- Parameters:
ctx
- the ctxtag
- the tagparameterObject
- the parameter objectbodyContent
- the body content- Returns:
- the int
-
compare
Compare.- Parameters:
ctx
- the ctxtag
- the tagparameterObject
- the parameter object- Returns:
- the long
-
compareValues
Compare values.- Parameters:
type
- the typevalue1
- the value 1value2
- the value 2- Returns:
- the long
-
convertValue
Convert value.- Parameters:
type
- the typevalue
- the value- Returns:
- the object
-
getResolvedProperty
This method will add the proper index values to an indexed property string if we are inside an iterate tag.- Parameters:
ctx
- the ctxtag
- the tag- Returns:
- the resolved property
-