1 package com.atlassian.dbexporter;
2
3 import static com.google.common.base.Preconditions.checkNotNull;
4
5 public final class Column {
6 private final String name;
7 private final int sqlType;
8 private final Boolean primaryKey;
9 private final Boolean autoIncrement;
10 private final Integer precision;
11 private final Integer scale;
12
13 public Column(String name, int sqlType, Boolean pk, Boolean autoIncrement, Integer precision, Integer scale) {
14 this.name = checkNotNull(name);
15 this.sqlType = sqlType;
16 this.primaryKey = pk;
17 this.autoIncrement = autoIncrement;
18 this.precision = precision;
19 this.scale = scale;
20 }
21
22 public String getName() {
23 return name;
24 }
25
26 public Boolean isPrimaryKey() {
27 return primaryKey;
28 }
29
30 public Boolean isAutoIncrement() {
31 return autoIncrement;
32 }
33
34 public int getSqlType() {
35 return sqlType;
36 }
37
38 public Integer getPrecision() {
39 return precision;
40 }
41
42 public Integer getScale() {
43 return scale;
44 }
45 }