📄 quaryservice.java
字号:
package com.xuntian.material.model.service.quary;
import java.sql.SQLException;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionForm;
import com.xuntian.material.bean.BaseBean;
import com.xuntian.material.bean.MsgBean;
import com.xuntian.material.bean.entity.QuaryEntity;
import com.xuntian.material.exception.BaseInfoException;
import com.xuntian.material.exception.ConnectPoolException;
import com.xuntian.material.model.service.BaseService;
import com.xuntian.material.util.Constants;
public class QuaryService extends BaseService {
@Override
public List<List<String>> search(ActionForm form) throws BaseInfoException {
List<List<String>> list = null;
MsgBean bean=(MsgBean)form;
try {
list = new QuaryEntity(bean).queryList();
} catch (ConnectPoolException cpe) {
throw new BaseInfoException(Constants.ERRMSG_SELECT, cpe);
}catch (SQLException cpe) {
throw new BaseInfoException(Constants.ERRMSG_SELECT, cpe);
}
return list;
}
@Override
public BaseBean fill(ActionForm form) throws BaseInfoException {
MsgBean msgbean=(MsgBean)form;
QuaryEntity entity=new QuaryEntity(msgbean);
try{
entity.fill();
} catch (ConnectPoolException cpe) {
throw new BaseInfoException(Constants.ERRMSG_SELECT, cpe);
} catch (SQLException sqle) {
throw new BaseInfoException(Constants.ERRMSG_SELECT, sqle);
}
return entity.getMsgBean();
}
@Override
public int save(ActionForm form) throws BaseInfoException {
// TODO Auto-generated method stub
return 0;
}
@Override
public int delete(HttpServletRequest request) throws BaseInfoException {
// TODO Auto-generated method stub
return 0;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -