@Override public String getQuote() { return wrappedSchema.getQuote(); } }
@Override public String getQuote() { return wrappedSchema.getQuote(); } }
public ImmutableSchema(Schema schema) { this(schema.getName(), schema.getQuote()); List<Table> origTables = schema.getTables(); for (Table table : origTables) { tables.add(new ImmutableTable(table, this)); } Collection<Relationship> origRelationships = schema.getRelationships(); for (Relationship relationship : origRelationships) { ImmutableRelationship.create(relationship, this); } }
public ImmutableSchema(Schema schema) { this(schema.getName(), schema.getQuote()); List<Table> origTables = schema.getTables(); for (Table table : origTables) { tables.add(new ImmutableTable(table, this)); } Collection<Relationship> origRelationships = schema.getRelationships(); for (Relationship relationship : origRelationships) { ImmutableRelationship.create(relationship, this); } }
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (obj instanceof Schema) { Schema other = (Schema) obj; EqualsBuilder eb = new EqualsBuilder(); eb.append(getName(), other.getName()); eb.append(getQuote(), other.getQuote()); if (eb.isEquals()) { try { int tableCount1 = getTableCount(); int tableCount2 = other.getTableCount(); eb.append(tableCount1, tableCount2); } catch (Exception e) { // might occur when schemas are disconnected. Omit this // check then. } } return eb.isEquals(); } return false; }
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (obj instanceof Schema) { Schema other = (Schema) obj; EqualsBuilder eb = new EqualsBuilder(); eb.append(getName(), other.getName()); eb.append(getQuote(), other.getQuote()); if (eb.isEquals()) { try { int tableCount1 = getTableCount(); int tableCount2 = other.getTableCount(); eb.append(tableCount1, tableCount2); } catch (Exception e) { // might occur when schemas are disconnected. Omit this // check then. } } return eb.isEquals(); } return false; }