91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 35.58MB
    文件類型: .zip
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2023-06-16
  • 語言: 其他
  • 標簽: spring2.5.6??

資源簡介

spring-framework-2.5.6-with-docs.zip

資源截圖

代碼片段和文件信息

package?org.springframework.samples.imagedb;

import?java.io.IOException;
import?java.io.InputStream;
import?java.io.OutputStream;
import?java.sql.PreparedStatement;
import?java.sql.ResultSet;
import?java.sql.SQLException;
import?java.util.List;

import?org.springframework.dao.DataAccessException;
import?org.springframework.dao.EmptyResultDataAccessException;
import?org.springframework.jdbc.LobRetrievalFailureException;
import?org.springframework.jdbc.core.simple.ParameterizedRowMapper;
import?org.springframework.jdbc.core.simple.SimpleJdbcDaoSupport;
import?org.springframework.jdbc.core.support.AbstractLobCreatingPreparedStatementCallback;
import?org.springframework.jdbc.core.support.AbstractLobStreamingResultSetExtractor;
import?org.springframework.jdbc.support.lob.LobCreator;
import?org.springframework.jdbc.support.lob.LobHandler;
import?org.springframework.transaction.annotation.Transactional;
import?org.springframework.util.FileCopyUtils;

/**
?*?Default?implementation?of?the?central?image?database?business?interface.
?*
?*?

Uses?JDBC?with?a?LobHandler?to?retrieve?and?store?image?data.
?*?Illustrates?direct?use?of?the?jdbc.core?package
?*?i.e.?JdbcTemplate?rather?than?operation?objects?from?the
?*?jdbc.object?package.
?*
?*?@author?Juergen?Hoeller
?*?@since?07.01.2004
?*?@see?org.springframework.jdbc.core.JdbcTemplate
?*?@see?org.springframework.jdbc.support.lob.LobHandler
?*/
public?class?DefaultImageDatabase?extends?SimpleJdbcDaoSupport?implements?ImageDatabase?{

private?LobHandler?lobHandler;

/**
?*?Set?the?LobHandler?to?use?for?BLOB/CLOB?access.
?*?Could?use?a?DefaultLobHandler?instance?as?default
?*?but?relies?on?a?specified?LobHandler?here.
?*?@see?org.springframework.jdbc.support.lob.DefaultLobHandler
?*/
public?void?setLobHandler(LobHandler?lobHandler)?{
this.lobHandler?=?lobHandler;
}

@Transactional(readOnly=true)
public?Listriptor>?getImages()?throws?DataAccessException?{
return?getSimpleJdbcTemplate().query(
????“SELECT?image_name?description?FROM?imagedb“
????new?ParameterizedRowMapperriptor>()?{
????public?ImageDescriptor?mapRow(ResultSet?rs?int?rowNum)?throws?SQLException?{
????String?name?=?rs.getString(1);
????String?description?=?lobHandler.getClobAsString(rs?2);
????return?new?ImageDescriptor(name?description);
????}
????});
}

@Transactional(readOnly=true)
public?void?streamImage(final?String?name?final?OutputStream?contentStream)?throws?DataAccessException?{
getJdbcTemplate().query(
“SELECT?content?FROM?imagedb?WHERE?image_name=?“?new?object[]?{name}
new?AbstractLobStreamingResultSetExtractor()?{
protected?void?handleNoRowFound()?throws?LobRetrievalFailureException?{
throw?new?EmptyResultDataAccessException(
????“Image?with?name?‘“?+?name?+?“‘?not?found?in?database“?1);
}
public?void?streamData(ResultSet?rs)?thro


?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2008-10-31?18:30??spring-framework-2.5.6\
?????文件??????312387??2008-10-29?16:45??spring-framework-2.5.6\changelog.txt
?????目錄???????????0??2008-10-31?18:25??spring-framework-2.5.6\dist\
?????目錄???????????0??2008-10-31?18:25??spring-framework-2.5.6\dist\modules\
?????文件??????325942??2008-10-31?18:25??spring-framework-2.5.6\dist\modules\spring-aop.jar
?????文件??????488282??2008-10-31?18:25??spring-framework-2.5.6\dist\modules\spring-beans.jar
?????文件???????96880??2008-10-31?18:25??spring-framework-2.5.6\dist\modules\spring-context-support.jar
?????文件??????476940??2008-10-31?18:25??spring-framework-2.5.6\dist\modules\spring-context.jar
?????文件??????285491??2008-10-31?18:25??spring-framework-2.5.6\dist\modules\spring-core.jar
?????文件??????335484??2008-10-31?18:25??spring-framework-2.5.6\dist\modules\spring-jdbc.jar
?????文件??????195350??2008-10-31?18:25??spring-framework-2.5.6\dist\modules\spring-jms.jar
?????文件??????377805??2008-10-31?18:25??spring-framework-2.5.6\dist\modules\spring-orm.jar
?????文件??????180924??2008-10-31?18:25??spring-framework-2.5.6\dist\modules\spring-test.jar
?????文件??????231173??2008-10-31?18:25??spring-framework-2.5.6\dist\modules\spring-tx.jar
?????文件??????194577??2008-10-31?18:25??spring-framework-2.5.6\dist\modules\spring-web.jar
?????文件??????149683??2008-10-31?18:25??spring-framework-2.5.6\dist\modules\spring-webmvc-portlet.jar
?????文件???????36748??2008-10-31?18:25??spring-framework-2.5.6\dist\modules\spring-webmvc-struts.jar
?????文件??????402396??2008-10-31?18:25??spring-framework-2.5.6\dist\modules\spring-webmvc.jar
?????目錄???????????0??2008-10-31?18:25??spring-framework-2.5.6\dist\resources\
?????文件???????14164??2007-09-20?22:59??spring-framework-2.5.6\dist\resources\spring-aop-2.0.xsd
?????文件???????13480??2007-09-20?22:57??spring-framework-2.5.6\dist\resources\spring-aop-2.5.xsd
?????文件???????24108??2008-03-09?01:08??spring-framework-2.5.6\dist\resources\spring-beans-2.0.dtd
?????文件???????39928??2008-06-06?17:42??spring-framework-2.5.6\dist\resources\spring-beans-2.0.xsd
?????文件???????43281??2008-08-06?12:37??spring-framework-2.5.6\dist\resources\spring-beans-2.5.xsd
?????文件???????21774??2008-01-28?16:48??spring-framework-2.5.6\dist\resources\spring-beans.dtd
?????文件???????17925??2008-10-21?17:26??spring-framework-2.5.6\dist\resources\spring-context-2.5.xsd
?????文件???????72994??2008-05-13?14:40??spring-framework-2.5.6\dist\resources\spring-form.tld
?????文件????????7744??2008-03-18?21:42??spring-framework-2.5.6\dist\resources\spring-jee-2.0.xsd
?????文件????????9467??2008-05-21?12:06??spring-framework-2.5.6\dist\resources\spring-jee-2.5.xsd
?????文件???????18072??2008-05-19?21:29??spring-framework-2.5.6\dist\resources\spring-jms-2.5.xsd
?????文件????????5549??2007-06-14?10:24??spring-framework-2.5.6\dist\resources\spring-lang-2.0.xsd
............此處省略6092個文件信息

評論

共有 條評論

相關(guān)資源