注意writer的参数有多个,特别是有一个boolean的参数决定刷新或在附加文本
log = new PrintWriter( new FileOutputStream(fl, true ), true ); SimpleDateFormat df = new SimpleDateFormat( " yyyy.MM.dd 'at' hh:mm:ss\n " ); Date now = new Date(); String dateformat = df.format(now) BufferedWriter bf = new BufferedWriter( new FileWriter(fl, true )); bf.append(dateformat); bf.close(); log.println( " start connection databse: " ); log.println( " driver name: " .concat(driveName);
ProcessInstance.hbm.xml:
<sqlMap namespace="PersonnelRegist">
<typeAlias alias="ID" type="com.xindeco.core.pojo.IDEntity"/> </select> <select id="GraAppInfo.searchUpApply" parameterClass="com.xindeco.business.dto.GraAppInfoDTO" resultClass="ID" cacheModel="userCache"> select distinct a.ID AS id from TGraAppInfo a left join TEMPLOYUNITBASEINFO b on a.unit=b.MEMBERID where appstatus = '1' <dynamic> <isNotEmpty prepend="AND" property="name">(a.name like '%' + #name# + '%')</isNotEmpty> <isNotEmpty prepend="AND" property="unit">(b.UNITNAME like '%' + #unit# + '%')</isNotEmpty> </dynamic> </select></sqlMap>注意sqlmapGraAppInfoDTO的name,unit只能是基本数据类型,不能是复杂数据类型.2、<script>的位置<script>form1.srchEdit.value='<%=srchEdit%>';form1.srchType.value='<%=srchType%>'; </script><form><input type="text" name="srchEdit"/><input type="text" name="srchType"/></form>与<form><input type="text" name="srchEdit"/><input type="text" name="srchType"/></form><script>form1.srchEdit.value='<%=srchEdit%>';form1.srchType.value='<%=srchType%>'; </script>的差别,必须在form加载完对它赋值,否则srchEdit又重新加载,为null3、hibernate属性设置出现错误: 如果pojo类取fSUnit属性名,系统将无法识别。get和set将取不到值。