1 package com.quantum.model;
3 import com.quantum.util.sql.TypesHelper;
7 * This class represents a data type. Columns in databases can be of particular types.
11 public class DataType {
12 private final int javaType;
13 private final String databaseTypeName;
14 private final int precision;
15 private final String literalPrefix;
16 private final String literalSuffix;
17 private final String createParameters;
22 * @param databaseTypeName
24 * @param literalPrefix
25 * @param literalSuffix
26 * @param createParameters
28 public DataType(final int javaType, final String databaseTypeName,
29 final int precision, final String literalPrefix, final String literalSuffix,
30 final String createParameters) {
32 this.javaType = javaType;
33 this.databaseTypeName = databaseTypeName;
34 this.precision = precision;
35 this.literalPrefix = literalPrefix;
36 this.literalSuffix = literalSuffix;
37 this.createParameters = createParameters;
39 public String getDatabaseTypeName() {
40 return this.databaseTypeName;
42 public int getJavaType() {
45 public String getJavaNameType() {
46 return TypesHelper.getTypeName(this.javaType);
48 public String getCreateParameters() {
49 return this.createParameters;
51 public String getLiteralPrefix() {
52 return this.literalPrefix;
54 public String getLiteralSuffix() {
55 return this.literalSuffix;
57 public int getPrecision() {
58 return this.precision;