Examples of ForeignKeyConstraintCreation


Examples of org.databene.mad4db.cmd.ForeignKeyConstraintCreation

      else
        fks2.remove(fk2);
    }
    fks1.clear();
    for (DBForeignKeyConstraint uk2 : fks2) {
      tableChange.addSubChange(new ForeignKeyConstraintCreation(uk2));
    }
    fks2.clear();
  }
View Full Code Here

Examples of org.databene.mad4db.cmd.ForeignKeyConstraintCreation

    else if (dbObject instanceof DBUniqueConstraint)
      return (Creation<E>) new UniqueConstraintCreation((DBUniqueConstraint) dbObject);
    else if (dbObject instanceof DBNotNullConstraint)
      return (Creation<E>) new NotNullConstraintCreation((DBNotNullConstraint) dbObject);
    else if (dbObject instanceof DBForeignKeyConstraint)
      return (Creation<E>) new ForeignKeyConstraintCreation((DBForeignKeyConstraint) dbObject);
    else if (dbObject instanceof DBCheckConstraint)
      return (Creation<E>) new CheckConstraintCreation((DBCheckConstraint) dbObject);
    else if (dbObject instanceof DBIndex)
      return (Creation<E>) new IndexCreation((DBIndex) dbObject);
    else if (dbObject instanceof DBSequence)
View Full Code Here

Examples of org.databene.mad4db.cmd.ForeignKeyConstraintCreation

    DBColumn fkColumn = new DBColumn("ref", refererTable, DBDataType.getInstance(Types.INTEGER, "int"));
    fkColumn.setNullable(nullableFk);
    refereeTable.addColumn(fkColumn);
    schemaChange.addSubChange(new TableCreation(refereeTable));
    DBForeignKeyConstraint fk = new DBForeignKeyConstraint("new_fk", true, refererTable, new String[] { "ref" }, refereeTable, new String[] { "id" });
    schemaChange.addSubChange(new ForeignKeyConstraintCreation(fk));
    return schemaChange;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.