Package org.databene.mad4db.cmd

Examples of org.databene.mad4db.cmd.IndexCreation


    if (originalIndex.isNameDeterministic() || newIndex.isNameDeterministic())
      ownerChange.addSubChange(new Rename<DBIndex>(originalIndex, newIndex.getName()));
  }

  public StructuralChange<DBIndex> creation(DBIndex index) {
    return new IndexCreation(index);
  }
View Full Code Here


    String[] colNames1 = index1.getColumnNames();
    String[] colNames2 = index2.getColumnNames();
    if (ArrayUtil.commonElements(colNames1, colNames2).length == 0) {
      // no common columns - this is no change, but a removal and creation
      tableChange.addSubChange(new IndexDeletion(index1));
      tableChange.addSubChange(new IndexCreation(index2));
    } else {
      // there are common columns
      CompositeStructuralChange<DBIndex> indexChange = new IndexChange(index1);
      OrderedListComparator<DBColumn, DBIndex> comparator = new IndexColumnListComparator();
      comparator.compareComponents(columns(index1), columns(index2), indexChange);
View Full Code Here

    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)
      return (Creation<E>) new SequenceCreation((DBSequence) dbObject);
    else
      throw new UnsupportedOperationException("Not a supported type: " + dbObject);
  }
View Full Code Here

TOP

Related Classes of org.databene.mad4db.cmd.IndexCreation

Copyright © 2018 www.massapicom. 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.