Search in sources :

Example 1 with DBGeneratorOptions

use of org.apache.cayenne.modeler.dialog.db.gen.DBGeneratorOptions in project cayenne by apache.

the class GenerateDBAction method performAction.

public void performAction(ActionEvent e) {
    Collection<DataMap> dataMaps;
    DataMap dataMap = getProjectController().getCurrentDataMap();
    if (dataMap != null) {
        dataMaps = new ArrayList<>();
        dataMaps.add(dataMap);
    } else {
        Project project = getProjectController().getProject();
        dataMaps = ((DataChannelDescriptor) project.getRootNode()).getDataMaps();
    }
    new DBGeneratorOptions(getProjectController(), "Generate DB Schema: Options", dataMaps).startupAction();
}
Also used : Project(org.apache.cayenne.project.Project) DBGeneratorOptions(org.apache.cayenne.modeler.dialog.db.gen.DBGeneratorOptions) DataMap(org.apache.cayenne.map.DataMap)

Aggregations

DataMap (org.apache.cayenne.map.DataMap)1 DBGeneratorOptions (org.apache.cayenne.modeler.dialog.db.gen.DBGeneratorOptions)1 Project (org.apache.cayenne.project.Project)1