private void addView(View view, Collection<View> into, Collection<View> seen,
com.foundationdb.ais.model.Schema schema, String schemaName) {
if (seen.add(view)) {
for (TableName reference : view.getTableReferences()) {
if (!reference.getSchemaName().equals(schemaName)) {
throw new ViewReferencesExist(schemaName,
view.getName().getTableName(),
reference.getSchemaName(),
reference.getTableName());
}
// If reference is to another view, it must come first.