1 2 12 package com.versant.core.jdbc.sql.diff; 13 14 import com.versant.core.jdbc.metadata.JdbcTable; 15 16 import java.util.ArrayList ; 17 18 21 public class TableDiff { 22 boolean missingTable = false; 23 private JdbcTable ourTable; 24 private JdbcTable dbTable; 25 private boolean hasRealErrors = true; 26 27 ArrayList colDiffs = new ArrayList (); 28 ArrayList pkDiffs = new ArrayList (); 29 ArrayList indexDiffs = new ArrayList (); 30 ArrayList constraintDiffs = new ArrayList (); 31 32 public TableDiff(JdbcTable ourTable, JdbcTable dbTable) { 33 this.ourTable = ourTable; 34 this.dbTable = dbTable; 35 } 36 37 public JdbcTable getOurTable() { 38 return ourTable; 39 } 40 41 public JdbcTable getDbTable() { 42 return dbTable; 43 } 44 45 public boolean isMissingTable() { 46 return missingTable; 47 } 48 49 public void setMissingTable(boolean missingTable) { 50 this.missingTable = missingTable; 51 } 52 53 public ArrayList getColDiffs() { 54 return colDiffs; 55 } 56 57 public ArrayList getPkDiffs() { 58 return pkDiffs; 59 } 60 61 public ArrayList getIndexDiffs() { 62 return indexDiffs; 63 } 64 65 public ArrayList getConstraintDiffs() { 66 return constraintDiffs; 67 } 68 69 public boolean hasErrors() { 70 if (missingTable || !colDiffs.isEmpty() || !pkDiffs.isEmpty() || !indexDiffs.isEmpty() || !constraintDiffs.isEmpty()) { 71 return true; 72 } else { 73 return false; 74 } 75 } 76 77 public boolean hasRealErrors() { 78 return hasRealErrors; 79 } 80 81 public void setHasRealErrors(boolean hasRealErrors) { 82 this.hasRealErrors = hasRealErrors; 83 } 84 } 85 86 | Popular Tags |