HI all,
I am using criteria querry and following is the where clause for the
same.
<sql id="Criteria_Where_Clause" >
<iterate property="oredCriteria" conjunction="or" prepend="where"
removeFirstPrepend="iterate" >
(
<iterate prepend="and"
property="oredCriteria[].criteriaWithoutValue" conjunction="and" >
$oredCriteria[].criteriaWithoutValue[]$
</iterate>
<iterate prepend="and"
property="oredCriteria[].criteriaWithSingleValue" conjunction="and" >
$oredCriteria[].criteriaWithSingleValue[].condition$
#oredCriteria[].criteriaWithSingleValue[].value#
</iterate>
<iterate prepend="and"
property="oredCriteria[].criteriaWithListValue" conjunction="and" >
$oredCriteria[].criteriaWithListValue[].condition$
<iterate
property="oredCriteria[].criteriaWithListValue[].values" open="("
close=")" conjunction="," >
#oredCriteria[].criteriaWithListValue[].values[]#
</iterate>
</iterate>
<iterate prepend="and"
property="oredCriteria[].criteriaWithBetweenValue" conjunction="and" >
$oredCriteria[].criteriaWithBetweenValue[].condition$
#oredCriteria[].criteriaWithBetweenValue[].values[0]# and
#oredCriteria[].criteriaWithBetweenValue[].values[1]#
</iterate>
)
</iterate>
I want to dynamically change the value of conjunction with "OR" and
"AND" .
I am constructing and passing the criteria object here to this where
clause. I have tried with $ $ and # # but it is not working .
can any body please help me.
Regards
Yuvraj