Examples of ColumnCreation


Examples of org.databene.mad4db.cmd.ColumnCreation

  @SuppressWarnings("unchecked")
  public static <E extends DBObject> Creation<E> creation(E dbObject) {
    if (dbObject instanceof DBTable)
      return (Creation<E>) new TableCreation((DBTable) dbObject);
    else if (dbObject instanceof DBColumn)
      return (Creation<E>) new ColumnCreation((DBColumn) dbObject);
    else if (dbObject instanceof DBPrimaryKeyConstraint)
      return (Creation<E>) new PrimaryKeyCreation((DBPrimaryKeyConstraint) dbObject);
    else if (dbObject instanceof DBUniqueConstraint)
      return (Creation<E>) new UniqueConstraintCreation((DBUniqueConstraint) dbObject);
    else if (dbObject instanceof DBNotNullConstraint)
View Full Code Here

Examples of org.databene.mad4db.cmd.ColumnCreation

  public StructuralChange<?> deletion(DBColumn col, DBTable table) {
    return new Deletion<DBColumn>(col);
  }
 
  public StructuralChange<?> creation(DBColumn newColumn, DBTable table) {
    return new ColumnCreation(newColumn);
  }
View Full Code Here

Examples of org.databene.mad4db.cmd.ColumnCreation

        // check through all constraints of the table...
        ConstraintCreation<?> constraintCreation = (ConstraintCreation<?>) change;
        DBConstraint constraint = constraintCreation.getAffectedObject();
        String[] columnNames = constraint.getColumnNames();
        if (columnNames.length == 1) {
          ColumnCreation columnCreation = tableChange.getSubChange(ColumnCreation.class, columnNames[0]);
          if (columnCreation != null) {
            // ...and if a constraint relates to a single column which is new, then make it a subChange of that column
            columnCreation.addConstraintCreation(constraintCreation);
            subChangeIterator.remove();
          }
        }
      }
    }
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.