novie-core/src/main/java/com/groupon/novie/internal/engine/schema/DimensionTable.java
public boolean isEquivalent(DimensionTable otherDim, Collection<Error> errors) {
        if (this.informationNameToColumn.size() != otherDim.informationNameToColumn.size()) {
            errors.add(new Error("[" + this.getDimensionName() + "-" + otherDim.getDimensionName() + "] - Not the same number of informations."));
            return false;
        }
        for (Entry<String, AbstractSqlColumn> entry : this.informationNameToColumn.entrySet()) {
            AbstractSqlColumn otherCol = otherDim.informationNameToColumn.get(entry.getKey());
            if (otherCol == null) {
                errors.add(new Error("[" + this.getDimensionName() + "-" + otherDim.getDimensionName() + "] - Information named " + entry.getKey()
                        + " not found in " + otherDim.getDimensionName() + "."));
                return false;
            }
            if (!otherCol.getBusinessName().equals(entry.getValue().getBusinessName())) {
                errors.add(new Error("[" + this.getDimensionName() + "-" + otherDim.getDimensionName() + "] - Information named " + entry.getKey()
                        + " have not the same name."));
                return false;
            }
            if (otherCol.getColumnType() != entry.getValue().getColumnType()) {
                errors.add(new Error("[" + this.getDimensionName() + "-" + otherDim.getDimensionName() + "] - Information named " + entry.getKey()
                        + " are not the same type."));
                return false;
            }
        }
        if (!otherDim.getDefaultSearchColumn().getBusinessName().equals(this.getDefaultSearchColumn().getBusinessName())) {
            errors.add(new Error("[" + this.getDimensionName() + "-" + otherDim.getDimensionName() + "] - \"default search\" are not the same."));
            return false;
        }
        if (!otherDim.getDefaultGroupByColumn().getBusinessName().equals(this.getDefaultGroupByColumn().getBusinessName())) {
            errors.add(new Error("[" + this.getDimensionName() + "-" + otherDim.getDimensionName() + "] - \"default group by\" are not the same."));
            return false;
        }
        if (!otherDim.getLinkedTables().equals(this.getLinkedTables())) {
            errors.add(new Error("[" + this.getDimensionName() + "-" + otherDim.getDimensionName() + "] - Have not the same linked tables."));
            return false;
        }
        return true;
    }
public boolean isEquivalent(DimensionTable otherDim, Collection<Error> errors) {
        if (this.informationNameToColumn.size() != otherDim.informationNameToColumn.size()) {
            errors.add(new Error("[" + this.getDimensionName() + "-" + otherDim.getDimensionName() + "] - Not the same number of informations."));
            return false;
        }
        for (Entry<String, AbstractSqlColumn> entry : this.informationNameToColumn.entrySet()) {
            AbstractSqlColumn otherCol = otherDim.informationNameToColumn.get(entry.getKey());
            if (otherCol == null) {
                errors.add(new Error("[" + this.getDimensionName() + "-" + otherDim.getDimensionName() + "] - Information named " + entry.getKey()
                        + " not found in " + otherDim.getDimensionName() + "."));
                return false;
            }
            if (!otherCol.getBusinessName().equals(entry.getValue().getBusinessName())) {
                errors.add(new Error("[" + this.getDimensionName() + "-" + otherDim.getDimensionName() + "] - Information named " + entry.getKey()
                        + " have not the same name."));
                return false;
            }
            if (otherCol.getColumnType() != entry.getValue().getColumnType()) {
                errors.add(new Error("[" + this.getDimensionName() + "-" + otherDim.getDimensionName() + "] - Information named " + entry.getKey()
                        + " are not the same type."));
                return false;
            }
        }
        if (!otherDim.getDefaultSearchColumn().getBusinessName().equals(this.getDefaultSearchColumn().getBusinessName())) {
            errors.add(new Error("[" + this.getDimensionName() + "-" + otherDim.getDimensionName() + "] - \"default search\" are not the same."));
            return false;
        }
        if (!otherDim.getDefaultGroupByColumn().getBusinessName().equals(this.getDefaultGroupByColumn().getBusinessName())) {
            errors.add(new Error("[" + this.getDimensionName() + "-" + otherDim.getDimensionName() + "] - \"default group by\" are not the same."));
            return false;
        }
        if (!otherDim.getLinkedTables().equals(this.getLinkedTables())) {
            errors.add(new Error("[" + this.getDimensionName() + "-" + otherDim.getDimensionName() + "] - Have not the same linked tables."));
            return false;
        }
        return true;
    }
public boolean isEquivalent ( DimensionTable otherDim , Collection < Error > errors ) { if ( this . informationNameToColumn . size ( ) != otherDim . informationNameToColumn . size ( ) ) { errors . add ( new Error ( "[" + this . getDimensionName ( ) + "-" + otherDim . getDimensionName ( ) + "] - Not the same number of informations." ) ) ; return false ; } for ( Entry < String , AbstractSqlColumn > entry : this . informationNameToColumn . entrySet ( ) ) { AbstractSqlColumn otherCol = otherDim . informationNameToColumn . get ( entry . getKey ( ) ) ; if ( otherCol == null ) { errors . add ( new Error ( "[" + this . getDimensionName ( ) + "-" + otherDim . getDimensionName ( ) + "] - Information named " + entry . getKey ( ) + " not found in " + otherDim . getDimensionName ( ) + "." ) ) ; return false ; } if ( ! otherCol . getBusinessName ( ) . equals ( entry . getValue ( ) . getBusinessName ( ) ) ) { errors . add ( new Error ( "[" + this . getDimensionName ( ) + "-" + otherDim . getDimensionName ( ) + "] - Information named " + entry . getKey ( ) + " have not the same name." ) ) ; return false ; } if ( otherCol . getColumnType ( ) != entry . getValue ( ) . getColumnType ( ) ) { errors . add ( new Error ( "[" + this . getDimensionName ( ) + "-" + otherDim . getDimensionName ( ) + "] - Information named " + entry . getKey ( ) + " are not the same type." ) ) ; return false ; } } if ( ! otherDim . getDefaultSearchColumn ( ) . getBusinessName ( ) . equals ( this . getDefaultSearchColumn ( ) . getBusinessName ( ) ) ) { errors . add ( new Error ( "[" + this . getDimensionName ( ) + "-" + otherDim . getDimensionName ( ) + "] - \"default search\" are not the same." ) ) ; return false ; } if ( ! otherDim . getDefaultGroupByColumn ( ) . getBusinessName ( ) . equals ( this . getDefaultGroupByColumn ( ) . getBusinessName ( ) ) ) { errors . add ( new Error ( "[" + this . getDimensionName ( ) + "-" + otherDim . getDimensionName ( ) + "] - \"default group by\" are not the same." ) ) ; return false ; } if ( ! otherDim . getLinkedTables ( ) . equals ( this . getLinkedTables ( ) ) ) { errors . add ( new Error ( "[" + this . getDimensionName ( ) + "-" + otherDim . getDimensionName ( ) + "] - Have not the same linked tables." ) ) ; return false ; } return true ; }
Checks is the specified dimension is equivalent. Equivalent means same
informations (including type), same defaults, same links

@param otherDim  The {@link DimensionTable} to compare for equivalence against
@param errors    An {@link Error} collection that will be populated with any
additional {@link Error}s
@return true if equivalent false otherwise
Checks is the specified dimension is equivalent . Equivalent means same informations ( including type ) same defaults same links