⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 resultset_2_0.java

📁 数据仓库工具
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
//
// Copyright 1999 Craig Spannring
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright
//    notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
//    notice, this list of conditions and the following disclaimer in the
//    documentation and/or other materials provided with the distribution.
// 3. All advertising materials mentioning features or use of this software
//    must display the following acknowledgement:
//      This product includes software developed by Craig Spannring
// 4. The name of Craig Spannring may not be used to endorse or promote
//    products derived from this software without specific prior
//    written permission.
//
// THIS SOFTWARE IS PROVIDED BY CRAIG SPANNRING ``AS IS'' AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED.  IN NO EVENT SHALL CRAIG SPANNRING BE LIABLE
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
// SUCH DAMAGE.
//


package com.internetcds.jdbc.tds;


import java.sql.*;
import java.math.BigDecimal;
import java.util.Vector;
// import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.Calendar;
import java.net.URL;



public class ResultSet_2_0 
   extends com.internetcds.jdbc.tds.ResultSet_base
   implements java.sql.ResultSet
{
   public static final String cvsVersion = "$Id: ResultSet_2_0.java,v 1.1 2003/04/29 18:07:50 sinisa Exp $";
   

   public ResultSet_2_0(Tds                                tds_, 
                        com.internetcds.jdbc.tds.Statement stmt_, 
                        Columns                            columns_)
   {
      super(tds_, stmt_, columns_);
   }

   
   //---------------------------------------------------------------------
   // Getter's and Setter's
   //---------------------------------------------------------------------
   
   /**
    * JDBC 2.0
    *
    * <p>Gets the value of a column in the current row as a java.io.Reader.
    * @param columnIndex the first column is 1, the second is 2, ...
    */
   public java.io.Reader getCharacterStream(int columnIndex) throws SQLException
   {
       String val = getString(columnIndex);
       if (val == null)
           return null;
       
       return new java.io.StringReader(val);
   }
   

    /**
     * JDBC 2.0
     *
     * <p>Gets the value of a column in the current row as a java.io.Reader.
     * @param columnName the name of the column
     * @return the value in the specified column as a <code>java.io.Reader</code>
     */
   public java.io.Reader getCharacterStream(String columnName) throws SQLException
   {
      return getCharacterStream(findColumn(columnName));
   }
   
   
   /**
    * JDBC 2.0
    *
    * Gets the value of a column in the current row as a java.math.BigDecimal 
    * object with full precision.
    *
    * @param columnIndex the first column is 1, the second is 2, ...
    * @return the column value (full precision); if the value is SQL NULL, 
    * the result is null
    * @exception SQLException if a database access error occurs
    */
   public BigDecimal getBigDecimal(int columnIndex) throws SQLException
   {
		  return getBigDecimal(columnIndex, 0);      
//      NotImplemented();
//      return null;
   }
   
   
   /**
    * JDBC 2.0
    *
    * Gets the value of a column in the current row as a java.math.BigDecimal 
    * object with full precision.
    * @param columnName the column name
    * @return the column value (full precision); if the value is SQL NULL, 
    * the result is null
    * @exception SQLException if a database access error occurs
    *
    */
   public BigDecimal getBigDecimal(String columnName) throws SQLException
   {
      
		  return getBigDecimal(findColumn(columnName), 0);
//      NotImplemented();
//      return null;
   }
   
   
   //---------------------------------------------------------------------
   // Traversal/Positioning
   //---------------------------------------------------------------------
   
   /**
    * JDBC 2.0
    *
    * <p>Indicates whether the cursor is before the first row in the result 
    * set.   
    *
    * @return true if the cursor is before the first row, 
    *         false otherwise. Returns
    * false when the result set contains no rows.
    * @exception SQLException if a database access error occurs
    */
   public boolean isBeforeFirst() throws SQLException
   {
      NotImplemented();
      return false;
   }
   
   
   /**
    * JDBC 2.0
    *
    * <p>Indicates whether the cursor is after the last row in the result 
    * set.   
    *
    * @return true if the cursor is  after the last row, false otherwise.  Returns
    * false when the result set contains no rows.
    * @exception SQLException if a database access error occurs
    */
   public boolean isAfterLast() throws SQLException
   {
      NotImplemented();
      return false;
   }
   
   
   /**
    * JDBC 2.0
    *
    * <p>Indicates whether the cursor is on the first row of the result set.   
    *
    * @return true if the cursor is on the first row, false otherwise.   
    * @exception SQLException if a database access error occurs
    */
   public boolean isFirst() throws SQLException
   {
      NotImplemented();
      return false;
   }
   
   
   /**
    * JDBC 2.0
    *
    * <p>Indicates whether the cursor is on the last row of the result set.   
    * Note: Calling the method <code>isLast</code> may be expensive
    * because the JDBC driver
    * might need to fetch ahead one row in order to determine 
    * whether the current row is the last row in the result set.
    *
    * @return true if the cursor is on the last row, false otherwise. 
    * @exception SQLException if a database access error occurs
    */
   public boolean isLast() throws SQLException
   {
      NotImplemented();
      return false;
   }
   
   
   /**
    * JDBC 2.0
    *
    * <p>Moves the cursor to the front of the result set, just before the
    * first row. Has no effect if the result set contains no rows.
    *
    * @exception SQLException if a database access error occurs or the 
    * result set type is TYPE_FORWARD_ONLY
    */
   public void beforeFirst() throws SQLException
   {
      NotImplemented();
   }
   
   
   /**
    * JDBC 2.0
    *
    * <p>Moves the cursor to the end of the result set, just after the last
    * row.  Has no effect if the result set contains no rows.
    *
    * @exception SQLException if a database access error occurs or the 
    * result set type is TYPE_FORWARD_ONLY 
    */
   public void afterLast() throws SQLException
   {
      NotImplemented();
   }
   
   
   /**
    * JDBC 2.0
    *
    * <p>Moves the cursor to the first row in the result set.  
    *
    * @return true if the cursor is on a valid row; false if
    *         there are no rows in the result set
    * @exception SQLException if a database access error occurs or the 
    * result set type is TYPE_FORWARD_ONLY
    */
   public boolean first() throws SQLException
   {
      NotImplemented();
      return false;
   }
   
   
   /**
    * JDBC 2.0
    *
    * <p>Moves the cursor to the last row in the result set.  
    *
    * @return true if the cursor is on a valid row;
    * false if there are no rows in the result set
    * @exception SQLException if a database access error occurs or the
    * result set type is TYPE_FORWARD_ONLY.
    */
   public boolean last() throws SQLException
   {
      NotImplemented();
      return false;
   }
   
   
   /**
    * JDBC 2.0
    *
    * <p>Retrieves the current row number.  The first row is number 1, the
     * second number 2, and so on.  
     *
     * @return the current row number; 0 if there is no current row
     * @exception SQLException if a database access error occurs
     */
   public int getRow() throws SQLException
   {
      NotImplemented();
      return 0;
   }


   /**
     * JDBC 2.0
     *
     * <p>Moves the cursor to the given row number in the result set.
     *
     * <p>If the row number is positive, the cursor moves to 
     * the given row number with respect to the
     * beginning of the result set.  The first row is row 1, the second
     * is row 2, and so on. 
     *
     * <p>If the given row number is negative, the cursor moves to
     * an absolute row position with respect to
     * the end of the result set.  For example, calling
     * <code>absolute(-1)</code> positions the 
     * cursor on the last row, <code>absolute(-2)</code> indicates the next-to-last
     * row, and so on.
     *
     * <p>An attempt to position the cursor beyond the first/last row in
     * the result set leaves the cursor before/after the first/last
     * row, respectively.
     *
     * <p>Note: Calling <code>absolute(1)</code> is the same
     * as calling <code>first()</code>.
     * Calling <code>absolute(-1)</code> is the same as calling <code>last()</code>.
     *
     * @return true if the cursor is on the result set; false otherwise
     * @exception SQLException if a database access error occurs or 
     * row is 0, or result set type is TYPE_FORWARD_ONLY.
     */
   public boolean absolute( int row ) throws SQLException
   {
      NotImplemented();
      return false;
   }


   /**
     * JDBC 2.0
     *
     * <p>Moves the cursor a relative number of rows, either positive or negative.
     * Attempting to move beyond the first/last row in the
     * result set positions the cursor before/after the
     * the first/last row. Calling <code>relative(0)</code> is valid, but does
     * not change the cursor position.
     *
     * <p>Note: Calling <code>relative(1)</code>
     * is different from calling <code>next()</code>
     * because is makes sense to call <code>next()</code> when there is no current row,
     * for example, when the cursor is positioned before the first row
     * or after the last row of the result set.
     *
     * @return true if the cursor is on a row; false otherwise
     * @exception SQLException if a database access error occurs, there
     * is no current row, or the result set type is TYPE_FORWARD_ONLY
     */
   public boolean relative( int rows ) throws SQLException
   {
      NotImplemented();
      return false;
   }


   /**
     * JDBC 2.0
     *
     * <p>Moves the cursor to the previous row in the result set.  
     *
     * <p>Note: <code>previous()</code> is not the same as
     * <code>relative(-1)</code> because it
     * makes sense to call</code>previous()</code> when there is no current row.
     *
     * @return true if the cursor is on a valid row; false if it is off the result set
     * @exception SQLException if a database access error occurs or the
     * result set type is TYPE_FORWARD_ONLY
     */
   public boolean previous() throws SQLException
   {
      NotImplemented();
      return false;
   }


   //---------------------------------------------------------------------
   // Properties
   //---------------------------------------------------------------------

    /**

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -