| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- package xin.glue.ui.B.B01;
- import com.posdata.glue.biz.activity.PosActivity;
- import com.posdata.glue.biz.constants.PosBizControlConstants;
- import com.posdata.glue.context.PosContext;
- import com.posdata.glue.dao.PosDaoException;
- import com.posdata.glue.dao.PosGenericDao;
- import com.posdata.glue.dao.vo.PosParameter;
- import com.posdata.glue.dao.vo.PosRowSet;
- public class FindCommon extends PosActivity
- {
- public String runActivity(PosContext context)
- {
- try
- {
- //PosGenericDao dao = this.getDao("mesdao");
- //PosRowSet result = null;
- String[] dao = (String[])context.get("dao");
- String[] sqlkey = (String[])context.get("sqlkey");
- String[] param = (String[])context.get("param");
-
- PosGenericDao pgdao = this.getDao(dao[0]);
- PosRowSet result = null;
- PosParameter posParam = null;
- System.out.println(param.length);
- //ÉèÖòéѯ²ÎÊý
- if(param.length > 0)
- {
- posParam = new PosParameter();
- String[] paramList = param[0].split(",");
- for(int i = 0;i<paramList.length;i++)
- {
- if(" ".equals(paramList[i]))
- {
- posParam.setWhereClauseParameter(i,"");
- }
- else
- {
- posParam.setWhereClauseParameter(i, paramList[i]);
- }
- }
- }
-
- //²éѯ½á¹û
- if(null != posParam)
- {
- result = pgdao.find(sqlkey[0],posParam);
- }
- else
- {
- result = pgdao.find(sqlkey[0]);
- }
-
- context.put("result", result);
- }
- catch(Exception e)
- {
- throw new PosDaoException((new StringBuffer(400).append("Parameters initialize failed. detailMessage = ")).append(e.toString()).toString() , e);
- }
- return PosBizControlConstants.SUCCESS;
- }
- }
|