1 28 29 package com.caucho.amber.hibernate; 30 31 import com.caucho.util.L10N; 32 33 36 public class HibernateColumn { 37 private static final L10N L = new L10N(HibernateColumn.class); 38 39 private String _name; 40 41 private String _sqlType; 42 private int _length; 43 44 private boolean _isNotNull; 45 private boolean _isUnique; 46 47 private String _index; 48 private String _uniqueKey; 49 50 public void setName(String name) 51 { 52 _name = name; 53 } 54 55 String getName() 56 { 57 return _name; 58 } 59 60 public void addText(String text) 61 { 62 _name = text.trim(); 63 } 64 65 68 public void setSQLType(String sqlType) 69 { 70 _sqlType = sqlType; 71 } 72 73 76 public String getSQLType() 77 { 78 return _sqlType; 79 } 80 81 84 public void setLength(int length) 85 { 86 _length = length; 87 } 88 89 92 public int getLength() 93 { 94 return _length; 95 } 96 97 100 public void setNotNull(boolean isNotNull) 101 { 102 _isNotNull = isNotNull; 103 } 104 105 108 public boolean getNotNull() 109 { 110 return _isNotNull; 111 } 112 113 116 public void setUnique(boolean isUnique) 117 { 118 _isUnique = isUnique; 119 } 120 121 124 public boolean getUnique() 125 { 126 return _isUnique; 127 } 128 129 132 public void setUniqueKey(String uniqueKey) 133 { 134 _uniqueKey = uniqueKey; 135 } 136 137 140 public String getUniqueKey() 141 { 142 return _uniqueKey; 143 } 144 145 148 public void setIndex(String index) 149 { 150 _index = index; 151 } 152 153 156 public String getIndex() 157 { 158 return _index; 159 } 160 } 161 | Popular Tags |