001: package net.sourceforge.squirrel_sql.plugins.dbdiff.util;
002:
003: public class AbstractDifference {
004:
005: public static enum DiffType {
006: TABLE_COLUMN_COUNT, TABLE_PK_NAME, TABLE_PK_COLUMN, TABLE_FK_NAME, TABLE_FK_COLUMN, TABLE_FK_COUNT, TABLE_INDEX_NAME, TABLE_INDEX_COLUMNS, TABLE_INDEX_UNIQUENESS, COLUMN_TYPE, COLUMN_LENGTH, COLUMN_PRECISION, COLUMN_SCALE, COLUMN_DEFAULT_VALUE, COLUMN_NULLABILITY, COLUMN_COMMENT
007: }
008:
009: /** Catalog of the first table / column being compared */
010: protected String _catalog1;
011:
012: /** Schema of the first table / column being compared */
013: protected String _schema1;
014:
015: /** Table name of the first table / column being compared */
016: protected String _tableName1;
017:
018: /** Catalog of the second table / column being compared */
019: protected String _catalog2;
020:
021: /** Schema of the second table / column being compared */
022: protected String _schema2;
023:
024: /** Table name of the second table / column being compared */
025: protected String _tableName2;
026:
027: /** The type of difference being reported */
028: protected DiffType _differenceType;
029:
030: /** The value that is different with the first item */
031: protected Object _differenceVal1;
032:
033: /** The value that is different with the second item */
034: protected Object _differenceVal2;
035:
036: /**
037: * @param _differenceType the _differenceType to set
038: */
039: public void setDifferenceType(DiffType _differenceType) {
040: this ._differenceType = _differenceType;
041: }
042:
043: /**
044: * @return the _differenceType
045: */
046: public DiffType getDifferenceType() {
047: return _differenceType;
048: }
049:
050: /**
051: * @param _tableName the _tableName to set
052: */
053: public void setTableName1(String _tableName) {
054: this ._tableName1 = _tableName;
055: }
056:
057: /**
058: * @return the _tableName
059: */
060: public String getTableName1() {
061: return _tableName1;
062: }
063:
064: /**
065: * @param _schema the _schema to set
066: */
067: public void setSchema1(String _schema) {
068: this ._schema1 = _schema;
069: }
070:
071: /**
072: * @return the _schema
073: */
074: public String getSchema1() {
075: return _schema1;
076: }
077:
078: /**
079: * @param _catalog1 the _catalog1 to set
080: */
081: public void setCatalog1(String _catalog1) {
082: this ._catalog1 = _catalog1;
083: }
084:
085: /**
086: * @return the _catalog1
087: */
088: public String getCatalog1() {
089: return _catalog1;
090: }
091:
092: /**
093: * @param _catalog2 the _catalog2 to set
094: */
095: public void setCatalog2(String _catalog2) {
096: this ._catalog2 = _catalog2;
097: }
098:
099: /**
100: * @return the _catalog2
101: */
102: public String getCatalog2() {
103: return _catalog2;
104: }
105:
106: /**
107: * @param _schema2 the _schema2 to set
108: */
109: public void setSchema2(String _schema2) {
110: this ._schema2 = _schema2;
111: }
112:
113: /**
114: * @return the _schema2
115: */
116: public String getSchema2() {
117: return _schema2;
118: }
119:
120: /**
121: * @param _tableName2 the _tableName2 to set
122: */
123: public void setTableName2(String _tableName2) {
124: this ._tableName2 = _tableName2;
125: }
126:
127: /**
128: * @return the _tableName2
129: */
130: public String getTableName2() {
131: return _tableName2;
132: }
133:
134: /**
135: * @param _differenceVal1 the _differenceVal1 to set
136: */
137: public void setDifferenceVal1(Object _differenceVal1) {
138: this ._differenceVal1 = _differenceVal1;
139: }
140:
141: /**
142: * @return the _differenceVal1
143: */
144: public Object getDifferenceVal1() {
145: return _differenceVal1;
146: }
147:
148: /**
149: * @param _differenceVal2 the _differenceVal2 to set
150: */
151: public void setDifferenceVal2(Object _differenceVal2) {
152: this ._differenceVal2 = _differenceVal2;
153: }
154:
155: /**
156: * @return the _differenceVal2
157: */
158: public Object getDifferenceVal2() {
159: return _differenceVal2;
160: }
161:
162: }
|