use of org.kie.workbench.common.screens.datamodeller.client.command.FieldTypeChangeCommand in project kie-wb-common by kiegroup.
the class JPADomainHandler method postCommandProcessing.
@Override
public void postCommandProcessing(DataModelCommand command) {
if (command instanceof FieldTypeChangeCommand && (isPersistable(((FieldTypeChangeCommand) command).getDataObject()) || isRelationConfigured(((FieldTypeChangeCommand) command).getField()))) {
AdjustFieldDefaultRelationsCommand postCommand = commandBuilder.buildAdjustFieldDefaultRelationsCommand((FieldTypeChangeCommand) command, getName(), ((FieldTypeChangeCommand) command).getField());
postCommand.execute();
} else if (command instanceof AddPropertyCommand && isPersistable(((AddPropertyCommand) command).getDataObject())) {
AdjustFieldDefaultRelationsCommand postCommand = commandBuilder.buildAdjustFieldDefaultRelationsCommand((AddPropertyCommand) command, getName(), ((AddPropertyCommand) command).getProperty());
postCommand.execute();
}
}
Aggregations