本文整理汇总了Java中org.insightech.er.editor.model.dbexport.ddl.DDLTarget类的典型用法代码示例。如果您正苦于以下问题:Java DDLTarget类的具体用法?Java DDLTarget怎么用?Java DDLTarget使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DDLTarget类属于org.insightech.er.editor.model.dbexport.ddl包,在下文中一共展示了DDLTarget类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createExportManager
import org.insightech.er.editor.model.dbexport.ddl.DDLTarget; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
protected ExportWithProgressManager createExportManager(ERDiagram diagram)
throws Exception {
if (this.outputFile == null || this.outputFile.trim().equals("")) {
throw new BuildException("outputFile attribute must be set!");
}
this.outputFile = this.getAbsolutePath(this.outputFile);
Environment environment = diagram.getDiagramContents().getSettings()
.getExportSetting().getExportDDLSetting().getEnvironment();
DDLTarget ddlTarget = diagram.getDiagramContents().getSettings()
.getExportSetting().getExportDDLSetting().getDdlTarget();
if (this.encoding == null) {
this.encoding = Charset.defaultCharset().name();
}
this.log("Encoding : " + this.encoding);
ExportDDLSetting exportDDLSetting = new ExportDDLSetting();
exportDDLSetting.setDdlOutput(this.outputFile);
exportDDLSetting.setDdlTarget(ddlTarget);
exportDDLSetting.setEnvironment(environment);
exportDDLSetting.setSrcFileEncoding(this.encoding);
return new ExportToDDLManager(exportDDLSetting);
}
示例2: createDDLTarget
import org.insightech.er.editor.model.dbexport.ddl.DDLTarget; //导入依赖的package包/类
private DDLTarget createDDLTarget() {
final DDLTarget ddlTarget = new DDLTarget();
ddlTarget.dropTablespace = dropTablespace.getSelection();
ddlTarget.dropSequence = dropSequence.getSelection();
ddlTarget.dropTrigger = dropTrigger.getSelection();
ddlTarget.dropView = dropView.getSelection();
ddlTarget.dropIndex = dropIndex.getSelection();
ddlTarget.dropTable = dropTable.getSelection();
ddlTarget.createTablespace = createTablespace.getSelection();
ddlTarget.createSequence = createSequence.getSelection();
ddlTarget.createTrigger = createTrigger.getSelection();
ddlTarget.createView = createView.getSelection();
ddlTarget.createIndex = createIndex.getSelection();
ddlTarget.createTable = createTable.getSelection();
ddlTarget.createForeignKey = createForeignKey.getSelection();
ddlTarget.createComment = createComment.getSelection();
ddlTarget.inlineTableComment = inlineTableComment.getSelection();
ddlTarget.inlineColumnComment = inlineColumnComment.getSelection();
ddlTarget.commentReplaceLineFeed = commentReplaceLineFeed.getSelection();
ddlTarget.commentReplaceString = commentReplaceString.getText();
ddlTarget.commentValueDescription = commentValueDescription.getSelection();
ddlTarget.commentValueLogicalName = commentValueLogicalName.getSelection();
ddlTarget.commentValueLogicalNameDescription = commentValueLogicalNameDescription.getSelection();
return ddlTarget;
}
示例3: createXML
import org.insightech.er.editor.model.dbexport.ddl.DDLTarget; //导入依赖的package包/类
private String createXML(final DDLTarget ddlTarget, final PersistentContext context) {
final StringBuilder xml = new StringBuilder();
xml.append("<ddl_target>\n");
xml.append("\t<create_comment>").append(ddlTarget.createComment).append("</create_comment>\n");
xml.append("\t<create_foreignKey>").append(ddlTarget.createForeignKey).append("</create_foreignKey>\n");
xml.append("\t<create_index>").append(ddlTarget.createIndex).append("</create_index>\n");
xml.append("\t<create_sequence>").append(ddlTarget.createSequence).append("</create_sequence>\n");
xml.append("\t<create_table>").append(ddlTarget.createTable).append("</create_table>\n");
xml.append("\t<create_tablespace>").append(ddlTarget.createTablespace).append("</create_tablespace>\n");
xml.append("\t<create_trigger>").append(ddlTarget.createTrigger).append("</create_trigger>\n");
xml.append("\t<create_view>").append(ddlTarget.createView).append("</create_view>\n");
xml.append("\t<drop_index>").append(ddlTarget.dropIndex).append("</drop_index>\n");
xml.append("\t<drop_sequence>").append(ddlTarget.dropSequence).append("</drop_sequence>\n");
xml.append("\t<drop_table>").append(ddlTarget.dropTable).append("</drop_table>\n");
xml.append("\t<drop_tablespace>").append(ddlTarget.dropTablespace).append("</drop_tablespace>\n");
xml.append("\t<drop_trigger>").append(ddlTarget.dropTrigger).append("</drop_trigger>\n");
xml.append("\t<drop_view>").append(ddlTarget.dropView).append("</drop_view>\n");
xml.append("\t<inline_column_comment>").append(ddlTarget.inlineColumnComment).append("</inline_column_comment>\n");
xml.append("\t<inline_table_comment>").append(ddlTarget.inlineTableComment).append("</inline_table_comment>\n");
xml.append("\t<comment_value_description>").append(ddlTarget.commentValueDescription).append("</comment_value_description>\n");
xml.append("\t<comment_value_logical_name>").append(ddlTarget.commentValueLogicalName).append("</comment_value_logical_name>\n");
xml.append("\t<comment_value_logical_name_description>").append(ddlTarget.commentValueLogicalNameDescription).append("</comment_value_logical_name_description>\n");
xml.append("\t<comment_replace_line_feed>").append(ddlTarget.commentReplaceLineFeed).append("</comment_replace_line_feed>\n");
xml.append("\t<comment_replace_string>").append(Format.null2blank(ddlTarget.commentReplaceString)).append("</comment_replace_string>\n");
xml.append("</ddl_target>\n");
return xml.toString();
}
示例4: loadDDLTarget
import org.insightech.er.editor.model.dbexport.ddl.DDLTarget; //导入依赖的package包/类
private void loadDDLTarget(final DDLTarget ddlTarget, final Element parent, final LoadContext context) {
final Element element = getElement(parent, "ddl_target");
if (element != null) {
ddlTarget.createComment = this.getBooleanValue(element, "create_comment", true);
ddlTarget.createForeignKey = this.getBooleanValue(element, "create_foreignKey", true);
ddlTarget.createIndex = this.getBooleanValue(element, "create_index", true);
ddlTarget.createSequence = this.getBooleanValue(element, "create_sequence", true);
ddlTarget.createTable = this.getBooleanValue(element, "create_table", true);
ddlTarget.createTablespace = this.getBooleanValue(element, "create_tablespace", true);
ddlTarget.createTrigger = this.getBooleanValue(element, "create_trigger", true);
ddlTarget.createView = this.getBooleanValue(element, "create_view", true);
ddlTarget.dropIndex = this.getBooleanValue(element, "drop_index", true);
ddlTarget.dropSequence = this.getBooleanValue(element, "drop_sequence", true);
ddlTarget.dropTable = this.getBooleanValue(element, "drop_table", true);
ddlTarget.dropTablespace = this.getBooleanValue(element, "drop_tablespace", true);
ddlTarget.dropTrigger = this.getBooleanValue(element, "drop_trigger", true);
ddlTarget.dropView = this.getBooleanValue(element, "drop_view", true);
ddlTarget.inlineColumnComment = this.getBooleanValue(element, "inline_column_comment", true);
ddlTarget.inlineTableComment = this.getBooleanValue(element, "inline_table_comment", true);
ddlTarget.commentValueDescription = this.getBooleanValue(element, "comment_value_description", true);
ddlTarget.commentValueLogicalName = this.getBooleanValue(element, "comment_value_logical_name", false);
ddlTarget.commentValueLogicalNameDescription = this.getBooleanValue(element, "comment_value_logical_name_description", false);
ddlTarget.commentReplaceLineFeed = this.getBooleanValue(element, "comment_replace_line_feed");
ddlTarget.commentReplaceString = getStringValue(element, "comment_replace_string");
}
}
示例5: createDDLTarget
import org.insightech.er.editor.model.dbexport.ddl.DDLTarget; //导入依赖的package包/类
private DDLTarget createDDLTarget() {
DDLTarget ddlTarget = new DDLTarget();
ddlTarget.dropTablespace = this.dropTablespace.getSelection();
ddlTarget.dropSequence = this.dropSequence.getSelection();
ddlTarget.dropTrigger = this.dropTrigger.getSelection();
ddlTarget.dropView = this.dropView.getSelection();
ddlTarget.dropIndex = this.dropIndex.getSelection();
ddlTarget.dropTable = this.dropTable.getSelection();
ddlTarget.createTablespace = this.createTablespace.getSelection();
ddlTarget.createSequence = this.createSequence.getSelection();
ddlTarget.createTrigger = this.createTrigger.getSelection();
ddlTarget.createView = this.createView.getSelection();
ddlTarget.createIndex = this.createIndex.getSelection();
ddlTarget.createTable = this.createTable.getSelection();
ddlTarget.createForeignKey = this.createForeignKey.getSelection();
ddlTarget.createComment = this.createComment.getSelection();
ddlTarget.inlineTableComment = this.inlineTableComment.getSelection();
ddlTarget.inlineColumnComment = this.inlineColumnComment.getSelection();
ddlTarget.commentReplaceLineFeed = this.commentReplaceLineFeed
.getSelection();
ddlTarget.commentReplaceString = this.commentReplaceString.getText();
ddlTarget.commentValueDescription = this.commentValueDescription
.getSelection();
ddlTarget.commentValueLogicalName = this.commentValueLogicalName
.getSelection();
ddlTarget.commentValueLogicalNameDescription = this.commentValueLogicalNameDescription
.getSelection();
return ddlTarget;
}
示例6: executeDDL
import org.insightech.er.editor.model.dbexport.ddl.DDLTarget; //导入依赖的package包/类
private String executeDDL() throws SQLException {
DDLCreator ddlCreator = DBManagerFactory.getDBManager(this.diagram)
.getDDLCreator(this.diagram, this.diagram.getCurrentCategory(),
true);
ddlCreator.init(this.environment, new DDLTarget(), null);
return ddlCreator.getCreateDDL(this.diagram);
}
示例7: setData
import org.insightech.er.editor.model.dbexport.ddl.DDLTarget; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
protected void setData() {
final ExportDDLSetting exportDDLSetting = settings.getExportSetting().getExportDDLSetting();
String outputFile = Format.null2blank(exportDDLSetting.getDdlOutput());
if (Check.isEmpty(outputFile)) {
outputFile = getDefaultOutputFilePath(".sql");
}
outputFileText.setText(FileUtils.getRelativeFilePath(getBaseDir(), outputFile));
// this.setCategoryComboData(this.categoryCombo,
// exportDDLSetting.getCategory());
setCategoryData(categoryLabel);
final DDLTarget ddlTarget = exportDDLSetting.getDdlTarget();
dropIndex.setSelection(ddlTarget.dropIndex);
dropSequence.setSelection(ddlTarget.dropSequence);
dropTable.setSelection(ddlTarget.dropTable);
dropTablespace.setSelection(ddlTarget.dropTablespace);
dropTrigger.setSelection(ddlTarget.dropTrigger);
dropView.setSelection(ddlTarget.dropView);
createComment.setSelection(ddlTarget.createComment);
createForeignKey.setSelection(ddlTarget.createForeignKey);
createIndex.setSelection(ddlTarget.createIndex);
createSequence.setSelection(ddlTarget.createSequence);
createTable.setSelection(ddlTarget.createTable);
createTablespace.setSelection(ddlTarget.createTablespace);
createTrigger.setSelection(ddlTarget.createTrigger);
createView.setSelection(ddlTarget.createView);
inlineColumnComment.setSelection(ddlTarget.inlineColumnComment);
inlineTableComment.setSelection(ddlTarget.inlineTableComment);
commentReplaceLineFeed.setSelection(ddlTarget.commentReplaceLineFeed);
commentReplaceString.setText(Format.null2blank(ddlTarget.commentReplaceString));
commentValueDescription.setSelection(ddlTarget.commentValueDescription);
commentValueLogicalName.setSelection(ddlTarget.commentValueLogicalName);
commentValueLogicalNameDescription.setSelection(ddlTarget.commentValueLogicalNameDescription);
if (!ddlTarget.commentValueDescription && !ddlTarget.commentValueLogicalName && !ddlTarget.commentValueLogicalNameDescription) {
commentValueDescription.setSelection(true);
}
environmentCombo.select(0);
if (exportDDLSetting.getEnvironment() != null) {
final int index = settings.getEnvironmentSetting().getEnvironments().indexOf(exportDDLSetting.getEnvironment());
if (index != -1) {
environmentCombo.select(index);
}
}
if (!Check.isEmpty(exportDDLSetting.getSrcFileEncoding())) {
fileEncodingCombo.setText(exportDDLSetting.getSrcFileEncoding());
}
if (!Check.isEmpty(exportDDLSetting.getLineFeed())) {
lineFeedCombo.setText(exportDDLSetting.getLineFeed());
} else {
if ("\n".equals(System.getProperty("line.separator"))) {
lineFeedCombo.setText(ExportDDLSetting.LF);
} else {
lineFeedCombo.setText(ExportDDLSetting.CRLF);
}
}
openAfterSavedButton.setSelection(exportDDLSetting.isOpenAfterSaved());
}
示例8: getDdlTarget
import org.insightech.er.editor.model.dbexport.ddl.DDLTarget; //导入依赖的package包/类
public DDLTarget getDdlTarget() {
return ddlTarget;
}
示例9: setDdlTarget
import org.insightech.er.editor.model.dbexport.ddl.DDLTarget; //导入依赖的package包/类
public void setDdlTarget(final DDLTarget ddlTarget) {
this.ddlTarget = ddlTarget;
}
示例10: executeDDL
import org.insightech.er.editor.model.dbexport.ddl.DDLTarget; //导入依赖的package包/类
private String executeDDL() throws SQLException {
final DDLCreator ddlCreator = DBManagerFactory.getDBManager(diagram).getDDLCreator(diagram, diagram.getCurrentCategory(), true);
ddlCreator.init(environment, new DDLTarget(), null);
return ddlCreator.getCreateDDL(diagram);
}
示例11: getDdlTarget
import org.insightech.er.editor.model.dbexport.ddl.DDLTarget; //导入依赖的package包/类
public DDLTarget getDdlTarget() {
return ddlTarget;
}
示例12: setDdlTarget
import org.insightech.er.editor.model.dbexport.ddl.DDLTarget; //导入依赖的package包/类
public void setDdlTarget(DDLTarget ddlTarget) {
this.ddlTarget = ddlTarget;
}
示例13: createXML
import org.insightech.er.editor.model.dbexport.ddl.DDLTarget; //导入依赖的package包/类
private String createXML(DDLTarget ddlTarget, PersistentContext context) {
StringBuilder xml = new StringBuilder();
xml.append("<ddl_target>\n");
xml.append("\t<create_comment>").append(ddlTarget.createComment)
.append("</create_comment>\n");
xml.append("\t<create_foreignKey>").append(ddlTarget.createForeignKey)
.append("</create_foreignKey>\n");
xml.append("\t<create_index>").append(ddlTarget.createIndex)
.append("</create_index>\n");
xml.append("\t<create_sequence>").append(ddlTarget.createSequence)
.append("</create_sequence>\n");
xml.append("\t<create_table>").append(ddlTarget.createTable)
.append("</create_table>\n");
xml.append("\t<create_tablespace>").append(ddlTarget.createTablespace)
.append("</create_tablespace>\n");
xml.append("\t<create_trigger>").append(ddlTarget.createTrigger)
.append("</create_trigger>\n");
xml.append("\t<create_view>").append(ddlTarget.createView)
.append("</create_view>\n");
xml.append("\t<drop_index>").append(ddlTarget.dropIndex)
.append("</drop_index>\n");
xml.append("\t<drop_sequence>").append(ddlTarget.dropSequence)
.append("</drop_sequence>\n");
xml.append("\t<drop_table>").append(ddlTarget.dropTable)
.append("</drop_table>\n");
xml.append("\t<drop_tablespace>").append(ddlTarget.dropTablespace)
.append("</drop_tablespace>\n");
xml.append("\t<drop_trigger>").append(ddlTarget.dropTrigger)
.append("</drop_trigger>\n");
xml.append("\t<drop_view>").append(ddlTarget.dropView)
.append("</drop_view>\n");
xml.append("\t<inline_column_comment>")
.append(ddlTarget.inlineColumnComment)
.append("</inline_column_comment>\n");
xml.append("\t<inline_table_comment>")
.append(ddlTarget.inlineTableComment)
.append("</inline_table_comment>\n");
xml.append("\t<comment_value_description>")
.append(ddlTarget.commentValueDescription)
.append("</comment_value_description>\n");
xml.append("\t<comment_value_logical_name>")
.append(ddlTarget.commentValueLogicalName)
.append("</comment_value_logical_name>\n");
xml.append("\t<comment_value_logical_name_description>")
.append(ddlTarget.commentValueLogicalNameDescription)
.append("</comment_value_logical_name_description>\n");
xml.append("\t<comment_replace_line_feed>")
.append(ddlTarget.commentReplaceLineFeed)
.append("</comment_replace_line_feed>\n");
xml.append("\t<comment_replace_string>")
.append(Format.null2blank(ddlTarget.commentReplaceString))
.append("</comment_replace_string>\n");
xml.append("</ddl_target>\n");
return xml.toString();
}
示例14: loadDDLTarget
import org.insightech.er.editor.model.dbexport.ddl.DDLTarget; //导入依赖的package包/类
private void loadDDLTarget(DDLTarget ddlTarget, Element parent,
LoadContext context) {
Element element = this.getElement(parent, "ddl_target");
if (element != null) {
ddlTarget.createComment = this.getBooleanValue(element,
"create_comment", true);
ddlTarget.createForeignKey = this.getBooleanValue(element,
"create_foreignKey", true);
ddlTarget.createIndex = this.getBooleanValue(element,
"create_index", true);
ddlTarget.createSequence = this.getBooleanValue(element,
"create_sequence", true);
ddlTarget.createTable = this.getBooleanValue(element,
"create_table", true);
ddlTarget.createTablespace = this.getBooleanValue(element,
"create_tablespace", true);
ddlTarget.createTrigger = this.getBooleanValue(element,
"create_trigger", true);
ddlTarget.createView = this.getBooleanValue(element, "create_view",
true);
ddlTarget.dropIndex = this.getBooleanValue(element, "drop_index",
true);
ddlTarget.dropSequence = this.getBooleanValue(element,
"drop_sequence", true);
ddlTarget.dropTable = this.getBooleanValue(element, "drop_table",
true);
ddlTarget.dropTablespace = this.getBooleanValue(element,
"drop_tablespace", true);
ddlTarget.dropTrigger = this.getBooleanValue(element,
"drop_trigger", true);
ddlTarget.dropView = this.getBooleanValue(element, "drop_view",
true);
ddlTarget.inlineColumnComment = this.getBooleanValue(element,
"inline_column_comment", true);
ddlTarget.inlineTableComment = this.getBooleanValue(element,
"inline_table_comment", true);
ddlTarget.commentValueDescription = this.getBooleanValue(element,
"comment_value_description", true);
ddlTarget.commentValueLogicalName = this.getBooleanValue(element,
"comment_value_logical_name", false);
ddlTarget.commentValueLogicalNameDescription = this
.getBooleanValue(element,
"comment_value_logical_name_description", false);
ddlTarget.commentReplaceLineFeed = this.getBooleanValue(element,
"comment_replace_line_feed");
ddlTarget.commentReplaceString = this.getStringValue(element,
"comment_replace_string");
}
}