1 2 12 package com.versant.core.jdbc.sql.diff; 13 14 import com.versant.core.jdbc.metadata.JdbcIndex; 15 import com.versant.core.jdbc.metadata.JdbcConstraint; 16 17 import java.util.ArrayList ; 18 19 22 public class IndexDiff { 23 boolean extraIndex = false; 24 boolean missingIndex = false; 25 boolean extraCol = false; 26 boolean missingCol = false; 27 boolean uniqueness = false; 28 private JdbcIndex ourIndex; 29 private JdbcIndex dbIndex; 30 31 public IndexDiff(JdbcIndex ourIndex, JdbcIndex dbIndex) { 32 this.ourIndex = ourIndex; 33 this.dbIndex = dbIndex; 34 } 35 36 public boolean isUniqueness() { 37 return uniqueness; 38 } 39 40 public void setUniqueness(boolean uniqueness) { 41 this.uniqueness = uniqueness; 42 } 43 44 public void setExtraIndex(boolean extraIndex) { 45 this.extraIndex = extraIndex; 46 } 47 48 public void setMissingIndex(boolean missingIndex) { 49 this.missingIndex = missingIndex; 50 } 51 52 public boolean isExtraIndex() { 53 return extraIndex; 54 } 55 56 public boolean isMissingIndex() { 57 return missingIndex; 58 } 59 60 public boolean isExtraCol() { 61 return extraCol; 62 } 63 64 public void setExtraCol(boolean extraCol) { 65 this.extraCol = extraCol; 66 } 67 68 public boolean isMissingCol() { 69 return missingCol; 70 } 71 72 public void setMissingCol(boolean missingCol) { 73 this.missingCol = missingCol; 74 } 75 76 public JdbcIndex getOurIndex() { 77 return ourIndex; 78 } 79 80 public JdbcIndex getDbIndex() { 81 return dbIndex; 82 } 83 84 public boolean hasErrors() { 85 return extraIndex || missingIndex || extraCol || missingCol || uniqueness; 86 } 87 } 88 | Popular Tags |