??xml version="1.0" encoding="utf-8" standalone="yes"?>
package com.deity.ranking.util;
import java.util.List;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.support.JdbcDaoSupport;
/** * 分页函数 *
* @author allenpan */
public class Pagination extends JdbcDaoSupport{
public static final int NUMBERS_PER_PAGE = 10;
//一|C的记录?br />
private int numPerPage;
//记录L
private int totalRows;
//总页?br />
private int totalPages;
//当前늠
private int currentPage;
//起始行数
private int startIndex;
//l束行数
private int lastIndex;
//l果集存放List
private List resultList;
//JdbcTemplate jTemplate
private JdbcTemplate jTemplate;
/**
* 每页昄10条记录的构造函?使用该函数必dlPagination讄currentPageQjTemplate初?br />
* @param sql oracle语句
*/
public Pagination(String sql){
if(jTemplate == null){
throw new IllegalArgumentException("com.deity.ranking.util.Pagination.jTemplate is null,please initial it first. ");
}else if(sql.equals("")){
throw new IllegalArgumentException("com.deity.ranking.util.Pagination.sql is empty,please initial it first. ");
}
new Pagination(sql,currentPage,NUMBERS_PER_PAGE,jTemplate);
}
/**分页构造函?br />
* @param sql Ҏ传入的sql语句得到一些基本分信?br />
* @param currentPage 当前?br />
* @param numPerPage 每页记录?br />
* @param jTemplate JdbcTemplate实例
*/
public Pagination(String sql,int currentPage,int numPerPage,JdbcTemplate jTemplate){
if(jTemplate == null){
throw new IllegalArgumentException("com.deity.ranking.util.Pagination.jTemplate is null,please initial it first. ");
}else if(sql == null || sql.equals("")){
throw new IllegalArgumentException("com.deity.ranking.util.Pagination.sql is empty,please initial it first. ");
}
//讄每页昄记录?br />
setNumPerPage(numPerPage);
//讄要显C的|
setCurrentPage(currentPage);
//计算总记录数
StringBuffer totalSQL = new StringBuffer(" SELECT count(*) FROM ( ");
totalSQL.append(sql);
totalSQL.append(" ) totalTable ");
//lJdbcTemplate赋?br />
setJdbcTemplate(jTemplate);
//总记录数
setTotalRows(getJdbcTemplate().queryForInt(totalSQL.toString()));
//计算总页?br />
setTotalPages();
//计算起始行数
setStartIndex();
//计算l束行数
setLastIndex();
System.out.println("lastIndex="+lastIndex);//////////////////
//构造oracle数据库的分页语句
StringBuffer paginationSQL = new StringBuffer(" SELECT * FROM ( ");
paginationSQL.append(" SELECT temp.* ,ROWNUM num FROM ( ");
paginationSQL.append(sql);
paginationSQL.append(" ) temp where ROWNUM <= " + lastIndex);
paginationSQL.append(" ) WHERE num > " + startIndex);
//装入l果?br />
setResultList(getJdbcTemplate().queryForList(paginationSQL.toString()));
}
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub }
public int getCurrentPage() {
return currentPage;
}
public void setCurrentPage(int currentPage) {
this.currentPage = currentPage;
}
public int getNumPerPage() {
return numPerPage;
}
public void setNumPerPage(int numPerPage) {
this.numPerPage = numPerPage;
}
public List getResultList() {
return resultList; }
public void setResultList(List resultList) {
this.resultList = resultList;
}
public int getTotalPages() {
return totalPages;
}
//计算总页?br />
public void setTotalPages() {
if(totalRows % numPerPage == 0){
this.totalPages = totalRows / numPerPage;
}else{
this.totalPages = (totalRows / numPerPage) + 1;
}
}
public int getTotalRows() {
return totalRows;
}
public void setTotalRows(int totalRows) {
this.totalRows = totalRows;
}
public int getStartIndex() {
return startIndex;
}
public void setStartIndex() {
this.startIndex = (currentPage - 1) * numPerPage;
}
public int getLastIndex() {
return lastIndex;
}
public JdbcTemplate getJTemplate() {
return jTemplate;
}
public void setJTemplate(JdbcTemplate template) {
jTemplate = template;
}
//计算l束时候的索引
public void setLastIndex() {
System.out.println("totalRows="+totalRows);///////////
System.out.println("numPerPage="+numPerPage);///////////
if( totalRows < numPerPage){
this.lastIndex = totalRows;
}else if((totalRows % numPerPage == 0) || (totalRows % numPerPage != 0 && currentPage < totalPages)){
this.lastIndex = currentPage * numPerPage;
}else if(totalRows % numPerPage != 0 && currentPage == totalPages){//最后一?br />
this.lastIndex = totalRows ;
}
}}在我的业务逻辑代码中:
/**
* find season ranking list from DC
* @param areaId 选手区域id
* @param rankDate 赛季
* @param category cd
* @param characterName 角色?br />
* @return List
*/
public List findSeasonRankingList(Long areaId, int rankYear,int rankMonth,
Long categoryId,String characterName) {
//SQL语句
StringBuffer sql = new StringBuffer(" SELECT C.USERID userid,D.POSNAME posname,C.GAMEID gameid,C.AMOUNT amount,C.RANK rank FROM ");
//表 sql.append(" (SELECT B.USERID USERID,");
sql.append(" B.POSID POSID,");
sql.append(" A.DISTRICT_CODE DISTRICTCODE,");
sql.append(" A.GAMEID GAMEID,");
sql.append(" AMOUNT AMOUNT,");
sql.append(" RANK RANK ");
sql.append(" FROM TB_FS_RANK A ");
sql.append(" LEFT JOIN TB_CHARACTER_INFO B ");
sql.append(" ON A.DISTRICT_CODE = B.DISTRICT_CODE ");
sql.append(" AND A.GAMEID = B.GAMEID ");
//附加条g
if(areaId != null && areaId.intValue() != 0){
sql.append(" and A.DISTRICT_CODE = " + areaId.intValue());
}
if( rankYear > 1970 && rankMonth > 0){
//hql.append(" and sas.id.dt >= to_date('" + rankYear + "-" + rankMonth + "-01 00:00:00'," + "YYYY-MM-DD HH24:MI:SS");
//hql.append(" and sas.id.dt <= to_date('" + rankYear + "-" + rankMonth + "-" + TimeTool.findMaxDateInMonth(rankYear,rankMonth) + " 23:59:59'," + "YYYY-MM-DD HH24:MI:SS");
sql.append(" and A.DT = fn_time_convert(to_date('" + rankYear + "-" + rankMonth + "'," + "'YYYY-MM')) ");
}
if(categoryId != null && categoryId.intValue() != 0){
sql.append(" and A.CID = " + categoryId.intValue());
}
if(characterName != null && !characterName.trim().equals("")){
sql.append(" and A.GAMEID = '" + characterName.trim()+"' ");
}
sql.append(" ORDER BY RANK ASC) C ");
sql.append(" LEFT JOIN TB_FS_POSITION D ");
sql.append(" ON C.POSID = D.POSID ");
sql.append(" ORDER BY C.RANK ");
System.out.println("hql="+sql.toString());////////////////
//使用自己的分늨序控制结果集
Pagination pageInfo = new Pagination(sql.toString(),1,10,getJdbcTemplate());
return pageInfo.getResultList();
//return getJdbcTemplate().queryForList(sql.toString());
}
文章來源Qhttp://java.chinaitlab.com/Spring/38091.html
]]>
执行Q把java.sql.ResultSet对象中的一列封装成Record,加到ArrayListcd的ResultSet对象?/span>
/**
* 执行 SQL 语句 (带分功?
* @param con 数据库链?Connection
* @param strSQL SQL语句
* @param nCommonPageSize 每页最大记录数
* @param nCurrentPage 当前号
* @param nTotalRecordCount 总记录数, 如果{于 -1 或小?0, 则由本函数相x法得到此?br />
* @param obj 字段对象
* @return 如果执行的是查询操作(select ...), 成功q回装?RecordSet 的记录集, 异常或失败返?null
* 如果执行的是写操? 成功q回I的 RecordSet(含操作的记录个数), 异常或失败返?null
*/
public static RecordSet executeWithDefaultDriver(Connection con, String strSQL, int nCommonPageSize, int nCurrentPage, int nTotalRecordCount, Object[] obj)
{
PreparedStatement ps = null;
try
{
if(nCommonPageSize<=0)
throw new Exception("记录数于 0: (" + nCommonPageSize + " 条记??");
if(nCurrentPage<=0)
throw new Exception("|于 0: (W?" + nCurrentPage + " ?");
RecordSet set = new RecordSet();
strSQL = strSQL.trim();
ps = con.prepareStatement(strSQL, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
//讄字段?br />
setFieldValue(ps, obj, strSQL);
//判断是否为查?SQL, q是更新 SQL
if(strSQL.substring(0, strSQL.indexOf(" ")).equalsIgnoreCase("SELECT"))
{
ResultSet rs = ps.executeQuery();
ResultSetMetaData rsmd = rs.getMetaData();
int nColumn = rsmd.getColumnCount();
//Udl果集最后一? 取得记录L
set.CURRENT_PAGE = nCurrentPage;
set.COMMON_PAGE_SIZE = nCommonPageSize;
if(nTotalRecordCount>=0)
set.TOTAL_RECORD_COUNT = nTotalRecordCount;
else
{
rs.last();
set.TOTAL_RECORD_COUNT = rs.getRow();
}
set.TOTAL_PAGE = (set.TOTAL_RECORD_COUNT + nCommonPageSize - 1) / nCommonPageSize;
if(nCurrentPage==set.TOTAL_PAGE && set.TOTAL_RECORD_COUNT%nCommonPageSize!=0)
set.CURRENT_PAGE_SIZE = set.TOTAL_RECORD_COUNT % nCommonPageSize;
else
set.CURRENT_PAGE_SIZE = nCommonPageSize;
if(set.TOTAL_RECORD_COUNT==0)
return set;
//定位到当前页的页?br />
rs.absolute(nCommonPageSize * (nCurrentPage - 1) + 1);
do
{
Record record = new Record();
for(int i=0;i<nColumn;i++)
{
String strField = rsmd.getColumnName(i+1).toUpperCase();
record.put(strField, rs.getObject(i+1));
}
set.add(record);
}
while(rs.getRow()<nCommonPageSize*nCurrentPage && rs.next());
rs.close();
}
else
set.TOTAL_RECORD_COUNT = ps.executeUpdate();
return set;
}
catch(Exception e)
{
e.printStackTrace();
return null;
}
finally
{
try
{
if(ps!=null)
ps.close();
}
catch(Exception e){}
}
}
静态方法直接调用,q回RS
调用
Record record =(Record)rs.get(i);
String code=record.getString("code");
取翻信?/span>
<td valign="middle" align="right">每页<%=rs.COMMON_PAGE_SIZE%>?br />
?lt;%=rs.TOTAL_RECORD_COUNT%>?br />
W?lt;%=rs.CURRENT_PAGE%>?br />
?lt;%=rs.TOTAL_PAGE%>?br />
<BR>
<%if(rs.CURRENT_PAGE==1){ out.print(" 首页 上一?); }else{ %>
<A HREF="javascript:gotoPage(1)">首页</A>
<A HREF="javascript:gotoPage(<%=rs.CURRENT_PAGE-1%>)">上一?lt;/A>
<%}%>
<%if(rs.CURRENT_PAGE==rs.TOTAL_PAGE){ out.print("下一?N"); }else{ %>
<A HREF="javascript:gotoPage(<%=rs.CURRENT_PAGE+1%>)">下一?lt;/A>
<A HREF="javascript:gotoPage(<%=rs.TOTAL_PAGE%>)">N</A>
<%}%>
转到W?lt;SELECT name="jumpPage" onchange="Jumping()">
<% for(int i=1;i<=rs.TOTAL_PAGE;i++) {
if (i== rs.CURRENT_PAGE){
%>
<OPTION selected value=<%=i%>><%=i%></OPTION>
<%}else{%>
<OPTION value=<%=i%>><%=i%></OPTION>
<%}}%>
</SELECT>?br />
</td>
//////////////////////////////////RecordSet.java///////////////////////////////////////
import java.util.*;
public class RecordSet
extends ArrayList {
// 记录集信?br />
/** 总页?*/
public int TOTAL_PAGE = -1;
/** 当前号 */
public int CURRENT_PAGE = -1;
/** 每页最大记录数 */
public int COMMON_PAGE_SIZE = -1;
/** 当前|含记录数 */
public int CURRENT_PAGE_SIZE = -1;
/** 总记录数 */
public int TOTAL_RECORD_COUNT = -1;
/** 当前指向的记录位|?( 初始位置在第一条记录之前的IZ?) */
private int currentRecordRow = 0;
/**
* 取得当前记录的位|?br />
* @return 记录的位|?br />
*/
public int getRow() {
return currentRecordRow;
}
/**
* 得到Wn条记?br />
* @param i 记录位置 ( 取D? 1--q回的记录数 )
* @return 成功q回记录, 异常或失败返?false
*/
public Record getRecord(int i) {
try {
return (Record)this.get(i - 1);
}
catch (Exception e) {
//Log.error(e);
return null;
}
}
/**
* 得到当前记录
* @return 成功q回记录, 异常或失败返?false
*/
public Record getRecord() {
if (isBeforeFirst()) {
//Log.warn("指针在初始位|? 请?first() ?next() Ҏ指针指向第一条记?);
return null;
}
if (isAfterLast()) {
//Log.warn("指针在结束位|? 请?first() Ҏ指针指向第一条记?);
return null;
}
return getRecord(currentRecordRow);
}
/**
* 定位到绝对位|的记录
* @param row 记录位置 ( 0--q回的记录数+1 )
* @return 成功q回 true, 异常或失败返?false
*/
public boolean absolute(int row) {
if (0 <= row && row <= this.size() + 1) {
currentRecordRow = row;
return true;
}
else {
return false;
}
}
/**
* 定位到首条记录之?br />
*/
public void beforeFirst() {
currentRecordRow = 0;
}
/**
* 定位到末条记录之?br />
*/
public void afterLast() {
currentRecordRow = this.size() + 1;
}
/**
* 定位到首条记?br />
* @return 成功q回 true, p|q回 false
*/
public boolean first() {
if (this.isEmpty()) {
return false;
}
else {
currentRecordRow = 1;
return true;
}
}
/**
* 定位到末条记?br />
* @return 成功q回 true, p|q回 false
*/
public boolean last() {
if (this.isEmpty()) {
return false;
}
else {
currentRecordRow = this.size();
return true;
}
}
/**
* 是否在首条记录之?br />
* @return 是返?true, 否返?false
*/
public boolean isBeforeFirst() {
if (currentRecordRow == 0) {
return true;
}
else {
return false;
}
}
/**
* 是否在末条记录之?br />
* @return 是返?true, 否返?false
*/
public boolean isAfterLast() {
if (currentRecordRow == this.size() + 1) {
return true;
}
else {
return false;
}
}
/**
* 是否位于首条记录
* @return 是返?true, 否返?false
*/
public boolean isFirst() {
if (this.isEmpty()) {
return false;
}
else {
if (currentRecordRow == 1) {
return true;
}
else {
return false;
}
}
}
/**
* 是否位于末条记录
* @return 是返?true, 否返?false
*/
public boolean isLast() {
if (this.isEmpty()) {
return false;
}
else {
if (currentRecordRow == this.size()) {
return true;
}
else {
return false;
}
}
}
/**
* 定位到前一条记?br />
* @return 成功q回 true, p|q回 false
*/
public boolean previous() {
if (currentRecordRow < 1) {
return false;
}
else {
currentRecordRow--;
if (currentRecordRow < 1) {
return false;
}
else {
return true;
}
}
}
/**
* 定位到后一条记?br />
* @return 成功q回 true, p|q回 false
*/
public boolean next() {
if (currentRecordRow > this.size()) {
return false;
}
else {
currentRecordRow++;
if (currentRecordRow > this.size()) {
return false;
}
else {
return true;
}
}
}
/**
* 得到数字(推荐使用q个Ҏ得到数字, 可以避免各种数据库数据类型不同而生的问题)
* @param key 字段?br />
* @return 数字
*/
public double getNumber(String key) {
return Double.parseDouble(getString(key));
}
/**
* 得到 String cd的??getObject Ҏ取得, q用了 trim ҎL两端I格, 当对象ؓI时q回I字W串)
* @param key 字段?br />
* @return String cd的?br />
*/
public String getString(String key) {
Object obj = this.getRecord().getObject(key);
if (obj == null) {
return "";
}
else {
return obj.toString().trim();
}
}
/**
* 得到 Timestamp cd的?br />
* @param key 字段?br />
* @return Timestamp cd的?br />
*/
public java.sql.Timestamp getTimestamp(String key) {
return this.getRecord().getTimestamp(key);
}
/**
* 得到 Date cd的?br />
* @param key 字段?br />
* @return Date cd的?br />
*/
public java.sql.Date getDate(String key) {
return this.getRecord().getDate(key);
}
/**
* 得到 Time cd的?br />
* @param key 字段?br />
* @return Time cd的?br />
*/
public java.sql.Time getTime(String key) {
return this.getRecord().getTime(key);
}
/**
* 得到 BigDecimal cd的?br />
* @param key 字段?br />
* @return BigDecimal cd的?br />
*/
public java.math.BigDecimal getBigDecimal(String key) {
return this.getRecord().getBigDecimal(key);
}
/**
* 得到 long cd的?br />
* @param key 字段?br />
* @return long cd的?br />
*/
public long getLong(String key) {
return this.getRecord().getLong(key).longValue();
}
/**
* 得到 int cd的?br />
* @param key 字段?br />
* @return int cd的?br />
*/
public int getInt(String key) {
return this.getRecord().getInteger(key).intValue();
}
/**
* 得到 short cd的?br />
* @param key 字段?br />
* @return short cd的?br />
*/
public short getShort(String key) {
return this.getRecord().getShort(key).shortValue();
}
/**
* 得到 double cd的?br />
* @param key 字段?br />
* @return double cd的?br />
*/
public double getDouble(String key) {
return this.getRecord().getDouble(key).doubleValue();
}
/**
* 得到 float cd的?br />
* @param key 字段?br />
* @return float cd的?br />
*/
public float getFloat(String key) {
return this.getRecord().getFloat(key).floatValue();
}
/**
* 得到 boolean cd的?br />
* @param key 字段?br />
* @return boolean cd的?br />
*/
public boolean getBoolean(String key) {
return this.getRecord().getBoolean(key).booleanValue();
}
/**
* 得到 byte cd的?br />
* @param key 字段?br />
* @return byte cd的?br />
*/
public byte getByte(String key) {
return this.getRecord().getByte(key).byteValue();
}
/**
* 得到 byte[] cd的?br />
* @param key 字段?br />
* @return byte[] cd的?br />
*/
public byte[] getBytes(String key) {
return this.getRecord().getBytes(key);
}
/**
* 得到 Blob cd的?br />
* @param key 字段?br />
* @return Blob cd的?br />
*/
public java.sql.Blob getBlob(String key) {
return this.getRecord().getBlob(key);
}
/**
* 得到 Clob cd的?br />
* @param key 字段?br />
* @return Clob cd的?br />
*/
public java.sql.Clob getClob(String key) {
return this.getRecord().getClob(key);
}
/**
* 得到 Array cd的?br />
* @param key 字段?br />
* @return Array cd的?br />
*/
public java.sql.Array getArray(String key) {
return this.getRecord().getArray(key);
}
/**
* 得到 InputStream cd的?br />
* @param key 字段?br />
* @return InputStream cd的?br />
*/
public java.io.InputStream getBinaryStream(String key) {
return this.getRecord().getBinaryStream(key);
}
/**
* 得到 Object cd的?br />
* 注意: 如果字段?char cd, 要注意返回的值尾部是否有多余的空?br />
* @param key 字段?br />
* @return Object cd的?br />
*/
public Object getObject(String key) {
return this.getRecord().getObject(key);
}
/**
* q回盔R的页?br />
* @param size 盔R的页?br />
* @return 成功q回所有相ȝ号集合, p|q回 null
*/
public int[] getNeighbouringPage(int size) {
try {
int left = (this.CURRENT_PAGE - 1 > size) ? size : this.CURRENT_PAGE - 1;
int right = (this.TOTAL_PAGE - this.CURRENT_PAGE > size) ? size :
this.TOTAL_PAGE - this.CURRENT_PAGE;
int begin = this.CURRENT_PAGE - left;
int[] num = new int[left + 1 + right];
for (int i = 0; i < num.length; i++) {
num[i] = begin + i;
}
return num;
}
catch (Exception e) {
//Log.error(e);
return null;
}
}
/**
* 与另一个记录集合ƈ
* @param rs 记录?br />
*/
public void merge(RecordSet rs) {
try {
rs.beforeFirst();
while (rs.next()) {
this.add(rs.getRecord());
}
this.TOTAL_RECORD_COUNT += rs.TOTAL_RECORD_COUNT;
this.beforeFirst();
}
catch (Exception e) {
//Log.error(e);
}
}
}
//////////////////////////////////////////Record.java///////////////////////////////////////////
import java.util.*;
public class Record
extends HashMap {
/**
* 取得字段的?br />
* @param key 字段?br />
* @return 成功q回字段的取? 异常或失败返?null
*/
public Object get(String key) {
if (key == null) {
return null;
}
else {
return super.get(key.toUpperCase());
}
}
/**
* 得到 String cd的?br />
* @param key 字段?br />
* @return String cd的?br />
*/
public java.lang.String getString(String key) {
Object obj = this.get(key);
return (java.lang.String) obj;
}
/**
* 得到 Timestamp cd的?br />
* @param key 字段?br />
* @return Timestamp cd的?br />
*/
public java.sql.Timestamp getTimestamp(String key) {
Object obj = this.get(key);
return (java.sql.Timestamp) obj;
}
/**
* 得到 Date cd的?br />
* @param key 字段?br />
* @return Date cd的?br />
*/
public java.sql.Date getDate(String key) {
Object obj = this.get(key);
return (java.sql.Date) obj;
}
/**
* 得到 Time cd的?br />
* @param key 字段?br />
* @return Time cd的?br />
*/
public java.sql.Time getTime(String key) {
Object obj = this.get(key);
return (java.sql.Time) obj;
}
/**
* 得到 BigDecimal cd的?br />
* @param key 字段?br />
* @return BigDecimal cd的?br />
*/
public java.math.BigDecimal getBigDecimal(String key) {
Object obj = this.get(key);
return (java.math.BigDecimal) obj;
}
/**
* 得到 Long cd的?br />
* @param key 字段?br />
* @return Long cd的?br />
*/
public java.lang.Long getLong(String key) {
Object obj = this.get(key);
return (java.lang.Long) obj;
}
/**
* 得到 Integer cd的?br />
* @param key 字段?br />
* @return Integer cd的?br />
*/
public java.lang.Integer getInteger(String key) {
Object obj = this.get(key);
return (java.lang.Integer) obj;
}
/**
* 得到 Short cd的?br />
* @param key 字段?br />
* @return Short cd的?br />
*/
public java.lang.Short getShort(String key) {
Object obj = this.get(key);
return (java.lang.Short) obj;
}
/**
* 得到 Double cd的?br />
* @param key 字段?br />
* @return Double cd的?br />
*/
public java.lang.Double getDouble(String key) {
Object obj = this.get(key);
return (java.lang.Double) obj;
}
/**
* 得到 Float cd的?br />
* @param key 字段?br />
* @return Float cd的?br />
*/
public java.lang.Float getFloat(String key) {
Object obj = this.get(key);
return (java.lang.Float) obj;
}
/**
* 得到 Boolean cd的?br />
* @param key 字段?br />
* @return Boolean cd的?br />
*/
public java.lang.Boolean getBoolean(String key) {
Object obj = this.get(key);
return (java.lang.Boolean) obj;
}
/**
* 得到 Byte cd的?br />
* @param key 字段?br />
* @return Byte cd的?br />
*/
public java.lang.Byte getByte(String key) {
Object obj = this.get(key);
return (java.lang.Byte) obj;
}
/**
* 得到 byte[] cd的?br />
* @param key 字段?br />
* @return byte[] cd的?br />
*/
public byte[] getBytes(String key) {
Object obj = this.get(key);
return (byte[]) obj;
}
/**
* 得到 Blob cd的?br />
* @param key 字段?br />
* @return Blob cd的?br />
*/
public java.sql.Blob getBlob(String key) {
Object obj = this.get(key);
return (java.sql.Blob) obj;
}
/**
* 得到 Clob cd的?br />
* @param key 字段?br />
* @return Clob cd的?br />
*/
public java.sql.Clob getClob(String key) {
Object obj = this.get(key);
return (java.sql.Clob) obj;
}
/**
* 得到 Array cd的?br />
* @param key 字段?br />
* @return Array cd的?br />
*/
public java.sql.Array getArray(String key) {
Object obj = this.get(key);
return (java.sql.Array) obj;
}
/**
* 得到 InputStream cd的?br />
* @param key 字段?br />
* @return InputStream cd的?br />
*/
public java.io.InputStream getBinaryStream(String key) {
Object obj = this.get(key);
return (java.io.InputStream) obj;
}
/**
* 得到 Object cd的?br />
* @param key 字段?br />
* @return Object cd的?br />
*/
public Object getObject(String key) {
return this.get(key);
}
}