Search in sources :

Example 1 with UpdateColumnChange

use of org.obeonetwork.dsl.database.dbevolution.UpdateColumnChange in project InformationSystem by ObeoNetwork.

the class ColumnChangeBuilder method createUpdateColumnChange.

protected UpdateColumnChange createUpdateColumnChange(AttributeChange change) {
    UpdateColumnChange updateColumnChange = DbevolutionFactory.eINSTANCE.createUpdateColumnChange();
    updateColumnChange.setColumn((Column) change.getMatch().getLeft());
    updateColumnChange.setTarget(change.getMatch().getRight());
    return updateColumnChange;
}
Also used : UpdateColumnChange(org.obeonetwork.dsl.database.dbevolution.UpdateColumnChange)

Example 2 with UpdateColumnChange

use of org.obeonetwork.dsl.database.dbevolution.UpdateColumnChange in project InformationSystem by ObeoNetwork.

the class ColumnChangeBuilder method handleAlterChange.

@Override
protected Diff handleAlterChange(Match change) {
    Column column = (Column) change.getLeft();
    // if (!alreadyCreatedUpdateColumnChange(column)) {
    UpdateColumnChange updateColumn = DbevolutionFactory.eINSTANCE.createUpdateColumnChange();
    columnsToUpdate.put(column, updateColumn);
    updateColumn.setColumn(column);
    updateColumn.setTarget(change.getRight());
    return updateColumn;
// } else {
// return null;
// }
}
Also used : Column(org.obeonetwork.dsl.database.Column) UpdateColumnChange(org.obeonetwork.dsl.database.dbevolution.UpdateColumnChange)

Example 3 with UpdateColumnChange

use of org.obeonetwork.dsl.database.dbevolution.UpdateColumnChange in project InformationSystem by ObeoNetwork.

the class UpdateColumnChangeItemProvider method getText.

/**
 * This returns the label text for the adapted class. <!-- begin-user-doc
 * --> <!-- end-user-doc -->
 *
 * @generated NOT
 */
@Override
public String getText(Object object) {
    UpdateColumnChange updateColumnChange = (UpdateColumnChange) object;
    Column column = updateColumnChange.getColumn();
    AdapterFactoryItemDelegator delegator = new AdapterFactoryItemDelegator(getRootAdapterFactory());
    final String parentLabel = delegator.getText(column);
    return getString("_UI_UpdateColumnChange_type", new Object[] { parentLabel, new DiffContentService().getSubDiffs(updateColumnChange, updateColumnChange.getMatch().getComparison()).size() });
}
Also used : Column(org.obeonetwork.dsl.database.Column) AdapterFactoryItemDelegator(org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator) UpdateColumnChange(org.obeonetwork.dsl.database.dbevolution.UpdateColumnChange) DiffContentService(org.obeonetwork.dsl.database.compare.extensions.services.DiffContentService)

Aggregations

UpdateColumnChange (org.obeonetwork.dsl.database.dbevolution.UpdateColumnChange)3 Column (org.obeonetwork.dsl.database.Column)2 AdapterFactoryItemDelegator (org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator)1 DiffContentService (org.obeonetwork.dsl.database.compare.extensions.services.DiffContentService)1