home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 1999 April / DPPCPRO0499.ISO / April / Notes / 50b2wic.exe / DATA1.CAB / NotesProgramFilesJavaSupport / rt.jar / sun / jdbc / odbc / JdbcOdbcPseudoCol.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-04-23  |  1.1 KB  |  75 lines

  1. package sun.jdbc.odbc;
  2.  
  3. public class JdbcOdbcPseudoCol extends JdbcOdbcObject {
  4.    protected String colLabel;
  5.    protected int colType;
  6.    protected int colLength;
  7.    protected int colDisplaySize;
  8.  
  9.    public JdbcOdbcPseudoCol(String var1, int var2, int var3) {
  10.       this.colLabel = var1;
  11.       this.colType = var2;
  12.       this.colLength = var3;
  13.       this.colDisplaySize = this.colLength;
  14.       switch (this.colType) {
  15.          case -7:
  16.             this.colDisplaySize = 1;
  17.             return;
  18.          case -6:
  19.             this.colDisplaySize = 4;
  20.             return;
  21.          case -5:
  22.             this.colDisplaySize = 20;
  23.             return;
  24.          case -4:
  25.          case -3:
  26.          case -2:
  27.             this.colDisplaySize *= 2;
  28.             return;
  29.          case 2:
  30.          case 3:
  31.             this.colDisplaySize += 2;
  32.             return;
  33.          case 4:
  34.             this.colDisplaySize = 11;
  35.             return;
  36.          case 5:
  37.             this.colDisplaySize = 6;
  38.             return;
  39.          case 6:
  40.          case 8:
  41.             this.colDisplaySize = 22;
  42.             return;
  43.          case 7:
  44.             this.colDisplaySize = 13;
  45.             return;
  46.          case 91:
  47.             this.colDisplaySize = 10;
  48.             return;
  49.          case 92:
  50.             this.colDisplaySize = 8;
  51.             return;
  52.          case 93:
  53.             this.colDisplaySize = 29;
  54.             return;
  55.          default:
  56.       }
  57.    }
  58.  
  59.    public String getColumnLabel() {
  60.       return this.colLabel;
  61.    }
  62.  
  63.    public int getColumnType() {
  64.       return this.colType;
  65.    }
  66.  
  67.    public int getColumnLength() {
  68.       return this.colLength;
  69.    }
  70.  
  71.    public int getColumnDisplaySize() {
  72.       return this.colDisplaySize;
  73.    }
  74. }
  75.