use of org.apache.cayenne.modeler.ProjectController in project cayenne by apache.
the class RemoveAction method removeDataNode.
public void removeDataNode(DataNodeDescriptor node) {
ProjectController mediator = getProjectController();
DataChannelDescriptor domain = (DataChannelDescriptor) mediator.getProject().getRootNode();
DataNodeEvent e = new DataNodeEvent(Application.getFrame(), node, MapEvent.REMOVE);
e.setDomain((DataChannelDescriptor) mediator.getProject().getRootNode());
domain.getNodeDescriptors().remove(node);
mediator.fireDataNodeEvent(e);
}
use of org.apache.cayenne.modeler.ProjectController in project cayenne by apache.
the class RemoveAction method removeProcedure.
/**
* Removes current Procedure from its DataMap and fires "remove" ProcedureEvent.
*/
public void removeProcedure(DataMap map, Procedure procedure) {
ProjectController mediator = getProjectController();
ProcedureEvent e = new ProcedureEvent(Application.getFrame(), procedure, MapEvent.REMOVE);
e.setDomain((DataChannelDescriptor) mediator.getProject().getRootNode());
map.removeProcedure(procedure.getName());
mediator.fireProcedureEvent(e);
}
use of org.apache.cayenne.modeler.ProjectController in project cayenne by apache.
the class RemoveAction method removeEmbeddable.
public void removeEmbeddable(DataMap map, Embeddable embeddable) {
ProjectController mediator = getProjectController();
EmbeddableEvent e = new EmbeddableEvent(Application.getFrame(), embeddable, MapEvent.REMOVE);
e.setDomain((DataChannelDescriptor) mediator.getProject().getRootNode());
map.removeEmbeddable(embeddable.getClassName());
mediator.fireEmbeddableEvent(e, map);
}
use of org.apache.cayenne.modeler.ProjectController in project cayenne by apache.
the class RemoveAction method removeDataMapFromDataNode.
public void removeDataMapFromDataNode(DataNodeDescriptor node, DataMap map) {
ProjectController mediator = getProjectController();
DataNodeEvent e = new DataNodeEvent(Application.getFrame(), node);
e.setDomain((DataChannelDescriptor) mediator.getProject().getRootNode());
node.getDataMapNames().remove(map.getName());
// Force reloading of the data node in the browse view
mediator.fireDataNodeEvent(e);
}
use of org.apache.cayenne.modeler.ProjectController in project cayenne by apache.
the class RemoveAction method removeProcedureParameters.
private void removeProcedureParameters(Procedure procedure, ProcedureParameter[] parameters) {
ProjectController mediator = getProjectController();
for (ProcedureParameter parameter : parameters) {
procedure.removeCallParameter(parameter.getName());
ProcedureParameterEvent e = new ProcedureParameterEvent(Application.getFrame(), parameter, MapEvent.REMOVE);
mediator.fireProcedureParameterEvent(e);
}
}
Aggregations