本文整理汇总了Java中org.insightech.er.db.impl.mysql.tablespace.MySQLTablespaceProperties类的典型用法代码示例。如果您正苦于以下问题:Java MySQLTablespaceProperties类的具体用法?Java MySQLTablespaceProperties怎么用?Java MySQLTablespaceProperties使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
MySQLTablespaceProperties类属于org.insightech.er.db.impl.mysql.tablespace包,在下文中一共展示了MySQLTablespaceProperties类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createXML
import org.insightech.er.db.impl.mysql.tablespace.MySQLTablespaceProperties; //导入依赖的package包/类
private String createXML(MySQLTablespaceProperties tablespace) {
StringBuilder xml = new StringBuilder();
xml.append("<data_file>").append(escape(tablespace.getDataFile()))
.append("</data_file>\n");
xml.append("<engine>").append(escape(tablespace.getEngine()))
.append("</engine>\n");
xml.append("<extent_size>").append(escape(tablespace.getExtentSize()))
.append("</extent_size>\n");
xml.append("<initial_size>")
.append(escape(tablespace.getInitialSize()))
.append("</initial_size>\n");
xml.append("<log_file_group>")
.append(escape(tablespace.getLogFileGroup()))
.append("</log_file_group>\n");
return xml.toString();
}
示例2: getDDL
import org.insightech.er.db.impl.mysql.tablespace.MySQLTablespaceProperties; //导入依赖的package包/类
@Override
protected String getDDL(final Tablespace tablespace) {
final MySQLTablespaceProperties tablespaceProperties = (MySQLTablespaceProperties) tablespace.getProperties(environment, getDiagram());
final StringBuilder ddl = new StringBuilder();
ddl.append("CREATE TABLESPACE ");
ddl.append(filterName(tablespace.getName()));
ddl.append(LF());
ddl.append(" ADD DATAFILE '");
ddl.append(tablespaceProperties.getDataFile());
ddl.append("'" + LF());
ddl.append(" USE LOGFILE GROUP ");
ddl.append(tablespaceProperties.getLogFileGroup());
ddl.append(LF());
if (!Check.isEmpty(tablespaceProperties.getExtentSize())) {
ddl.append(" EXTENT_SIZE ");
ddl.append(tablespaceProperties.getExtentSize());
ddl.append(LF());
}
ddl.append(" INITIAL_SIZE ");
ddl.append(tablespaceProperties.getInitialSize());
ddl.append(LF());
ddl.append(" ENGINE ");
ddl.append(tablespaceProperties.getEngine());
ddl.append(LF());
if (semicolon) {
ddl.append(";");
}
return ddl.toString();
}
示例3: checkTablespaceProperties
import org.insightech.er.db.impl.mysql.tablespace.MySQLTablespaceProperties; //导入依赖的package包/类
@Override
public TablespaceProperties checkTablespaceProperties(final TablespaceProperties tablespaceProperties) {
if (!(tablespaceProperties instanceof MySQLTablespaceProperties)) {
return new MySQLTablespaceProperties();
}
return tablespaceProperties;
}
示例4: createXML
import org.insightech.er.db.impl.mysql.tablespace.MySQLTablespaceProperties; //导入依赖的package包/类
private String createXML(final Tablespace tablespace, final PersistentContext context) {
final StringBuilder xml = new StringBuilder();
xml.append("<tablespace>\n");
if (context != null) {
xml.append("\t<id>").append(context.tablespaceMap.get(tablespace)).append("</id>\n");
}
xml.append("\t<name>").append(escape(tablespace.getName())).append("</name>\n");
for (final Map.Entry<Environment, TablespaceProperties> entry : tablespace.getPropertiesMap().entrySet()) {
final Environment environment = entry.getKey();
final TablespaceProperties tablespaceProperties = entry.getValue();
xml.append("\t<properties>\n");
xml.append("\t\t<environment_id>").append(context.environmentMap.get(environment)).append("</environment_id>\n");
if (tablespaceProperties instanceof DB2TablespaceProperties) {
xml.append(tab(tab(this.createXML((DB2TablespaceProperties) tablespaceProperties))));
} else if (tablespaceProperties instanceof MySQLTablespaceProperties) {
xml.append(tab(tab(this.createXML((MySQLTablespaceProperties) tablespaceProperties))));
} else if (tablespaceProperties instanceof OracleTablespaceProperties) {
xml.append(tab(tab(this.createXML((OracleTablespaceProperties) tablespaceProperties))));
} else if (tablespaceProperties instanceof PostgresTablespaceProperties) {
xml.append(tab(tab(this.createXML((PostgresTablespaceProperties) tablespaceProperties))));
}
xml.append("\t</properties>\n");
}
xml.append("</tablespace>\n");
return xml.toString();
}
示例5: loadTablespacePropertiesMySQL
import org.insightech.er.db.impl.mysql.tablespace.MySQLTablespaceProperties; //导入依赖的package包/类
private TablespaceProperties loadTablespacePropertiesMySQL(final Element element) {
final MySQLTablespaceProperties properties = new MySQLTablespaceProperties();
properties.setDataFile(getStringValue(element, "data_file"));
properties.setEngine(getStringValue(element, "engine"));
properties.setExtentSize(getStringValue(element, "extent_size"));
properties.setInitialSize(getStringValue(element, "initial_size"));
properties.setLogFileGroup(getStringValue(element, "log_file_group"));
return properties;
}
示例6: getDDL
import org.insightech.er.db.impl.mysql.tablespace.MySQLTablespaceProperties; //导入依赖的package包/类
@Override
protected String getDDL(Tablespace tablespace) {
MySQLTablespaceProperties tablespaceProperties = (MySQLTablespaceProperties) tablespace
.getProperties(this.environment, this.getDiagram());
StringBuilder ddl = new StringBuilder();
ddl.append("CREATE TABLESPACE ");
ddl.append(filterName(tablespace.getName()));
ddl.append(LF());
ddl.append(" ADD DATAFILE '");
ddl.append(tablespaceProperties.getDataFile());
ddl.append("'" + LF());
ddl.append(" USE LOGFILE GROUP ");
ddl.append(tablespaceProperties.getLogFileGroup());
ddl.append(LF());
if (!Check.isEmpty(tablespaceProperties.getExtentSize())) {
ddl.append(" EXTENT_SIZE ");
ddl.append(tablespaceProperties.getExtentSize());
ddl.append(LF());
}
ddl.append(" INITIAL_SIZE ");
ddl.append(tablespaceProperties.getInitialSize());
ddl.append(LF());
ddl.append(" ENGINE ");
ddl.append(tablespaceProperties.getEngine());
ddl.append(LF());
if (this.semicolon) {
ddl.append(";");
}
return ddl.toString();
}
示例7: checkTablespaceProperties
import org.insightech.er.db.impl.mysql.tablespace.MySQLTablespaceProperties; //导入依赖的package包/类
public TablespaceProperties checkTablespaceProperties(
TablespaceProperties tablespaceProperties) {
if (!(tablespaceProperties instanceof MySQLTablespaceProperties)) {
return new MySQLTablespaceProperties();
}
return tablespaceProperties;
}
示例8: loadTablespacePropertiesMySQL
import org.insightech.er.db.impl.mysql.tablespace.MySQLTablespaceProperties; //导入依赖的package包/类
private TablespaceProperties loadTablespacePropertiesMySQL(Element element) {
MySQLTablespaceProperties properties = new MySQLTablespaceProperties();
properties.setDataFile(this.getStringValue(element, "data_file"));
properties.setEngine(this.getStringValue(element, "engine"));
properties.setExtentSize(this.getStringValue(element, "extent_size"));
properties.setInitialSize(this.getStringValue(element, "initial_size"));
properties.setLogFileGroup(this.getStringValue(element,
"log_file_group"));
return properties;
}
示例9: createTablespaceProperties
import org.insightech.er.db.impl.mysql.tablespace.MySQLTablespaceProperties; //导入依赖的package包/类
@Override
public TablespaceProperties createTablespaceProperties() {
return new MySQLTablespaceProperties();
}
示例10: createTablespaceProperties
import org.insightech.er.db.impl.mysql.tablespace.MySQLTablespaceProperties; //导入依赖的package包/类
public TablespaceProperties createTablespaceProperties() {
return new MySQLTablespaceProperties();
}