Ignore:
Timestamp:
Apr 27, 2004, 8:39:34 PM (22 years ago)
Author:
bird
Message:

GCC v3.3.3 sources.

Location:
branches/GNU/src/gcc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/GNU/src/gcc

    • Property svn:ignore
      •  

        old new  
        2626configure.vr
        2727configure.vrs
         28
        2829Makefile
        29 dir.info
        3030lost+found
        3131update.out
  • branches/GNU/src/gcc/libjava/java/sql/DataTruncation.java

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11/* DataTruncation.java -- Warning when data has been truncated.
    2    Copyright (C) 1999, 2000 Free Software Foundation, Inc.
     2   Copyright (C) 1999, 2000 Free Software Foundation, Inc.
    33
    44This file is part of GNU Classpath.
     
    3636exception statement from your version. */
    3737
    38 
    3938package java.sql;
    4039
     
    4544  * @author Aaron M. Renn ([email protected])
    4645  */
    47 public class DataTruncation extends SQLWarning
     46public class DataTruncation extends SQLWarning
    4847{
     48
    4949
    50 /*************************************************************************/
     50  /**
     51   * The original size of the data.
     52   */
     53  private int dataSize;
    5154
    52 /*
    53  * Instance Variables
    54  */
     55  /**
     56   * The index of the parameter or column whose value was truncated.
     57   */
     58  private int index;
    5559
    56 /**
    57   * The original size of the data.
    58   * @serialized
    59   */
    60 private int dataSize;
     60  /**
     61   * Indicates whether or not a parameter value was truncated.
     62   */
     63  private boolean parameter;
    6164
    62 /**
    63   * The index of the parameter or column whose value was truncated.
    64   * @serialized
    65   */
    66 private int index;
     65  /**
     66   * Indicates whether or not a data column value was truncated.
     67   */
     68  private boolean read;
    6769
    68 /**
    69   * Indicates whether or not a parameter value was truncated.
    70   * @serialized
    71   */
    72 private boolean parameter;
     70  /**
     71   * This is the size of the data after truncation.
     72   */
     73  private int transferSize;
    7374
    74 /**
    75   * Indicates whether or not a data column value was truncated.
    76   * @serialized
    77   */
    78 private boolean read;
     75  /**
     76   * This method initializes a new instance of <code>DataTruncation</code>
     77   * with the specified values.  The descriptive error message for this
     78   * exception will be "Data truncation", the SQL state will be "01004"
     79   * and the vendor specific error code will be set to 0.
     80   *
     81   * @param index The index of the parameter or column that was truncated.
     82   * @param parameter <code>true</code> if a parameter was truncated,
     83   *        <code>false</code> otherwise.
     84   * @param read <code>true</code> if a data column was truncated,
     85   *        <code>false</code> otherwise.
     86   * @param dataSize The original size of the data.
     87   * @param transferSize The size of the data after truncation.
     88   */
     89  public DataTruncation(int index, boolean parameter, boolean read, int
     90    dataSize, int transferSize)
     91  {
     92    super("Data truncation", "01004");
    7993
    80 /**
    81   * This is the size of the data after truncation.
    82   * @serialized
    83   */
    84 private int transferSize;
     94    this.index = index;
     95    this.parameter = parameter;
     96    this.read = read;
     97    this.dataSize = dataSize;
     98    this.transferSize = transferSize;
     99  }
    85100
    86 /*************************************************************************/
     101  /**
     102   * This method returns the index of the column or parameter that was
     103   * truncated.
     104   *
     105   * @return The index of the column or parameter that was truncated.
     106   */
     107  public int getIndex()
     108  {
     109    return index;
     110  }
    87111
    88 /**
    89   * Static Variables
    90   */
     112  /**
     113   * This method determines whether or not it was a parameter that was
     114   * truncated.
     115   *
     116   * @return <code>true</code> if a parameter was truncated, <code>false</code>
     117   * otherwise.
     118   */
     119  public boolean getParameter()
     120  {
     121    return parameter;
     122  }
    91123
    92 /**
    93   * This is the serialization UID for this class
    94   */
    95 private static final long serialVersionUID = 6464298989504059473L;
     124  /**
     125   * This method determines whether or not it was a column that was
     126   * truncated.
     127   *
     128   * @return <code>true</code> if a column was truncated, <code>false</code>
     129   * otherwise.
     130   */
     131  public boolean getRead()
     132  {
     133    return read;
     134  }
    96135
    97 /*************************************************************************/
     136  /**
     137   * This method returns the original size of the parameter or column that
     138   * was truncated.
     139   *
     140   * @return The original size of the parameter or column that was truncated.
     141   */
     142  public int getDataSize()
     143  {
     144    return dataSize;
     145  }
    98146
    99 /*
    100  * Constructors
    101  */
    102 
    103 /**
    104   * This method initializes a new instance of <code>DataTruncation</code>
    105   * with the specified values.  The descriptive error message for this
    106   * exception will be "Data truncation", the SQL state will be "01004"
    107   * and the vendor specific error code will be set to 0.
    108   *
    109   * @param index The index of the parameter or column that was truncated.
    110   * @param parameter <code>true</code> if a parameter was truncated,
    111   * <code>false</code> otherwise.
    112   * @param read <code>true</code> if a data column was truncated,
    113   * <code>false</code> otherwise.
    114   * @param dataSize The original size of the data.
    115   * @param transferSize The size of the data after truncation.
    116   */
    117 public
    118 DataTruncation(int index, boolean parameter, boolean read, int dataSize,
    119                int transferSize)
    120 {
    121   super("Data truncation", "01004");
    122 
    123   this.index = index;
    124   this.parameter = parameter;
    125   this.read = read;
    126   this.dataSize = dataSize;
    127   this.transferSize = transferSize;
     147  /**
     148   * This method returns the size of the parameter or column after it was
     149   * truncated.
     150   *
     151   * @return The size of the parameter or column after it was truncated.
     152   */
     153  public int getTransferSize()
     154  {
     155    return transferSize;
     156  }
    128157}
    129 
    130 /*************************************************************************/
    131 
    132 /*
    133  * Instance Methods
    134  */
    135 
    136 /**
    137   * This method returns the index of the column or parameter that was
    138   * truncated.
    139   *
    140   * @return The index of the column or parameter that was truncated.
    141   */
    142 public int
    143 getIndex()
    144 {
    145   return(index);
    146 }
    147 
    148 /*************************************************************************/
    149 
    150 /**
    151   * This method determines whether or not it was a parameter that was
    152   * truncated.
    153   *
    154   * @return <code>true</code> if a parameter was truncated, <code>false</code>
    155   * otherwise.
    156   */
    157 public boolean
    158 getParameter()
    159 {
    160   return(parameter);
    161 }
    162 
    163 /*************************************************************************/
    164 
    165 /**
    166   * This method determines whether or not it was a column that was
    167   * truncated.
    168   *
    169   * @return <code>true</code> if a column was truncated, <code>false</code>
    170   * otherwise.
    171   */
    172 public boolean
    173 getRead()
    174 {
    175   return(read);
    176 }
    177 
    178 /*************************************************************************/
    179 
    180 /**
    181   * This method returns the original size of the parameter or column that
    182   * was truncated.
    183   *
    184   * @return The original size of the parameter or column that was truncated.
    185   */
    186 public int
    187 getDataSize()
    188 {
    189   return(dataSize);
    190 }
    191 
    192 /*************************************************************************/
    193 
    194 /**
    195   * This method returns the size of the parameter or column after it was
    196   * truncated.
    197   *
    198   * @return The size of the parameter or column after it was truncated.
    199   */
    200 public int
    201 getTransferSize()
    202 {
    203   return(transferSize);
    204 }
    205 
    206 } // class DataTruncation
    207 
Note: See TracChangeset for help on using the changeset viewer.