Source code: org/objectstyle/ashwood/dbutil/Column.java
1 /* ====================================================================
2 *
3 * Copyright(c) 2003, Andriy Shapochka
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 *
10 * 1. Redistributions of source code must retain the above
11 * copyright notice, this list of conditions and the following
12 * disclaimer.
13 *
14 * 2. Redistributions in binary form must reproduce the above
15 * copyright notice, this list of conditions and the following
16 * disclaimer in the documentation and/or other materials
17 * provided with the distribution.
18 *
19 * 3. Neither the name of the ASHWOOD nor the
20 * names of its contributors may be used to endorse or
21 * promote products derived from this software without
22 * specific prior written permission.
23 *
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
25 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
26 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 *
35 * ====================================================================
36 *
37 * This software consists of voluntary contributions made by
38 * individuals on behalf of the ASHWOOD Project and was originally
39 * created by Andriy Shapochka.
40 *
41 */
42
43 package org.objectstyle.ashwood.dbutil;
44
45 import java.io.Serializable;
46
47 public class Column implements Serializable {
48
49 private Table owner;
50 private String name;
51 private int dataType;
52 private String typeName;
53 private int size;
54 private int decimalDigits;
55 private int radix;
56 private int nullable;
57 private String remarks;
58 private String defaultValue;
59 private int charOctetLength;
60 private int ordinalPosition;
61 public Column() {
62 }
63 public Table getOwner() {
64 return owner;
65 }
66 public void setOwner(Table owner) {
67 this.owner = owner;
68 }
69 public void setName(String name) {
70 this.name = name;
71 }
72 public String getName() {
73 return name;
74 }
75 public void setDataType(int dataType) {
76 this.dataType = dataType;
77 }
78 public int getDataType() {
79 return dataType;
80 }
81 public void setTypeName(String typeName) {
82 this.typeName = typeName;
83 }
84 public String getTypeName() {
85 return typeName;
86 }
87 public void setSize(int size) {
88 this.size = size;
89 }
90 public int getSize() {
91 return size;
92 }
93 public void setDecimalDigits(int decimalDigits) {
94 this.decimalDigits = decimalDigits;
95 }
96 public int getDecimalDigits() {
97 return decimalDigits;
98 }
99 public void setRadix(int radix) {
100 this.radix = radix;
101 }
102 public int getRadix() {
103 return radix;
104 }
105 public void setNullable(int nullable) {
106 this.nullable = nullable;
107 }
108 public int getNullable() {
109 return nullable;
110 }
111 public void setRemarks(String remarks) {
112 this.remarks = remarks;
113 }
114 public String getRemarks() {
115 return remarks;
116 }
117 public void setDefaultValue(String defaultValue) {
118 this.defaultValue = defaultValue;
119 }
120 public String getDefaultValue() {
121 return defaultValue;
122 }
123 public void setCharOctetLength(int charOctetLength) {
124 this.charOctetLength = charOctetLength;
125 }
126 public int getCharOctetLength() {
127 return charOctetLength;
128 }
129 public void setOrdinalPosition(int ordinalPosition) {
130 this.ordinalPosition = ordinalPosition;
131 }
132 public int getOrdinalPosition() {
133 return ordinalPosition;
134 }
135 }