Findbyprimary key method works fine in CMP 2.0 as Websphere 5.0 an appserver. But for other finder methods finderhelper interface and finderobject class is required. In finder object class it is mentioned about super class given below... com.ibm.vap.finders.VapEJSJDBCFinderObject
where do you find the above class to set in classpath.
The code for finderobject class is :
package vivek;
//import com.ibm.vap.finders.VapEJSJDBCFinderObject ;
/**
* Implementation class for methods in
* AccountBeanFinderHelper.
*/
public class AccountBeanFinderObject extends
com.ibm.vap.finders.VapEJSJDBCFinderObject
implements
AccountBeanFinderHelper {
public java.sql.PreparedStatement
findBigAccounts(double balance)
throws Exception {
PreparedStatement ps = null;
int mergeCount = getMergedWhereCount();
int columnCount = 1;
ps = getMergedPreparedStatement("a.balance > ?1");
for (int i=0; i <(columnCount*mergeCount); i=i+columnCount) {
ps.setInt(i+1, balance);
}
return ps;
}
}
and for finderhelper interface is:
package vivek;
//import com.ibm.vap.finders.VapEJSJDBCFinderObject ;
public interface AccountBeanFinderHelper
{
public java.sql.PreparedStatement
findBigAccounts(double db)
throws Exception;
String findBigAccountsWhereClause="select * from containermanaged
where balance > ?1";
}
can anyone help me out ..............
if any other details are required let me know.......
Thanks.