@Test public void schemaEquality_diffIndices_notEqual() { EntityBundle bundle = new EntityBundle("foo", "sq", Collections.<FieldBundle>emptyList(), new PrimaryKeyBundle(false, asList("foo")), asList(createIndexBundle("foo")), Collections.<ForeignKeyBundle>emptyList()); EntityBundle other = new EntityBundle("foo", "sq", Collections.<FieldBundle>emptyList(), new PrimaryKeyBundle(false, asList("foo")), asList(createIndexBundle("foo2")), Collections.<ForeignKeyBundle>emptyList()); assertThat(bundle.isSchemaEqual(other), is(false)); }
@Override public boolean isSchemaEqual(EntityBundle other) { if (!mTableName.equals(other.mTableName)) { return false; } return checkSchemaEquality(getFieldsByColumnName(), other.getFieldsByColumnName()) && checkSchemaEquality(mPrimaryKey, other.mPrimaryKey) && checkSchemaEquality(mIndices, other.mIndices) && checkSchemaEquality(mForeignKeys, other.mForeignKeys); }
EntityBundle implements SchemaEquality<EntityBundle> { @Override public boolean isSchemaEqual(EntityBundle other) { if (!mTableName.equals(other.mTableName)) { return false; } return checkSchemaEquality(getFieldsByColumnName(), other.getFieldsByColumnName()) && checkSchemaEquality(mPrimaryKey, other.mPrimaryKey) && checkSchemaEquality(mIndices, other.mIndices) && checkSchemaEquality(mForeignKeys, other.mForeignKeys); } }
EntityBundle implements SchemaEquality<EntityBundle> { @Override public boolean isSchemaEqual(EntityBundle other) { if (!mTableName.equals(other.mTableName)) { return false; } return checkSchemaEquality(getFieldsByColumnName(), other.getFieldsByColumnName()) && checkSchemaEquality(mPrimaryKey, other.mPrimaryKey) && checkSchemaEquality(mIndices, other.mIndices) && checkSchemaEquality(mForeignKeys, other.mForeignKeys); } EntityBundle(String tableName, String createSql,
            List<FieldBundle> fields,
            PrimaryKeyBundle primaryKey,
            List<IndexBundle> indices,
            List<ForeignKeyBundle> foreignKeys); }
EntityBundle implements SchemaEquality<EntityBundle> { @Override public boolean isSchemaEqual(EntityBundle other) { if (!mTableName.equals(other.mTableName)) { return false; } return checkSchemaEquality(getFieldsByColumnName(), other.getFieldsByColumnName()) && checkSchemaEquality(mPrimaryKey, other.mPrimaryKey) && checkSchemaEquality(mIndices, other.mIndices) && checkSchemaEquality(mForeignKeys, other.mForeignKeys); } EntityBundle(String tableName, String createSql,
            List<FieldBundle> fields,
            PrimaryKeyBundle primaryKey,
            List<IndexBundle> indices,
            List<ForeignKeyBundle> foreignKeys); String getNewTableName(); Map<String, FieldBundle> getFieldsByColumnName(); String getTableName(); String getCreateSql(); List<FieldBundle> getFields(); PrimaryKeyBundle getPrimaryKey(); List<IndexBundle> getIndices(); List<ForeignKeyBundle> getForeignKeys(); String createTable(); String createNewTable(); @NotNull String renameToOriginal(); Collection<String> buildCreateQueries(); @Override boolean isSchemaEqual(EntityBundle other); }
EntityBundle implements SchemaEquality<EntityBundle> { @Override public boolean isSchemaEqual(EntityBundle other) { if (!mTableName.equals(other.mTableName)) { return false; } return checkSchemaEquality(getFieldsByColumnName(), other.getFieldsByColumnName()) && checkSchemaEquality(mPrimaryKey, other.mPrimaryKey) && checkSchemaEquality(mIndices, other.mIndices) && checkSchemaEquality(mForeignKeys, other.mForeignKeys); } EntityBundle(String tableName, String createSql,
            List<FieldBundle> fields,
            PrimaryKeyBundle primaryKey,
            List<IndexBundle> indices,
            List<ForeignKeyBundle> foreignKeys); String getNewTableName(); Map<String, FieldBundle> getFieldsByColumnName(); String getTableName(); String getCreateSql(); List<FieldBundle> getFields(); PrimaryKeyBundle getPrimaryKey(); List<IndexBundle> getIndices(); List<ForeignKeyBundle> getForeignKeys(); String createTable(); String createNewTable(); @NotNull String renameToOriginal(); Collection<String> buildCreateQueries(); @Override boolean isSchemaEqual(EntityBundle other);  }