java/sql-dk/src/info/globalcode/sql/dk/formatting/ColumnDescriptor.java
branchv_0
changeset 174 3c6d560a1d14
parent 39 be8db46a38c3
equal deleted inserted replaced
173:b48a82a64a02 174:3c6d560a1d14
    14  *
    14  *
    15  * You should have received a copy of the GNU General Public License
    15  * You should have received a copy of the GNU General Public License
    16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
    16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
    17  */
    17  */
    18 package info.globalcode.sql.dk.formatting;
    18 package info.globalcode.sql.dk.formatting;
       
    19 
       
    20 import java.sql.Types;
    19 
    21 
    20 /**
    22 /**
    21  *
    23  *
    22  * @author Ing. František Kučera (frantovo.cz)
    24  * @author Ing. František Kučera (frantovo.cz)
    23  */
    25  */
    94 	}
    96 	}
    95 
    97 
    96 	public void setColumnNumber(int columnNumber) {
    98 	public void setColumnNumber(int columnNumber) {
    97 		this.columnNumber = columnNumber;
    99 		this.columnNumber = columnNumber;
    98 	}
   100 	}
       
   101 
       
   102 	public boolean isBoolean() {
       
   103 		return type == Types.BOOLEAN;
       
   104 	}
       
   105 
       
   106 	public boolean isNumeric() {
       
   107 		switch (type) {
       
   108 			case Types.BIGINT:
       
   109 			case Types.DECIMAL:
       
   110 			case Types.DOUBLE:
       
   111 			case Types.FLOAT:
       
   112 			case Types.INTEGER:
       
   113 			case Types.NUMERIC:
       
   114 			case Types.REAL:
       
   115 			case Types.SMALLINT:
       
   116 			case Types.TINYINT:
       
   117 				return true;
       
   118 			default:
       
   119 				return false;
       
   120 		}
       
   121 	}
    99 }
   122 }