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

📄 columndesc.java

📁 大量java源程序
💻 JAVA
字号:
/* * @(#)ColumnDesc * * Copyright (c) 1998 Karl Moss. All Rights Reserved. * * You may study, use, modify, and distribute this software for any * purpose provided that this copyright notice appears in all copies. * * This software is provided WITHOUT WARRANTY either expressed or * implied. * * @author  Karl Moss * @version 1.0 * @date    11Mar98 * */package javaservlets.db;import java.sql.*;/** * <p>This class represents a single column description */public class ColumnDesc{  String m_name;  int m_type;  int m_length;  int m_dec;  /**    * <p>Construct a new column descriptor    *    * @param name Column name    * @param type JDBC column type    */  public ColumnDesc(String name, int type)    {      m_name = name;      m_type = type;      m_length = -1;      m_dec = -1;    }  /**    * <p>Construct a new column descriptor    *    * @param name Column name    * @param type JDBC column type    * @param len Maximumn column length    */  public ColumnDesc(String name, int type, int len)    {      m_name = name;      m_type = type;      m_length = len;      m_dec = -1;    }  /**    * <p>Construct a new column descriptor    *    * @param name Column name    * @param type JDBC column type    * @param len Maximumn column length    * @param decimals Number of decimal places    */  public ColumnDesc(String name, int type, int len, int decimals)    {      m_name = name;      m_type = type;      m_length = len;      m_dec = decimals;    }  /**    * <p>Sets the column name    *    * @param name Column name    */  public void setName(String name)    {      m_name = name;    }  /**    * <p>Gets the column name    *    * @return Column name    */  public String getName()    {      return m_name;    }  /**    * <p>Sets the column type    *    * @param type JDBC column type    */  public void setType(int type)    {      m_type = type;    }  /**    * <p>Gets the column type    *    * @return JDBC column type    */  public int getType()    {      return m_type;    }  /**    * <p>Sets the length of the column    *    * @param len Length of the column    */  public void setLength(int len)    {      m_length = len;    }  /**    * <p>Gets the length of the column    *    * @return Length of the column, or -1 for not applicable    */  public int getLength()    {      return m_length;    }  /**    * <p>Sets the number of decimal places for the column    *    * @param dec Number of decimal places    */  public void setDecimals(int dec)    {      m_dec = dec;    }  /**    * <p>Gets the number of decimal places for the column    *    * @return Number of decimal places, or -1 for not    * applicable    */  public int getDecimals()    {      return m_dec;    }}

⌨️ 快捷键说明

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