KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > versant > core > jdbc > sql > diff > ColumnDiff


1
2 /*
3  * Copyright (c) 1998 - 2005 Versant Corporation
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * which accompanies this distribution, and is available at
7  * http://www.eclipse.org/legal/epl-v10.html
8  *
9  * Contributors:
10  * Versant Corporation - initial API and implementation
11  */

12 package com.versant.core.jdbc.sql.diff;
13
14 import com.versant.core.jdbc.metadata.JdbcColumn;
15
16 /**
17  * @keep-all
18  */

19 public class ColumnDiff {
20     boolean extraCol = false;
21     boolean missingCol = false;
22     boolean typeDiff = false;
23     boolean lenghtDiff = false;
24     boolean nullDiff = false;
25     boolean scaleDiff = false;
26     private JdbcColumn ourCol;
27     private JdbcColumn dbCol;
28
29     public ColumnDiff(JdbcColumn ourCol, JdbcColumn dbCol) {
30         this.ourCol = ourCol;
31         this.dbCol = dbCol;
32     }
33
34     public boolean isExtraCol() {
35         return extraCol;
36     }
37
38     public void setExtraCol(boolean extraCol) {
39         this.extraCol = extraCol;
40     }
41
42     public boolean isMissingCol() {
43         return missingCol;
44     }
45
46     public void setMissingCol(boolean missingCol) {
47         this.missingCol = missingCol;
48     }
49
50     public boolean isTypeDiff() {
51         return typeDiff;
52     }
53
54     public void setTypeDiff(boolean typeDiff) {
55         this.typeDiff = typeDiff;
56     }
57
58     public boolean isLenghtDiff() {
59         return lenghtDiff;
60     }
61
62     public void setLenghtDiff(boolean lenghtDiff) {
63         this.lenghtDiff = lenghtDiff;
64     }
65
66     public boolean isNullDiff() {
67         return nullDiff;
68     }
69
70     public void setNullDiff(boolean nullDiff) {
71         this.nullDiff = nullDiff;
72     }
73
74     public boolean isScaleDiff() {
75         return scaleDiff;
76     }
77
78     public void setScaleDiff(boolean scaleDiff) {
79         this.scaleDiff = scaleDiff;
80     }
81
82     public JdbcColumn getOurCol() {
83         return ourCol;
84     }
85
86     public JdbcColumn getDbCol() {
87         return dbCol;
88     }
89
90     public boolean hasErrors(){
91         if (extraCol || missingCol || typeDiff || lenghtDiff || nullDiff || scaleDiff ){
92             return true;
93         } else {
94             return false;
95         }
96     }
97
98 }
99
Popular Tags