private SpeedmentException couldNotFindLocalColumnException() { return new SpeedmentException( "Could not find referenced local column '" + fkc.getId() + "' in table '" + fkc.getParent().flatMap(ForeignKey::getParent).get().getId() + "'." ); }
/** * Returns {@code true} if the two specified documents represents the same * element in the database. Two documents are considered same if they have * the same name and type and their parents are considered same. * * @param first the first document * @param second the second document * @return {@code true} if same, else {@code false} */ public static boolean isSame(ForeignKeyColumn first, ForeignKeyColumn second) { if (first.getId().equals(second.getId())) { final ForeignKey firstParent = first.getParentOrThrow(); final ForeignKey secondParent = second.getParentOrThrow(); return isSame(firstParent, secondParent); } else { return false; } }
ImmutableForeignKeyColumn(ImmutableForeignKey parent, Map<String, Object> fkc) { super(parent, requireKeys(fkc, ForeignKeyColumn.FOREIGN_COLUMN_NAME, ForeignKeyColumn.FOREIGN_TABLE_NAME)); final ForeignKeyColumn prototype = new ForeignKeyColumnImpl(parent, fkc); this.id = prototype.getId(); this.name = prototype.getName(); this.ordinalPosition = prototype.getOrdinalPosition(); this.foreignTableName = prototype.getForeignTableName(); this.foreignColumnName = prototype.getForeignColumnName(); this.foreignTable = LazyReference.create(); this.foreignColumn = LazyReference.create(); this.column = LazyReference.create(); }
private SpeedmentException couldNotFindLocalColumnException() { return new SpeedmentException( "Could not find referenced local column '" + fkc.getId() + "' in table '" + fkc.getParent().flatMap(ForeignKey::getParent).get().getId() + "'." ); }