| |
技术文档>>JAVA>>新手入门>>基础入门>查看文档 |
|
| |
使用struts,ibaits和jstl开发简便通用的文件上传系统(5) |
|
| |
文章作者:未知 文章来源:水木森林 |
|
| |
查看:101次 录入:管理员--2007-11-17 |
|
| |
使用struts,ibaits和jstl开发简便通用的文件上传系统(5) <!-- ============================================= mapped-statement findbyprimarykey ============================================= --> <mapped-statement name="findbyprimarykeyattachmentdao" result-class="java.util.hashmap"> select * from attachment where attachid=#attachid# </mapped-statement> <!-- ============================================= mapped-statement findcount ============================================= --> <dynamic-mapped-statement name="findattachmentdaocount" result-class="java.lang.integer"> select count(1) from attachment <dynamic prepend="where"> <ispropertyavailable prepend="and" property="attachid" > <isnotnull prepend="" property="attachid" > attachid=#attachid# </isnotnull> </ispropertyavailable> <ispropertyavailable prepend="and" property="attachfilename" > <isnotnull prepend="" property="attachfilename" > attachfilename=#attachfilename# </isnotnull> </ispropertyavailable> <ispropertyavailable prepend="and" property="attachfilepath" > <isnotnull prepend="" property="attachfilepath" > attachfilepath=#attachfilename# </isnotnull> </ispropertyavailable> <ispropertyavailable prepend="and" property="attachfilesize" > <isnotnull prepend="" property="attachfilesize" > attachfilesize=#attachfilesize# </isnotnull> </ispropertyavailable> <ispropertyavailable prepend="and" property="attachmimetype" > <isnotnull prepend="" property="attachmimetype" > attachmimetype=#attachmimetype# </isnotnull> </ispropertyavailable> <ispropertyavailable prepend="and" property="attachdesc" > <isnotnull prepend="" property="attachdesc" > attachdesc=#attachdesc# </isnotnull> </ispropertyavailable> <ispropertyavailable prepend="and" property="attachcreationip" > <isnotnull prepend="" property="attachcreationip" > attachcreationip=#attachcreationip# </isnotnull> </ispropertyavailable> <ispropertyavailable prepend="and" property="attachcreationdate" > <isnotnull prepend="" property="attachcreationdate" > attachcreationdate=#attachcreationdate# </isnotnull> </ispropertyavailable> <ispropertyavailable prepend="and" property="attachmodifieddate" > <isnotnull prepend="" property="attachmodifieddate" > attachmodifieddate=#attachmodifieddate# </isnotnull> </ispropertyavailable> </dynamic> </dynamic-mapped-statement> </sql-map> (未完待续)
|
|
|