latest quantum sources 2.3.2
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.quantum.sql / src / com / quantum / model / DataType.java
1 package com.quantum.model;
2
3 import com.quantum.util.sql.TypesHelper;
4
5
6 /**
7  * This class represents a data type.  Columns in databases can be of particular types.
8  * 
9  * @author BC
10  */
11 public class DataType {
12         private final int javaType;
13         private final String databaseTypeName;
14
15         public DataType(int javaType, String databaseTypeName) {
16                 this.javaType = javaType;
17                 this.databaseTypeName = databaseTypeName;
18         }
19         public String getDatabaseTypeName() {
20                 return this.databaseTypeName;
21         }
22         public int getJavaType() {
23                 return this.javaType;
24         }
25         public String getJavaNameType() {
26                 return TypesHelper.getTypeName(this.javaType);
27         }
28 }