01: /*
02: * Copyright (c) 1998 - 2005 Versant Corporation
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * Versant Corporation - initial API and implementation
10: */
11: package com.versant.core.jdbc.sql.diff;
12:
13: import com.versant.core.jdbc.metadata.JdbcColumn;
14:
15: /**
16: * @keep-all
17: */
18: public class ColumnDiff {
19: boolean extraCol = false;
20: boolean missingCol = false;
21: boolean typeDiff = false;
22: boolean lenghtDiff = false;
23: boolean nullDiff = false;
24: boolean scaleDiff = false;
25: private JdbcColumn ourCol;
26: private JdbcColumn dbCol;
27:
28: public ColumnDiff(JdbcColumn ourCol, JdbcColumn dbCol) {
29: this .ourCol = ourCol;
30: this .dbCol = dbCol;
31: }
32:
33: public boolean isExtraCol() {
34: return extraCol;
35: }
36:
37: public void setExtraCol(boolean extraCol) {
38: this .extraCol = extraCol;
39: }
40:
41: public boolean isMissingCol() {
42: return missingCol;
43: }
44:
45: public void setMissingCol(boolean missingCol) {
46: this .missingCol = missingCol;
47: }
48:
49: public boolean isTypeDiff() {
50: return typeDiff;
51: }
52:
53: public void setTypeDiff(boolean typeDiff) {
54: this .typeDiff = typeDiff;
55: }
56:
57: public boolean isLenghtDiff() {
58: return lenghtDiff;
59: }
60:
61: public void setLenghtDiff(boolean lenghtDiff) {
62: this .lenghtDiff = lenghtDiff;
63: }
64:
65: public boolean isNullDiff() {
66: return nullDiff;
67: }
68:
69: public void setNullDiff(boolean nullDiff) {
70: this .nullDiff = nullDiff;
71: }
72:
73: public boolean isScaleDiff() {
74: return scaleDiff;
75: }
76:
77: public void setScaleDiff(boolean scaleDiff) {
78: this .scaleDiff = scaleDiff;
79: }
80:
81: public JdbcColumn getOurCol() {
82: return ourCol;
83: }
84:
85: public JdbcColumn getDbCol() {
86: return dbCol;
87: }
88:
89: public boolean hasErrors() {
90: if (extraCol || missingCol || typeDiff || lenghtDiff
91: || nullDiff || scaleDiff) {
92: return true;
93: } else {
94: return false;
95: }
96: }
97:
98: }
|