/** * @Name:elecCommonMsgObjectListToVOList @Description : 将待办事宜查询的结果由Object[]转换成VO对象 * * @author 屈卞忠 * @version :V1.0.0(版本号) @Create Date :2015-08-03 @Parameters: List<Object[]> list 存放Object[]数组对象 * @return: List<ElecCommonMsgForm> VO对象 */ private List<ElecCommonMsgForm> elecCommonMsgObjectListToVOList(List<Object[]> list) { List<ElecCommonMsgForm> formList = new ArrayList<ElecCommonMsgForm>(); ElecCommonMsgForm elecCommonMsgForm = null; for (int i = 0; list != null && i < list.size(); i++) { Object[] object = list.get(i); elecCommonMsgForm = new ElecCommonMsgForm(); elecCommonMsgForm.setStationRun(object[0].toString()); elecCommonMsgForm.setDevRun(object[1].toString()); formList.add(elecCommonMsgForm); } return formList; }
/** * @Name:elecCommonMsgPOListToVOList @Description : 将待办事宜的结果信息,从PO对象转换为VO对象 * * @author 屈卞忠 * @version :V1.0.0(版本号) @Create Date :2015-08-03 @Parameters: List<ElecCommonMsg> list PO对象结果集 * @return:List<ElecCommonMsgForm> VO对象结果集 */ private List<ElecCommonMsgForm> elecCommonMsgPOListToVOList(List<ElecCommonMsg> list) { List<ElecCommonMsgForm> formlist = new ArrayList<ElecCommonMsgForm>(); ElecCommonMsgForm elecCommonMsgForm = null; for (int i = 0; list != null && i < list.size(); i++) { ElecCommonMsg elecCommonMsg = list.get(i); elecCommonMsgForm = new ElecCommonMsgForm(); elecCommonMsgForm.setComID(elecCommonMsg.getComID()); elecCommonMsgForm.setStationRun(elecCommonMsg.getStationRun()); elecCommonMsgForm.setDevRun(elecCommonMsg.getDevRun()); elecCommonMsgForm.setCreateDate( String.valueOf( elecCommonMsg.getCreateDate() != null ? elecCommonMsg.getCreateDate() : "")); formlist.add(elecCommonMsgForm); } return formlist; }