使用struts,ibaits和JSTL开发简便通用的文件上传系统(5)
2008-01-05 08:07:49 来源:WEB开发网核心提示:使用struts,ibaits和JSTL开发简便通用的文件上传系统(5) <!-- =mapped-statement findByPRimaryKey = --><mapped-statement name
使用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" >
赞助商链接