Java开发网 |
注册 |
登录 |
帮助 |
搜索 |
排行榜 |
发帖统计
|
您没有登录 |
» Java开发网 » Java EE 综合讨论区
» Hibernate
打印话题 寄给朋友 订阅主题 |
作者 | 刷新时,数据时有时无(万分紧急,老板急催!) |
wz_gu
发贴: 27 积分: 0 |
于 2004-12-01 11:26
和session is closed的问题相似,但是又不同,在那篇文章中,数据刷新时消失,这个就只是更离奇,数据重复。写一个树形显示,可以成功,但是出了一些问题:在刷新时,会显示两个树形,每刷新一次多一个,头疼。代码如下: package com.peking.jsp; import java.util.ArrayList; import java.util.Map; import java.util.Set; import java.util.List; import java.util.Iterator; import java.util.ListIterator; import com.peking.model.Tmenu; import com.peking.Hibernate2Session; import net.sf.hibernate.Session; import com.peking.util.StringProcess; import com.peking.menu.TreeMenu; import com.peking.objectutil.ObjectProcess; public class JspElement { private static boolean _isOpen = false; private static Session _session = null; public static String getSessionVar(Map session, String sName) { try { return String.valueOf(session.get(sName)); } catch (Exception e) { return null; } } public static String getTreeHtml(String sSQL, String sKeyFiled, String sNameField, String sChildFiled, String sCurRoot, String sURL, String sImgPath) { String sTreeMenuHtml = ""; if (sSQL == null || sSQL.trim().equals("")) { return sTreeMenuHtml; } if (sKeyFiled == null || sKeyFiled.trim().equals("") || sNameField == null || sNameField.trim().equals("")) { return sTreeMenuHtml; } try { openSession(); Set setChild = null; Iterator iterChild = null; Object objParent = null; Object objChild = null; String sKeyValue = ""; String sNameValue = ""; String sParentKey = ""; int iItemIndex = 1000; List list = _session.find(sSQL); ListIterator iter = list.listIterator(); while (iter.hasNext()) { objChild = null; objParent = null; iterChild = null; sParentKey = ""; objParent = iter.next(); //key sParentKey = String.valueOf(ObjectProcess .getPropertyValueByName(objParent, sKeyFiled)); //name sNameValue = String.valueOf(ObjectProcess .getPropertyValueByName(objParent, sNameField)); //get root item html sTreeMenuHtml = sTreeMenuHtml + getRootItem(iItemIndex, sURL, sParentKey, sNameValue, sImgPath); //get child item setChild = (Set) ObjectProcess.getPropertyValueByName( objParent, sChildFiled); if (setChild != null && setChild.isEmpty() == false) { while (!isLeaf(sParentKey)) { } sTreeMenuHtml = sTreeMenuHtml + getChildStart(iItemIndex, sCurRoot, sParentKey); iterChild = setChild.iterator(); while (iterChild.hasNext()) { objChild = null; objChild = iterChild.next(); sTreeMenuHtml = sTreeMenuHtml + getChildItem(sURL, sParentKey, objChild, sKeyFiled, sNameField, sImgPath); } sTreeMenuHtml = sTreeMenuHtml + getEndChildEnd(); } iItemIndex++; } } catch (Exception e) { } try { closeSession(); } catch (Exception e1) { } return sTreeMenuHtml; } private static String getRootItem(int iItemNo, String sURL, String sKeyValye, String sNameValue, String sImgPath) { String sRootItem = ""; if (sKeyValye == null || sNameValue == null) { return sRootItem; } sRootItem = "<a "; sRootItem = sRootItem + " href=\"javascript:onChange('" + String.valueOf(iItemNo) + "')\"><img height=20 \r\n"; sRootItem = sRootItem + " src=\"" + sImgPath + "q%2B.gif\" width=19 \r\n"; sRootItem = sRootItem + " align=absMiddle border=0><img height=20 \r\n"; sRootItem = sRootItem + " src=\"" + sImgPath + "qfolder_close.gif\" \r\n"; sRootItem = sRootItem + " width=19 align=absMiddle \r\n"; sRootItem = sRootItem + " border=0><span class=\"Abc\"> " + StringProcess.getSubString(sNameValue, 7, "...") + "</span>\r\n"; sRootItem = sRootItem + " </a><br>\r\n"; return sRootItem; } private static String getChildStart(int iItemNo, String sCurRoot, String sParentKey) { if (sCurRoot != null && sParentKey != null && sCurRoot.equals(sParentKey)) { return "<span id=child" + String.valueOf(iItemNo) + " >\r\n"; } return "<span id=child" + String.valueOf(iItemNo) + " style=\"DISPLAY: none\">\r\n"; } private static String getEndChildEnd() { return "</span>\r\n"; } private static String getChildItem(String sURL, String sParentKey, Object objInfo, String sKeyFiled, String sNameFiled, String sImgPath) { String sChildItem = ""; String sKeyValue = ""; String sNameValue = ""; if (objInfo == null) { return sChildItem; } try { sKeyValue = String.valueOf(ObjectProcess.getPropertyValueByName( objInfo, sKeyFiled)); sNameValue = String.valueOf(ObjectProcess.getPropertyValueByName( objInfo, sNameFiled)); sChildItem = " <img height=17 \r\n"; sChildItem = sChildItem + " src=\"" + sImgPath + "qline_tri.gif\" width=19 \r\n"; sChildItem = sChildItem + " align=absMiddle><img height=11 \r\n"; sChildItem = sChildItem + " src=\"" + sImgPath + "qreddot.gif\" width=6 \r\n"; sChildItem = sChildItem + " align=absMiddle> \r\n"; sChildItem = sChildItem + " <a href=\"" + sURL + "?parentid=" + sParentKey + "&childid=" + sKeyValue + "\" class=\"Abc\" title=\"" + sNameValue + "\">" + StringProcess.getSubString(sNameValue, 7, "...") + "</a><br>\r\n"; } catch (Exception e) { sChildItem = ""; } return sChildItem; } public static String getTreeMenu(String sParentSQL, String sKeyFiled, String sNameField, String sChildFiled, String sRootName, String sCurRoot, String sURL) { String sTreeMenu = ""; if (sParentSQL == null || sParentSQL.trim().equals("")) { return sTreeMenu; } try { openSession(); List list = _session.find(sParentSQL); ListIterator iter = list.listIterator(); Set setChild = null; Iterator iterChild = null; Object objParent = null; Object objChild = null; String sKeyValue = ""; String sNameValue = ""; String sParentKey = ""; Object root = TreeMenu.createRoot(sRootName, true); Object rootParent = null; while (iter.hasNext()) { objChild = null; objParent = null; iterChild = null; rootParent = null; sParentKey = ""; objParent = iter.next(); //key sParentKey = String.valueOf(ObjectProcess .getPropertyValueByName(objParent, sKeyFiled)); //name sNameValue = String.valueOf(ObjectProcess .getPropertyValueByName(objParent, sNameField)); if (sCurRoot != null && sCurRoot.equals(sKeyValue)) { rootParent = TreeMenu.addChildOpen(root, sNameValue, sURL + "?parentid=" + sParentKey, true); } else { rootParent = TreeMenu.addChild(root, sNameValue, sURL + "?parentid=" + sParentKey); } setChild = (Set) ObjectProcess.getPropertyValueByName( objParent, sChildFiled); if (setChild != null && setChild.isEmpty() == false) { iterChild = setChild.iterator(); while (iterChild.hasNext()) { objChild = null; objChild = iterChild.next(); sKeyValue = String.valueOf(ObjectProcess .getPropertyValueByName(objChild, sKeyFiled)); sNameValue = String.valueOf(ObjectProcess .getPropertyValueByName(objChild, sNameField)); TreeMenu.addChild(rootParent, sNameValue, sURL + "?parentid=" + sParentKey + "&childid=" + sKeyValue); } } } } catch (Exception e) { } try { closeSession(); } catch (Exception e1) { } sTreeMenu = TreeMenu.getXMLString(); return sTreeMenu; } public static String getParentChildListParameter(String sParentSQL, String sValueFiled, String sTextField, String sChildFiled, String sSelectValue, String sChildDelim) { String sOptionsHtml = ""; if (sParentSQL == null || sParentSQL.trim().equals("")) { return sOptionsHtml; } if (sSelectValue == null) { sSelectValue = ""; } if (sChildDelim == null) { sChildDelim = ""; } try { openSession(); List list = _session.find(sParentSQL); ListIterator iter = list.listIterator(); Set setChild = null; Iterator iterChild = null; Object objParent = null; Object objChild = null; while (iter.hasNext()) { objChild = null; objParent = null; iterChild = null; objParent = iter.next(); sOptionsHtml = sOptionsHtml + getOptionParam(objParent, sValueFiled, sTextField, sSelectValue, "", true, true); setChild = (Set) ObjectProcess.getPropertyValueByName( objParent, sChildFiled); if (setChild != null && setChild.isEmpty() == false) { iterChild = setChild.iterator(); while (iterChild.hasNext()) { objChild = null; objChild = iterChild.next(); sOptionsHtml = sOptionsHtml + getOptionParam(objChild, sValueFiled, sTextField, sSelectValue, sChildDelim, false, true); } } } } catch (Exception e) { } try { closeSession(); } catch (Exception e1) { } return sOptionsHtml; } public static String getParentChildList(String sParentSQL, String sValueFiled, String sTextField, String sChildFiled, String sSelectValue, String sChildDelim) { String sOptionsHtml = ""; if (sParentSQL == null || sParentSQL.trim().equals("")) { return sOptionsHtml; } if (sSelectValue == null) { sSelectValue = ""; } if (sChildDelim == null) { sChildDelim = ""; } try { openSession(); List list = _session.find(sParentSQL); ListIterator iter = list.listIterator(); Set setChild = null; Iterator iterChild = null; Object objParent = null; Object objChild = null; while (iter.hasNext()) { objChild = null; objParent = null; iterChild = null; objParent = iter.next(); sOptionsHtml = sOptionsHtml + getOption(objParent, sValueFiled, sTextField, sSelectValue, ""); setChild = (Set) ObjectProcess.getPropertyValueByName( objParent, sChildFiled); if (setChild != null && setChild.isEmpty() == false) { iterChild = setChild.iterator(); while (iterChild.hasNext()) { objChild = null; objChild = iterChild.next(); sOptionsHtml = sOptionsHtml + getOption(objChild, sValueFiled, sTextField, sSelectValue, sChildDelim); } } } } catch (Exception e) { } try { closeSession(); } catch (Exception e1) { } return sOptionsHtml; } public static String sOptionsHtml(String sSQL, String sSelectValue) { String sHtml = ""; try { if (sSQL == null) { return ""; } if (sSelectValue == null) { sSelectValue = ""; } openSession(); List list = _session.find(sSQL); ListIterator iter = list.listIterator(); String sValue = null; String sText = null; String sSelected = ""; while (iter.hasNext()) { sSelected = ""; Object[] obj = (Object[]) iter.next(); sValue = String.valueOf(obj[0]); sText = String.valueOf(obj[1]); if (sValue == null || sText == null) { continue; } if (sSelectValue != null && sValue.equals(sSelectValue)) { sSelected = "selected"; } sHtml = sHtml + "<option value=\"" + sValue + "\" " + sSelected + " >" + sText + "</option>\r\n"; } } catch (Exception e) { sHtml = ""; } try { closeSession(); } catch (Exception e) { } return sHtml; } public static String getPageHTML(String sSQL, String sPageNum, String sStartPage, String sURL) { return getPageListHTML(sSQL, sPageNum, sStartPage, sURL, ""); } public static String getPageListHTML(String sSQL, String sPageNum, String sStartPage, String sURL, String sQueryValue) { String sHTML = ""; int iTotalCount = getRecordCount(sSQL); String sTotalCount = String.valueOf(iTotalCount); String sTotalPage = ""; int iPageNum = StringProcess.getIntValue(sPageNum, 1); int iStartPage = StringProcess.getIntValue(sStartPage, 0); int iTotalPage = (int) Math.ceil((double) iTotalCount / (double) iPageNum); sTotalPage = String.valueOf(iTotalPage); if (sQueryValue == null) { sQueryValue = ""; } try { sHTML = "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"p9gray\">" + "<form name=\"form_pagebar\" method=\"post\" action=\"" + sURL; if (sQueryValue != null && sQueryValue.trim().equals("") == false) { sHTML = sHTML + "?" + sQueryValue; } sHTML = sHTML + "\">" + "<tr>" + "<td valign=\"middle\" align=\"center\" background=\"../images/03_content_backgr.png\" height=\"23\">" + "记录总计" + sTotalCount + "条 | 共有" + sTotalPage + "页 | 当前第" + sStartPage + "页 | 跳转到" + "<input type=\"text\" name=\"pageno\" class=\"inputstyle\" size=\"3\" value=\"\">|" + "<a href=\"javascript:goPage('" + sTotalPage + "', '" + sStartPage + "');\"><img border=\"0\" name=\"imageField\" src=\"../images/t_go-1.gif\"" + " align=\"absmiddle\"></a> "; if (iStartPage > 1) { sHTML = sHTML + "<a href=\"javascript:prePage('" + sStartPage + "');\">"; } sHTML = sHTML + "<img src=\"../images/pages-03.gif\" width=\"45\" height=\"12\" border=\"0\" align=\"absmiddle\">"; if (iStartPage > 1) { sHTML = sHTML + "</a> "; } sHTML = sHTML + "|"; if (iStartPage >= 1 && iStartPage < iTotalPage) { sHTML = sHTML + "<a href=\"javascript:nextPage('" + sStartPage + "');\">"; } sHTML = sHTML + "<img src=\"../images/pages-04.gif\" width=\"45\" height=\"12\" border=\"0\" align=\"absmiddle\">"; if (iStartPage >= 1 && iStartPage < iTotalPage) { sHTML = sHTML + "</a> "; } sHTML = sHTML + "| </td></tr></form></table>"; } catch (Exception e) { } try { closeSession(); } catch (Exception e) { } return sHTML; } public static String getPageListHTML(int iTotalCount, String sPageNum, String sStartPage, String sURL, String sQueryValue) { String sHTML = ""; String sTotalCount = String.valueOf(iTotalCount); String sTotalPage = ""; int iPageNum = StringProcess.getIntValue(sPageNum, 1); int iStartPage = StringProcess.getIntValue(sStartPage, 0); int iTotalPage = (int) Math.ceil((double) iTotalCount / (double) iPageNum); sTotalPage = String.valueOf(iTotalPage); if (sQueryValue == null) { sQueryValue = ""; } try { sHTML = "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"p9gray\">" + "<form name=\"form_pagebar\" method=\"post\" action=\"" + sURL; if (sQueryValue != null && sQueryValue.trim().equals("") == false) { sHTML = sHTML + "?" + sQueryValue; } sHTML = sHTML + "\">" + "<tr>" + "<td valign=\"middle\" align=\"center\" background=\"../images/03_content_backgr.png\" height=\"23\">" + "记录总计" + sTotalCount + "条 | 共有" + sTotalPage + "页 | 当前第" + sStartPage + "页 | 跳转到" + "<input type=\"text\" name=\"pageno\" class=\"inputstyle\" size=\"3\" value=\"\">|" + "<a href=\"javascript:goPage('" + sTotalPage + "', '" + sStartPage + "');\"><img border=\"0\" name=\"imageField\" src=\"../images/t_go-1.gif\"" + " align=\"absmiddle\"></a> "; if (iStartPage > 1) { sHTML = sHTML + "<a href=\"javascript:prePage('" + sStartPage + "');\">"; } sHTML = sHTML + "<img src=\"../images/pages-03.gif\" width=\"45\" height=\"12\" border=\"0\" align=\"absmiddle\">"; if (iStartPage > 1) { sHTML = sHTML + "</a> "; } sHTML = sHTML + "|"; if (iStartPage >= 1 && iStartPage < iTotalPage) { sHTML = sHTML + "<a href=\"javascript:nextPage('" + sStartPage + "');\">"; } sHTML = sHTML + "<img src=\"../images/pages-04.gif\" width=\"45\" height=\"12\" border=\"0\" align=\"absmiddle\">"; if (iStartPage >= 1 && iStartPage < iTotalPage) { sHTML = sHTML + "</a> "; } sHTML = sHTML + "| </td></tr></form></table>"; } catch (Exception e) { } try { closeSession(); } catch (Exception e) { } return sHTML; } private static String getOption(Object objInfo, String sValueFiled, String sTextField, String sSelectedValue, String sTextPrefix) { return getOptionParam(objInfo, sValueFiled, sTextField, sSelectedValue, sTextPrefix, false, false); } private static String getOptionParam(Object objInfo, String sValueFiled, String sTextField, String sSelectedValue, String sTextPrefix, boolean isParent, boolean isParam) { if (objInfo == null) { return ""; } if (sTextPrefix == null) { sTextPrefix = ""; } String sOptionHTML = ""; try { String sValue = String.valueOf(ObjectProcess .getPropertyValueByName(objInfo, sValueFiled)); String sText = String.valueOf(ObjectProcess.getPropertyValueByName( objInfo, sTextField)); if (isParam) { if (isParent) { sOptionHTML = "<option value=\"" + sValue + "&parentid=1\""; } else { sOptionHTML = "<option value=\"" + sValue + "&childid=1\""; } } else { sOptionHTML = "<option value=\"" + sValue + "\""; } if (sValue.equals(sSelectedValue)) { sOptionHTML = sOptionHTML + " selected "; } sOptionHTML = sOptionHTML + " alt=\"" + sText + "\""; sOptionHTML = sOptionHTML + " >" + sTextPrefix + sText + "</option>\r\n"; } catch (Exception e) { sOptionHTML = ""; } return sOptionHTML; } private static int getRecordCount(String sSQL) { int iCount = 0; if (sSQL == null) { return iCount; } try { openSession(); List list = _session.find(sSQL); ListIterator iter = list.listIterator(); if (iter.hasNext()) { String sCount = String.valueOf(iter.next()); iCount = StringProcess.getIntValue(sCount, 0); } } catch (Exception e) { iCount = -1; } return iCount; } private static void openSession() throws Exception { _session = Hibernate2Session.currentSession(); _isOpen = _session.isOpen(); if (_isOpen == false) { _session.beginTransaction(); } } private static void closeSession() throws Exception { if (_isOpen == false) { Hibernate2Session.closeSession(); } } public static boolean isLeaf(String sKey) { Tmenu tMenu = null; List list = new ArrayList(); try { openSession(); list = _session .find("from Tmenu as tmenu where tmenu.parentMenu.menuId='" + sKey + "'"); if (list == null || list.size() == 0 || list.get(0) == null) { return true; } else return false; } catch (Exception e) { return false; } finally { try { closeSession(); } catch (Exception e) { } } } static String sTreeMenuHtml = ""; static int iItemIndex = 1000; public static String getTree(String menuID, String sCurRoot, String sURL, String sImgPath) { //String sTreeMenuHtml = ""; if (menuID == null || menuID.trim().equals("")) { return sTreeMenuHtml; } try { openSession(); //int iItemIndex = 1000; List list = _session .find("from Tmenu as tmenu where tmenu.parentMenu.menuId ='" + menuID + "'"); ListIterator iter = list.listIterator(); String menuId = null; String menuName = null; Tmenu tMenu = null; if (iter != null) { while (iter.hasNext()) { tMenu = (Tmenu) iter.next(); //key menuId = tMenu.getMenuId(); //name menuName = tMenu.getMenuName(); if (isLeaf(menuId)) sTreeMenuHtml = sTreeMenuHtml + getChildItem(sURL, menuID, menuId, menuName, sImgPath); else { //get root item html sTreeMenuHtml = sTreeMenuHtml + getRootItem(iItemIndex, sURL, menuID, menuName, sImgPath); sTreeMenuHtml = sTreeMenuHtml + getChildStart(iItemIndex, sCurRoot, menuId); iItemIndex++; getTree(menuId, sCurRoot, sURL, sImgPath); } } sTreeMenuHtml = sTreeMenuHtml + getEndChildEnd(); } _session.flush(); } catch (Exception e) { } try { closeSession(); } catch (Exception e1) { } return sTreeMenuHtml; } private static String getChildItem(String sURL, String parentId, String menuId, String menuName, String sImgPath) { String sChildItem = ""; try { sChildItem = " <img height=17 \r\n"; sChildItem = sChildItem + " src=\"" + sImgPath + "qline_tri.gif\" width=19 \r\n"; sChildItem = sChildItem + " align=absMiddle><img height=11 \r\n"; sChildItem = sChildItem + " src=\"" + sImgPath + "qreddot.gif\" width=6 \r\n"; sChildItem = sChildItem + " align=absMiddle> \r\n"; sChildItem = sChildItem + " <a href=\"" + sURL + "?parentid=" + parentId + "&childid=" + menuId + "\" class=\"Abc\" title=\"" + menuName + "\">" + StringProcess.getSubString(menuName, 7, "...") + "</a><br>\r\n"; } catch (Exception e) { sChildItem = ""; } return sChildItem; } } 程序显示树形只用到了其中的一个方法:getTree(param....)。请高手指点,控制台提示无错误: 11:25:47,093 DEBUG SessionImpl:2880 - Collection found: [com.peking.pmis.model.Tmenu.childMenus#002001], was: [com.peking.pmis.model.Tmenu.childMenus#002001] 11:25:47,109 DEBUG SessionImpl:2880 - Collection found: [com.peking.pmis.model.Tmenu.childMenus#002002], was: [com.peking.pmis.model.Tmenu.childMenus#002002] 11:25:47,109 DEBUG SessionImpl:2880 - Collection found: [com.peking.pmis.model.Tmenu.childMenus#002003], was: [com.peking.pmis.model.Tmenu.childMenus#002003] 11:25:47,109 DEBUG SessionImpl:2880 - Collection found: [com.peking.pmis.model.Tmenu.childMenus#002004], was: [com.peking.pmis.model.Tmenu.childMenus#002004] 11:25:47,109 DEBUG SessionImpl:2880 - Collection found: [com.peking.pmis.model.Tmenu.childMenus#002], was: [com.peking.pmis.model.Tmenu.childMenus#002] 11:25:47,109 DEBUG SessionImpl:2880 - Collection found: [com.peking.pmis.model.Tmenu.childMenus#002001001], was: [com.peking.pmis.model.Tmenu.childMenus#002001001] 11:25:47,109 DEBUG SessionImpl:2880 - Collection found: [com.peking.pmis.model.Tmenu.childMenus#002001002], was: [com.peking.pmis.model.Tmenu.childMenus#002001002] 11:25:47,109 DEBUG SessionImpl:2880 - Collection found: [com.peking.pmis.model.Tmenu.childMenus#002002001], was: [com.peking.pmis.model.Tmenu.childMenus#002002001] 11:25:47,109 DEBUG SessionImpl:2880 - Collection found: [com.peking.pmis.model.Tmenu.childMenus#002002002], was: [com.peking.pmis.model.Tmenu.childMenus#002002002] 11:25:47,109 DEBUG SessionImpl:2880 - Collection found: [com.peking.pmis.model.Tmenu.childMenus#002002001001], was: [com.peking.pmis.model.Tmenu.childMenus#002002001001] 11:25:47,109 DEBUG SessionImpl:2880 - Collection found: [com.peking.pmis.model.Tmenu.childMenus#002002001002], was: [com.peking.pmis.model.Tmenu.childMenus#002002001002] 11:25:47,109 DEBUG SessionImpl:2880 - Collection found: [com.peking.pmis.model.Tmenu.childMenus#002002001001001], was: [com.peking.pmis.model.Tmenu.childMenus#002002001001001] 11:25:47,125 DEBUG SessionImpl:2880 - Collection found: [com.peking.pmis.model.Tmenu.childMenus#002002001002001], was: [com.peking.pmis.model.Tmenu.childMenus#002002001002001] 11:25:47,125 DEBUG SessionImpl:2776 - Processing unreferenced collections 11:25:47,125 DEBUG SessionImpl:2790 - Scheduling collection removes/(re)creates/updates 11:25:47,125 DEBUG SessionImpl:2266 - Flushed: 0 insertions, 0 updates, 0 deletions to 13 objects 11:25:47,125 DEBUG SessionImpl:2271 - Flushed: 0 (re)creations, 0 updates, 0 removals to 13 collections 11:25:47,125 DEBUG Printer:75 - listing entities: 11:25:47,125 DEBUG Printer:82 - com.peking.pmis.model.Tmenu{operationId=null, menuName=?ú?·????????, menuLevel=2, menuId=002002001001, detail=null, parentMenu=Tmenu#002002001, sortNumeber=1, childMenus=uninitialized, deletes=null} 11:25:47,125 DEBUG Printer:82 - com.peking.pmis.model.Tmenu{operationId=null, menuName=?ú?·????±à??, menuLevel=2, menuId=002002, detail=null, parentMenu=Tmenu#002, sortNumeber=2, childMenus=uninitialized, deletes=null} 11:25:47,125 DEBUG Printer:82 - com.peking.pmis.model.Tmenu{operationId=null, menuName=±±??·???, menuLevel=2, menuId=002002001001001, detail=null, parentMenu=Tmenu#002002001001, sortNumeber=1, childMenus=uninitialized, deletes=null} 11:25:47,125 DEBUG Printer:82 - com.peking.pmis.model.Tmenu{operationId=null, menuName=?ú?·±???????????, menuLevel=2, menuId=002004, detail=null, parentMenu=Tmenu#002, sortNumeber=4, childMenus=uninitialized, deletes=null} 11:25:47,125 DEBUG Printer:82 - com.peking.pmis.model.Tmenu{operationId=null, menuName=?ú?·????, menuLevel=2, menuId=002, detail=null, parentMenu=null, sortNumeber=2, childMenus=uninitialized, deletes=null} 11:25:47,125 DEBUG Printer:82 - com.peking.pmis.model.Tmenu{operationId=null, menuName=?ú?·?÷??????, menuLevel=2, menuId=002002001, detail=null, parentMenu=Tmenu#002002, sortNumeber=2, childMenus=uninitialized, deletes=null} 11:25:47,125 DEBUG Printer:82 - com.peking.pmis.model.Tmenu{operationId=null, menuName=???ú?·????, menuLevel=2, menuId=002001001, detail=null, parentMenu=Tmenu#002001, sortNumeber=1, childMenus=uninitialized, deletes=null} 11:25:47,140 DEBUG Printer:82 - com.peking.pmis.model.Tmenu{operationId=null, menuName=?ú?·?÷?????í, menuLevel=2, menuId=002002001002, detail=null, parentMenu=Tmenu#002002001, sortNumeber=2, childMenus=uninitialized, deletes=null} 11:25:47,140 DEBUG Printer:82 - com.peking.pmis.model.Tmenu{operationId=null, menuName=?ú?·????????, menuLevel=2, menuId=002001002, detail=null, parentMenu=Tmenu#002001, sortNumeber=2, childMenus=uninitialized, deletes=null} 11:25:47,140 DEBUG Printer:82 - com.peking.pmis.model.Tmenu{operationId=null, menuName=?????ú?·???í, menuLevel=2, menuId=002002001002001, detail=null, parentMenu=Tmenu#002002001002, sortNumeber=1, childMenus=uninitialized, deletes=null} 11:25:47,140 DEBUG Printer:82 - com.peking.pmis.model.Tmenu{operationId=null, menuName=?ú?·????±à??, menuLevel=2, menuId=002002002, detail=null, parentMenu=Tmenu#002002, sortNumeber=2, childMenus=uninitialized, deletes=null} 11:25:47,140 DEBUG Printer:82 - com.peking.pmis.model.Tmenu{operationId=null, menuName=?ú?·?????é??, menuLevel=2, menuId=002003, detail=null, parentMenu=Tmenu#002, sortNumeber=3, childMenus=uninitialized, deletes=null} 11:25:47,140 DEBUG Printer:82 - com.peking.pmis.model.Tmenu{operationId=null, menuName=?ú?·????????, menuLevel=2, menuId=002001, detail=null, parentMenu=Tmenu#002, sortNumeber=1, childMenus=uninitialized, deletes=null} 11:25:47,140 DEBUG SessionImpl:1814 - Dont need to execute flush 11:25:47,140 DEBUG QueryTranslator:199 - HQL: from com.peking.pmis.model.Tmenu as tmenu where tmenu.parentMenu.menuId='002002001002001' 11:25:47,156 DEBUG QueryTranslator:200 - SQL: select tmenu0_.MenuID as MenuID, tmenu0_.ParentID as ParentID, tmenu0_.MenuName as MenuName, tmenu0_.MenuLevel as MenuLevel, tmenu0_.OperationID as Operatio5_, tmenu0_.SortNumeber as SortNume6_, tmenu0_.Deletes as Deletes, tmenu0_.Detail as Detail from T_Menu tmenu0_ where (tmenu0_.ParentID='002002001002001' ) 11:25:47,156 DEBUG BatcherImpl:196 - about to open: 0 open PreparedStatements, 0 open ResultSets 11:25:47,156 DEBUG SQL:237 - select tmenu0_.MenuID as MenuID, tmenu0_.ParentID as ParentID, tmenu0_.MenuName as MenuName, tmenu0_.MenuLevel as MenuLevel, tmenu0_.OperationID as Operatio5_, tmenu0_.SortNumeber as SortNume6_, tmenu0_.Deletes as Deletes, tmenu0_.Detail as Detail from T_Menu tmenu0_ where (tmenu0_.ParentID='002002001002001' ) Hibernate: select tmenu0_.MenuID as MenuID, tmenu0_.ParentID as ParentID, tmenu0_.MenuName as MenuName, tmenu0_.MenuLevel as MenuLevel, tmenu0_.OperationID as Operatio5_, tmenu0_.SortNumeber as SortNume6_, tmenu0_.Deletes as Deletes, tmenu0_.Detail as Detail from T_Menu tmenu0_ where (tmenu0_.ParentID='002002001002001' ) 11:25:47,156 DEBUG BatcherImpl:241 - preparing statement 11:25:47,156 DEBUG Loader:197 - processing result set 11:25:47,156 DEBUG Loader:226 - done processing result set (0 rows) 11:25:47,156 DEBUG BatcherImpl:203 - done closing: 0 open PreparedStatements, 0 open ResultSets 11:25:47,156 DEBUG BatcherImpl:261 - closing statement 11:25:47,156 DEBUG Loader:239 - total objects hydrated: 0 11:25:47,171 DEBUG SessionImpl:3112 - initializing non-lazy collections 11:25:47,171 DEBUG SessionImpl:2242 - flushing session 11:25:47,171 DEBUG Cascades:497 - processing cascades for: com.peking.pmis.model.Tmenu 11:25:47,171 DEBUG Cascades:524 - cascading to collection: com.peking.pmis.model.Tmenu.childMenus 11:25:47,171 DEBUG Cascades:506 - done processing cascades for: com.peking.pmis.model.Tmenu 11:25:47,171 DEBUG Cascades:497 - processing cascades for: com.peking.pmis.model.Tmenu 11:25:47,171 DEBUG Cascades:524 - cascading to collection: com.peking.pmis.model.Tmenu.childMenus 11:25:47,171 DEBUG Cascades:506 - done processing cascades for: com.peking.pmis.model.Tmenu 11:25:47,171 DEBUG Cascades:497 - processing cascades for: com.peking.pmis.model.Tmenu 11:25:47,171 DEBUG Cascades:524 - cascading to collection: com.peking.pmis.model.Tmenu.childMenus 11:25:47,171 DEBUG Cascades:506 - done processing cascades for: com.peking.pmis.model.Tmenu 11:25:47,171 DEBUG Cascades:497 - processing cascades for: com.peking.pmis.model.Tmenu 11:25:47,171 DEBUG Cascades:524 - cascading to collection: com.peking.pmis.model.Tmenu.childMenus 11:25:47,171 DEBUG Cascades:506 - done processing cascades for: com.peking.pmis.model.Tmenu 11:25:47,171 DEBUG Cascades:497 - processing cascades for: com.peking.pmis.model.Tmenu 11:25:47,171 DEBUG Cascades:524 - cascading to collection: com.peking.pmis.model.Tmenu.childMenus 11:25:47,171 DEBUG Cascades:506 - done processing cascades for: com.peking.pmis.model.Tmenu 11:25:47,187 DEBUG Cascades:497 - processing cascades for: com.peking.pmis.model.Tmenu 11:25:47,187 DEBUG Cascades:524 - cascading to collection: com.peking.pmis.model.Tmenu.childMenus 11:25:47,187 DEBUG Cascades:506 - done processing cascades for: com.peking.pmis.model.Tmenu 11:25:47,187 DEBUG Cascades:497 - processing cascades for: com.peking.pmis.model.Tmenu 11:25:47,187 DEBUG Cascades:524 - cascading to collection: com.peking.pmis.model.Tmenu.childMenus 11:25:47,187 DEBUG Cascades:506 - done processing cascades for: com.peking.pmis.model.Tmenu 11:25:47,187 DEBUG Cascades:497 - processing cascades for: com.peking.pmis.model.Tmenu 11:25:47,187 DEBUG Cascades:524 - cascading to collection: com.peking.pmis.model.Tmenu.childMenus 11:25:47,187 DEBUG Cascades:506 - done processing cascades for: com.peking.pmis.model.Tmenu 11:25:47,187 DEBUG Cascades:497 - processing cascades for: com.peking.pmis.model.Tmenu 11:25:47,187 DEBUG Cascades:524 - cascading to collection: com.peking.pmis.model.Tmenu.childMenus 11:25:47,187 DEBUG Cascades:506 - done processing cascades for: com.peking.pmis.model.Tmenu 11:25:47,187 DEBUG Cascades:497 - processing cascades for: com.peking.pmis.model.Tmenu 11:25:47,187 DEBUG Cascades:524 - cascading to collection: com.peking.pmis.model.Tmenu.childMenus 11:25:47,187 DEBUG Cascades:506 - done processing cascades for: com.peking.pmis.model.Tmenu 11:25:47,187 DEBUG Cascades:497 - processing cascades for: com.peking.pmis.model.Tmenu 11:25:47,187 DEBUG Cascades:524 - cascading to collection: com.peking.pmis.model.Tmenu.childMenus 11:25:47,187 DEBUG Cascades:506 - done processing cascades for: com.peking.pmis.model.Tmenu 11:25:47,203 DEBUG Cascades:497 - processing cascades for: com.peking.pmis.model.Tmenu 11:25:47,203 DEBUG Cascades:524 - cascading to collection: com.peking.pmis.model.Tmenu.childMenus 11:25:47,203 DEBUG Cascades:506 - done processing cascades for: com.peking.pmis.model.Tmenu 11:25:47,203 DEBUG Cascades:497 - processing cascades for: com.peking.pmis.model.Tmenu 11:25:47,203 DEBUG Cascades:524 - cascading to collection: com.peking.pmis.model.Tmenu.childMenus 11:25:47,203 DEBUG Cascades:506 - done processing cascades for: com.peking.pmis.model.Tmenu 11:25:47,203 DEBUG SessionImpl:2435 - Flushing entities and processing referenced collections 11:25:47,203 DEBUG SessionImpl:2880 - Collection found: [com.peking.pmis.model.Tmenu.childMenus#002001], was: [com.peking.pmis.model.Tmenu.childMenus#002001] 11:25:47,203 DEBUG SessionImpl:2880 - Collection found: [com.peking.pmis.model.Tmenu.childMenus#002002], was: [com.peking.pmis.model.Tmenu.childMenus#002002] 11:25:47,203 DEBUG SessionImpl:2880 - Collection found: [com.peking.pmis.model.Tmenu.childMenus#002003], was: [com.peking.pmis.model.Tmenu.childMenus#002003] 11:25:47,203 DEBUG SessionImpl:2880 - Collection found: [com.peking.pmis.model.Tmenu.childMenus#002004], was: [com.peking.pmis.model.Tmenu.childMenus#002004] 11:25:47,203 DEBUG SessionImpl:2880 - Collection found: [com.peking.pmis.model.Tmenu.childMenus#002], was: [com.peking.pmis.model.Tmenu.childMenus#002] 11:25:47,218 DEBUG SessionImpl:2880 - Collection found: [com.peking.pmis.model.Tmenu.childMenus#002001001], was: [com.peking.pmis.model.Tmenu.childMenus#002001001] 11:25:47,218 DEBUG SessionImpl:2880 - Collection found: [com.peking.pmis.model.Tmenu.childMenus#002001002], was: [com.peking.pmis.model.Tmenu.childMenus#002001002] 11:25:47,218 DEBUG SessionImpl:2880 - Collection found: [com.peking.pmis.model.Tmenu.childMenus#002002001], was: [com.peking.pmis.model.Tmenu.childMenus#002002001] 11:25:47,218 DEBUG SessionImpl:2880 - Collection found: [com.peking.pmis.model.Tmenu.childMenus#002002002], was: [com.peking.pmis.model.Tmenu.childMenus#002002002] 11:25:47,218 DEBUG SessionImpl:2880 - Collection found: [com.peking.pmis.model.Tmenu.childMenus#002002001001], was: [com.peking.pmis.model.Tmenu.childMenus#002002001001] 11:25:47,218 DEBUG SessionImpl:2880 - Collection found: [com.peking.pmis.model.Tmenu.childMenus#002002001002], was: [com.peking.pmis.model.Tmenu.childMenus#002002001002] 11:25:47,218 DEBUG SessionImpl:2880 - Collection found: [com.peking.pmis.model.Tmenu.childMenus#002002001001001], was: [com.peking.pmis.model.Tmenu.childMenus#002002001001001] 11:25:47,218 DEBUG SessionImpl:2880 - Collection found: [com.peking.pmis.model.Tmenu.childMenus#002002001002001], was: [com.peking.pmis.model.Tmenu.childMenus#002002001002001] 11:25:47,218 DEBUG SessionImpl:2776 - Processing unreferenced collections 11:25:47,218 DEBUG SessionImpl:2790 - Scheduling collection removes/(re)creates/updates 11:25:47,218 DEBUG SessionImpl:2266 - Flushed: 0 insertions, 0 updates, 0 deletions to 13 objects 11:25:47,218 DEBUG SessionImpl:2271 - Flushed: 0 (re)creations, 0 updates, 0 removals to 13 collections 11:25:47,218 DEBUG Printer:75 - listing entities: 11:25:47,218 DEBUG Printer:82 - com.peking.pmis.model.Tmenu{operationId=null, menuName=?ú?·????????, menuLevel=2, menuId=002002001001, detail=null, parentMenu=Tmenu#002002001, sortNumeber=1, childMenus=uninitialized, deletes=null} 11:25:47,234 DEBUG Printer:82 - com.peking.pmis.model.Tmenu{operationId=null, menuName=?ú?·????±à??, menuLevel=2, menuId=002002, detail=null, parentMenu=Tmenu#002, sortNumeber=2, childMenus=uninitialized, deletes=null} 11:25:47,234 DEBUG Printer:82 - com.peking.pmis.model.Tmenu{operationId=null, menuName=±±??·???, menuLevel=2, menuId=002002001001001, detail=null, parentMenu=Tmenu#002002001001, sortNumeber=1, childMenus=uninitialized, deletes=null} 11:25:47,234 DEBUG Printer:82 - com.peking.pmis.model.Tmenu{operationId=null, menuName=?ú?·±???????????, menuLevel=2, menuId=002004, detail=null, parentMenu=Tmenu#002, sortNumeber=4, childMenus=uninitialized, deletes=null} 11:25:47,234 DEBUG Printer:82 - com.peking.pmis.model.Tmenu{operationId=null, menuName=?ú?·????, menuLevel=2, menuId=002, detail=null, parentMenu=null, sortNumeber=2, childMenus=uninitialized, deletes=null} 11:25:47,234 DEBUG Printer:82 - com.peking.pmis.model.Tmenu{operationId=null, menuName=?ú?·?÷??????, menuLevel=2, menuId=002002001, detail=null, parentMenu=Tmenu#002002, sortNumeber=2, childMenus=uninitialized, deletes=null} 11:25:47,234 DEBUG Printer:82 - com.peking.pmis.model.Tmenu{operationId=null, menuName=???ú?·????, menuLevel=2, menuId=002001001, detail=null, parentMenu=Tmenu#002001, sortNumeber=1, childMenus=uninitialized, deletes=null} 11:25:47,234 DEBUG Printer:82 - com.peking.pmis.model.Tmenu{operationId=null, menuName=?ú?·?÷?????í, menuLevel=2, menuId=002002001002, detail=null, parentMenu=Tmenu#002002001, sortNumeber=2, childMenus=uninitialized, deletes=null} 11:25:47,234 DEBUG Printer:82 - com.peking.pmis.model.Tmenu{operationId=null, menuName=?ú?·????????, menuLevel=2, menuId=002001002, detail=null, parentMenu=Tmenu#002001, sortNumeber=2, childMenus=uninitialized, deletes=null} 11:25:47,234 DEBUG Printer:82 - com.peking.pmis.model.Tmenu{operationId=null, menuName=?????ú?·???í, menuLevel=2, menuId=002002001002001, detail=null, parentMenu=Tmenu#002002001002, sortNumeber=1, childMenus=uninitialized, deletes=null} 11:25:47,234 DEBUG Printer:82 - com.peking.pmis.model.Tmenu{operationId=null, menuName=?ú?·????±à??, menuLevel=2, menuId=002002002, detail=null, parentMenu=Tmenu#002002, sortNumeber=2, childMenus=uninitialized, deletes=null} 11:25:47,234 DEBUG Printer:82 - com.peking.pmis.model.Tmenu{operationId=null, menuName=?ú?·?????é??, menuLevel=2, menuId=002003, detail=null, parentMenu=Tmenu#002, sortNumeber=3, childMenus=uninitialized, deletes=null} 11:25:47,250 DEBUG Printer:82 - com.peking.pmis.model.Tmenu{operationId=null, menuName=?ú?·????????, menuLevel=2, menuId=002001, detail=null, parentMenu=Tmenu#002, sortNumeber=1, childMenus=uninitialized, deletes=null} 11:25:47,250 DEBUG SessionImpl:2355 - executing flush 11:25:47,250 DEBUG SessionImpl:2820 - post flush 11:25:47,250 DEBUG SessionImpl:2242 - flushing session 11:25:47,250 DEBUG Cascades:497 - processing cascades for: com.peking.pmis.model.Tmenu 11:25:47,250 DEBUG Cascades:524 - cascading to collection: com.peking.pmis.model.Tmenu.childMenus 11:25:47,250 DEBUG Cascades:506 - done processing cascades for: com.peking.pmis.model.Tmenu 11:25:47,250 DEBUG Cascades:497 - processing cascades for: com.peking.pmis.model.Tmenu 11:25:47,250 DEBUG Cascades:524 - cascading to collection: com.peking.pmis.model.Tmenu.childMenus 11:25:47,250 DEBUG Cascades:506 - done processing cascades for: com.peking.pmis.model.Tmenu 11:25:47,250 DEBUG Cascades:497 - processing cascades for: com.peking.pmis.model.Tmenu 11:25:47,250 DEBUG Cascades:524 - cascading to collection: com.peking.pmis.model.Tmenu.childMenus 11:25:47,250 DEBUG Cascades:506 - done processing cascades for: com.peking.pmis.model.Tmenu 11:25:47,250 DEBUG Cascades:497 - processing cascades for: com.peking.pmis.model.Tmenu 11:25:47,250 DEBUG Cascades:524 - cascading to collection: com.peking.pmis.model.Tmenu.childMenus 11:25:47,265 DEBUG Cascades:506 - done processing cascades for: com.peking.pmis.model.Tmenu 11:25:47,265 DEBUG Cascades:497 - processing cascades for: com.peking.pmis.model.Tmenu 11:25:47,265 DEBUG Cascades:524 - cascading to collection: com.peking.pmis.model.Tmenu.childMenus 11:25:47,265 DEBUG Cascades:506 - done processing cascades for: com.peking.pmis.model.Tmenu 11:25:47,265 DEBUG Cascades:497 - processing cascades for: com.peking.pmis.model.Tmenu 11:25:47,265 DEBUG Cascades:524 - cascading to collection: com.peking.pmis.model.Tmenu.childMenus 11:25:47,265 DEBUG Cascades:506 - done processing cascades for: com.peking.pmis.model.Tmenu 11:25:47,265 DEBUG Cascades:497 - processing cascades for: com.peking.pmis.model.Tmenu 11:25:47,265 DEBUG Cascades:524 - cascading to collection: com.peking.pmis.model.Tmenu.childMenus 11:25:47,265 DEBUG Cascades:506 - done processing cascades for: com.peking.pmis.model.Tmenu 11:25:47,265 DEBUG Cascades:497 - processing cascades for: com.peking.pmis.model.Tmenu 11:25:47,265 DEBUG Cascades:524 - cascading to collection: com.peking.pmis.model.Tmenu.childMenus 11:25:47,265 DEBUG Cascades:506 - done processing cascades for: com.peking.pmis.model.Tmenu 11:25:47,281 DEBUG Cascades:497 - processing cascades for: com.peking.pmis.model.Tmenu 11:25:47,281 DEBUG Cascades:524 - cascading to collection: com.peking.pmis.model.Tmenu.childMenus 11:25:47,281 DEBUG Cascades:506 - done processing cascades for: com.peking.pmis.model.Tmenu 11:25:47,281 DEBUG Cascades:497 - processing cascades for: com.peking.pmis.model.Tmenu 11:25:47,281 DEBUG Cascades:524 - cascading to collection: com.peking.pmis.model.Tmenu.childMenus 11:25:47,281 DEBUG Casca 基于WEB的J2EE报表解决方案集锦 |
话题树型展开 |
人气 | 标题 | 作者 | 字数 | 发贴时间 |
6135 | 刷新时,数据时有时无(万分紧急,老板急催!) | wz_gu | 82999 | 2004-12-01 11:26 |
5066 | Re:刷新时,数据时有时无(万分紧急,老板急催!) | jigsaw | 6 | 2004-12-01 12:39 |
5451 | Re:刷新时,数据时有时无(万分紧急,老板急催!) | 256456 | 6 | 2004-12-02 17:43 |
已读帖子 新的帖子 被删除的帖子 |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |