コード例 #1
0
ファイル: Constraint.java プロジェクト: repos-db/h-store
  /**
   * Compares this with another constraint column set. This implementation only checks FOREIGN KEY
   * constraints.
   */
  boolean isEquivalent(Table mainTable, int[] mainCols, Table refTable, int[] refCols) {

    if (constType != Constraint.MAIN && constType != Constraint.FOREIGN_KEY) {
      return false;
    }

    if (mainTable != core.mainTable || refTable != core.refTable) {
      return false;
    }

    return ArrayUtil.areEqualSets(core.mainCols, mainCols)
        && ArrayUtil.areEqualSets(core.refCols, refCols);
  }
コード例 #2
0
ファイル: Constraint.java プロジェクト: davoodinator/StarMade
 boolean isEquivalent(
     Table paramTable1, int[] paramArrayOfInt1, Table paramTable2, int[] paramArrayOfInt2) {
   switch (this.constType) {
     case 0:
     case 1:
       if ((paramTable1 != this.core.mainTable) || (paramTable2 != this.core.refTable))
         return false;
       if ((this.core.mainCols.length == paramArrayOfInt1.length)
           && (this.core.refCols.length == paramArrayOfInt2.length))
         return (ArrayUtil.areEqualSets(this.core.mainCols, paramArrayOfInt1))
             && (ArrayUtil.areEqualSets(this.core.refCols, paramArrayOfInt2));
       break;
   }
   return false;
 }