Hi, henry
Sure, here is the code :
<code>
private int getMemberUsersRecordCount() { // getLoggedInUserName() = e.g.
'12341234'
return
memberUsersService.getUserCountByVirtualId(getLoggedInUserName());
}
public class MemberUsersService implement MemberUsersService {
...
public List<MemberUsers> getUsersListByVirtualId(String virtualId)
throws Exception {
log.debug("# Get user list by virtual id: " + virtualId);
MemberUsersCriteria criteria = new MemberUsersCriteria();
criteria.createCriteria().andVirtualIdEqualTo(virtualId);
return memberUsersDAO.selectMemberUsersByExample(criteria);
}
}
</code>
And this is the query in file MemberUsersService_sqlmap.xml :
<code>
<select id="ibatorgenerated_countByExample"
parameterClass="com.gng.db.core.ibatis.entity.MemberUsersCriteria"
resultClass="java.lang.Integer">
<!--
WARNING - This element is automatically generated by Apache iBATIS
ibator, do not modify.
This element was generated on Wed Mar 03 21:40:17 ICT 2010.
-->
select count(*) from GNGUSER.MEMBER_USERS
<include
refid="GNGUSER_MEMBER_USERS.ibatorgenerated_Example_Where_Clause" />
</select>
</code>
** where the '<include ' will be replaced by : "WHERE VIRTUAL_ID =
#virtualId#".
Regards,
Kristian W.
--
View this message in context:
http://n2.nabble.com/Table-throws-exception-when-the-amount-of-retrieved-data-is-less-than-its-page-size-tp4672850p4673468.html
Sent from the click-user mailing list archive at Nabble.com.