This repository has been archived by the owner on Apr 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Write function SQL file from Database * wip task DbToFiles Rename task CopyFunctionsSchema to FilesToDb * Parametrize folders adding parameters in properties file * Bug fix * Manage UTF-8 without BOM * Add frame Developer Toolbox Add functions FilesToDb and DbToFiles * Bug fixes in Create Schema and Copy Functions * Bug fix managing execution result * Dev Tools: manage checkboxes
- Loading branch information
1 parent
887c10e
commit d0f0102
Showing
25 changed files
with
902 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
/* | ||
* This file is part of Giswater | ||
* Copyright (C) 2013 Tecnics Associats | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* Author: | ||
* David Erill <derill@giswater.org> | ||
*/ | ||
package org.giswater.controller; | ||
|
||
import org.giswater.dao.MainDao; | ||
import org.giswater.gui.panel.DevToolboxPanel; | ||
import org.giswater.task.DbToFilesTask; | ||
import org.giswater.task.FilesToDbTask; | ||
|
||
|
||
public class DevToolboxController extends AbstractController { | ||
|
||
private DevToolboxPanel view; | ||
|
||
|
||
public DevToolboxController(DevToolboxPanel panel) { | ||
this.view = panel; | ||
view.setController(this); | ||
} | ||
|
||
|
||
public void filesToDb() { | ||
|
||
// Get current schema names | ||
String currentSchemaName = MainDao.getSchema(); | ||
if (currentSchemaName.equals("")) return; | ||
|
||
// Execute task: CopyFunctionsSchema | ||
FilesToDbTask task = new FilesToDbTask(MainDao.getWaterSoftware(), currentSchemaName, currentSchemaName); | ||
task.setPanel(view); | ||
task.addPropertyChangeListener(this); | ||
task.execute(); | ||
|
||
} | ||
|
||
|
||
public void dbToFiles() { | ||
|
||
// Get current schema names | ||
String currentSchemaName = MainDao.getSchema(); | ||
if (currentSchemaName.equals("")) return; | ||
|
||
// Execute task: CopyFunctionsSchema | ||
DbToFilesTask task = new DbToFilesTask(MainDao.getWaterSoftware(), currentSchemaName, currentSchemaName); | ||
task.setPanel(view); | ||
task.addPropertyChangeListener(this); | ||
task.execute(); | ||
|
||
} | ||
|
||
|
||
public void closePanel() { | ||
// Close frame | ||
view.getFrame().setVisible(false); | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.