1 package com.daffodilwoods.daffodildb.server.datadictionarysystem.information; 2 3 import java.util.HashMap ; 4 import com.daffodilwoods.database.resource.*; 5 6 public class DataTypeProperties { 7 8 private int length ; 9 private int precision; 10 private Object defaultValue; 11 private int scale; 12 private int maxlength; 13 private int minLength; 14 boolean fixed; 15 boolean isNullable; 16 boolean isPrimaryKey; 17 boolean autoIncremetnType; 18 19 public String toString(){ 20 return "Length "+length +" Precision "+precision +" DefaultValues "+defaultValue +" Scale "+scale + 21 " MaxLength "+maxlength + " Min Length "+minLength +" Fixed "+fixed +" ISNULLABLE "+isNullable + 22 " ISPRIMARY KEY "+isPrimaryKey +" AutoIncrementType " +autoIncremetnType; 23 } 24 25 public DataTypeProperties(boolean isPrimaryKey,int length , boolean fixedLength , Object defaultValue , int maxlength , int minlength , boolean isNullable , int precision , int scale,boolean autoIncremetnType0) { 26 this.isPrimaryKey = isPrimaryKey; 27 this.length = length; 28 this.fixed = fixedLength; 29 this.defaultValue = defaultValue; 30 this.maxlength = maxlength; 31 this.minLength = minlength; 32 this.isNullable = isNullable; 33 this.precision= precision; 34 this.scale = scale; 35 autoIncremetnType = autoIncremetnType0; 36 } 37 public int getLength(){ 38 return length; 39 } 40 public int getPrecision(){ 41 return precision; 42 } 43 public Object getDefaultValue(){ 44 return defaultValue; 45 } 46 public int getScale(){ 47 return scale; 48 } 49 public boolean getFixed(){ 50 return fixed; 51 } 52 public int getMaxlength(){ 53 return maxlength; 54 } 55 public int getMinLength() { 56 return minLength; 57 } 58 public void setDefaultValue(Object defaultValue) { 59 this.defaultValue = defaultValue; 60 } 61 public void setFixed(boolean fixed) { 62 this.fixed = fixed; 63 } 64 public void setLength(int length) { 65 this.length = length; 66 } 67 public void setMaxlength(int maxlength) { 68 this.maxlength = maxlength; 69 } 70 public void setMinLength(int minLength) { 71 this.minLength = minLength; 72 } 73 public void setPrecision(int precision) { 74 this.precision = precision; 75 } 76 public void setScale(int scale) { 77 this.scale = scale; 78 } 79 public boolean isPrimaryKey(){ 80 return isPrimaryKey; 81 } 82 public boolean isAutoIncrementType(){ 83 return autoIncremetnType; 84 } 85 } 86 | Popular Tags |