use of com.kyj.fx.voeditor.visual.component.popup.VariableMappingView in project Gargoyle by callakrsos.
the class SqlPane method execute.
private void execute() {
SqlTab selectedItem = sqlTabPane.getSelectedTab();
String sql = selectedItem.getSelectedSQLText();
if (sql == null || sql.isEmpty()) {
sql = selectedItem.getSqlText();
if (sql == null || sql.isEmpty())
return;
}
String trimedSql = sql.trim();
// 2016-09-03 오라클에서는 쿼리문장끝에 ';' 이 포함되면 안되므로 제거
if (trimedSql.endsWith(";")) {
trimedSql = trimedSql.substring(0, trimedSql.length() - 1);
}
String _sql = trimedSql;
if (ValueUtil.isVelocityContext(_sql)) {
VariableMappingView mappingView = new VariableMappingView(stage);
mappingView.extractVariableFromSql(_sql);
mappingView.showAndWait(dynamicParams -> {
execute(_sql, dynamicParams);
});
} else
execute(_sql);
}
use of com.kyj.fx.voeditor.visual.component.popup.VariableMappingView in project Gargoyle by callakrsos.
the class MapValueFactoryExam method start.
/*
* (non-Javadoc)
*
* @see javafx.application.Application#start(javafx.stage.Stage)
*/
@Override
public void start(Stage primaryStage) throws Exception {
VariableMappingView controller = new VariableMappingView();
controller.extractVariableFromSql("select * from tbm_sm_user where user_id = :userId");
//controller.setVariableItems(extractVariableFromSql);
primaryStage.setScene(new Scene(new BorderPane(controller)));
primaryStage.show();
}
use of com.kyj.fx.voeditor.visual.component.popup.VariableMappingView in project Gargoyle by callakrsos.
the class DialogExam method start.
/*
* (non-Javadoc)
*
* @see javafx.application.Application#start(javafx.stage.Stage)
*/
@Override
public void start(Stage primaryStage) throws Exception {
String sql = "select * from tbm_sm_user where user_id = :userId";
Button center = new Button("클릭");
center.setOnMouseClicked(event -> {
VariableMappingView variableMappingView = new VariableMappingView();
variableMappingView.extractVariableFromSql(sql);
variableMappingView.showAndWait(item -> {
System.out.println(item);
});
});
primaryStage.setScene(new Scene(new BorderPane(center)));
primaryStage.show();
}
use of com.kyj.fx.voeditor.visual.component.popup.VariableMappingView in project Gargoyle by callakrsos.
the class SqlMultiplePane method execute.
private void execute() {
SqlTab selectedItem = sqlTabPane.getSelectedTab();
String sql = selectedItem.getSelectedSQLText();
if (sql == null || sql.isEmpty()) {
sql = selectedItem.getSqlText();
}
if (sql == null || sql.isEmpty())
return;
final String _sql = sql;
if (ValueUtil.isVelocityContext(_sql)) {
VariableMappingView mappingView = new VariableMappingView(stage);
mappingView.extractVariableFromSql(_sql);
mappingView.showAndWait(dynamicParams -> {
execute(_sql, dynamicParams);
});
} else
execute(_sql);
}
Aggregations