本文整理汇总了Java中org.insightech.er.db.DBManager类的典型用法代码示例。如果您正苦于以下问题:Java DBManager类的具体用法?Java DBManager怎么用?Java DBManager使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DBManager类属于org.insightech.er.db包,在下文中一共展示了DBManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initializeIndexColumnList
import org.insightech.er.db.DBManager; //导入依赖的package包/类
private void initializeIndexColumnList(final Composite parent) {
final GridData gridData = new GridData();
gridData.verticalSpan = 2;
gridData.verticalAlignment = GridData.FILL;
gridData.grabExcessVerticalSpace = true;
indexColumnList = new Table(parent, SWT.FULL_SELECTION | SWT.BORDER);
indexColumnList.setHeaderVisible(true);
indexColumnList.setLayoutData(gridData);
indexColumnList.setLinesVisible(false);
final TableColumn tableColumn = new TableColumn(indexColumnList, SWT.CENTER);
tableColumn.setWidth(150);
tableColumn.setText(ResourceString.getResourceString("label.column.name"));
if (DBManagerFactory.getDBManager(table.getDiagram()).isSupported(DBManager.SUPPORT_DESC_INDEX)) {
final TableColumn tableColumn1 = new TableColumn(indexColumnList, SWT.CENTER);
tableColumn1.setWidth(50);
tableColumn1.setText(ResourceString.getResourceString("label.order.desc"));
}
}
示例2: setTableEditor
import org.insightech.er.db.DBManager; //导入依赖的package包/类
private void setTableEditor(final NormalColumn normalColumn, final TableItem tableItem, final Boolean desc) {
final Button descCheckButton = new Button(indexColumnList, SWT.CHECK);
descCheckButton.pack();
if (DBManagerFactory.getDBManager(table.getDiagram()).isSupported(DBManager.SUPPORT_DESC_INDEX)) {
final TableEditor editor = new TableEditor(indexColumnList);
editor.minimumWidth = descCheckButton.getSize().x;
editor.horizontalAlignment = SWT.CENTER;
editor.setEditor(descCheckButton, tableItem, 1);
columnCheckMap.put(normalColumn, editor);
}
descCheckBoxMap.put(normalColumn, descCheckButton);
descCheckButton.setSelection(desc.booleanValue());
}
示例3: perfomeOK
import org.insightech.er.db.DBManager; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
protected void perfomeOK() {
final String text = nameText.getText();
resultIndex = new Index(table, text, !uniqueCheckBox.getSelection(), typeCombo.getText(), null);
resultIndex.setDescription(descriptionText.getText().trim());
for (final NormalColumn selectedColumn : selectedColumns) {
final Boolean desc = Boolean.valueOf(descCheckBoxMap.get(selectedColumn).getSelection());
resultIndex.addColumn(selectedColumn, desc);
}
final DBManager dbManager = DBManagerFactory.getDBManager(table.getDiagram());
if (dbManager.isSupported(DBManager.SUPPORT_FULLTEXT_INDEX)) {
resultIndex.setFullText(fullTextCheckBox.getSelection());
}
}
示例4: enableUseDefaultDriver
import org.insightech.er.db.DBManager; //导入依赖的package包/类
private void enableUseDefaultDriver() {
final String database = getDBSName();
if (!Check.isEmpty(database)) {
final DBManager dbManager = DBManagerFactory.getDBManager(database);
if (StandardSQLDBManager.ID.equals(dbManager.getId())) {
useDefaultDriverButton.setSelection(false);
useDefaultDriverButton.setEnabled(false);
} else {
useDefaultDriverButton.setSelection(true);
useDefaultDriverButton.setEnabled(true);
}
}
}
示例5: initializeDetailTab
import org.insightech.er.db.DBManager; //导入依赖的package包/类
@Override
protected void initializeDetailTab(final Composite composite) {
uniqueKeyNameText = CompositeFactory.createText(this, composite, "label.unique.key.name", false, true);
super.initializeDetailTab(composite);
final DBManager manager = DBManagerFactory.getDBManager(diagram);
if (MySQLDBManager.ID.equals(diagram.getDatabase())) {
characterSetCombo = CompositeFactory.createCombo(this, composite, "label.character.set");
collationCombo = CompositeFactory.createCombo(this, composite, "label.collation");
}
if (manager.isSupported(DBManager.SUPPORT_AUTO_INCREMENT_SETTING)) {
CompositeFactory.fillLine(composite);
autoIncrementSettingButton = CompositeFactory.createLargeButton(composite, "label.auto.increment.setting", 2);
autoIncrementSettingButton.setEnabled(false);
}
}
示例6: initializeCheckBoxComposite
import org.insightech.er.db.DBManager; //导入依赖的package包/类
@Override
protected void initializeCheckBoxComposite(final Composite composite) {
primaryKeyCheck = CompositeFactory.createCheckbox(this, composite, "label.primary.key", false);
super.initializeCheckBoxComposite(composite);
final DBManager manager = DBManagerFactory.getDBManager(diagram);
if (manager.isSupported(DBManager.SUPPORT_AUTO_INCREMENT)) {
autoIncrementCheck = CompositeFactory.createCheckbox(this, composite, "label.auto.increment", false);
}
if (isRefered) {
uniqueKeyCheck.setEnabled(false);
}
enableAutoIncrement(false);
}
示例7: getNameWithSchema
import org.insightech.er.db.DBManager; //导入依赖的package包/类
public String getNameWithSchema(final String database) {
final StringBuilder sb = new StringBuilder();
final DBManager dbManager = DBManagerFactory.getDBManager(database);
if (!dbManager.isSupported(DBManager.SUPPORT_SCHEMA)) {
return Format.null2blank(getPhysicalName());
}
final TableViewProperties commonTableViewProperties = getDiagram().getDiagramContents().getSettings().getTableViewProperties();
String schema = getTableViewProperties().getSchema();
if (schema == null || schema.equals("")) {
schema = commonTableViewProperties.getSchema();
}
if (schema != null && !schema.equals("")) {
sb.append(schema);
sb.append(".");
}
sb.append(getPhysicalName());
return sb.toString();
}
示例8: getTableNameWithSchema
import org.insightech.er.db.DBManager; //导入依赖的package包/类
public String getTableNameWithSchema(final String tableName, final String schema, final boolean toUpperCase) {
String name = null;
if (Check.isEmpty(schema)) {
name = Format.null2blank(tableName);
} else {
final DBManager dbManager = DBManagerFactory.getDBManager(dbsystem);
if (!dbManager.isSupported(DBManager.SUPPORT_SCHEMA)) {
name = Format.null2blank(tableName);
} else {
name = schema + "." + Format.null2blank(tableName);
}
}
if (toUpperCase) {
name = name.toUpperCase();
}
return name;
}
示例9: connect
import org.insightech.er.db.DBManager; //导入依赖的package包/类
public Connection connect() throws InputException, InstantiationException, IllegalAccessException, SQLException {
final DBManager manager = DBManagerFactory.getDBManager(getDbsystem());
final Class<Driver> driverClass = manager.getDriverClass(getDriverClassName());
if (driverClass == null) {
throw new InputException("error.jdbc.driver.not.found");
}
final Driver driver = driverClass.newInstance();
final Properties info = new Properties();
if (getUser() != null) {
info.put("user", getUser());
}
if (getPassword() != null) {
info.put("password", getPassword());
}
return driver.connect(getUrl(), info);
}
示例10: initializeIndexColumnList
import org.insightech.er.db.DBManager; //导入依赖的package包/类
private void initializeIndexColumnList(Composite parent) {
GridData gridData = new GridData();
gridData.verticalSpan = 2;
gridData.verticalAlignment = GridData.FILL;
gridData.grabExcessVerticalSpace = true;
indexColumnList = new Table(parent, SWT.FULL_SELECTION | SWT.BORDER);
indexColumnList.setHeaderVisible(true);
indexColumnList.setLayoutData(gridData);
indexColumnList.setLinesVisible(false);
TableColumn tableColumn = new TableColumn(indexColumnList, SWT.CENTER);
tableColumn.setWidth(150);
tableColumn.setText(ResourceString
.getResourceString("label.column.name"));
if (DBManagerFactory.getDBManager(this.table.getDiagram()).isSupported(
DBManager.SUPPORT_DESC_INDEX)) {
TableColumn tableColumn1 = new TableColumn(indexColumnList,
SWT.CENTER);
tableColumn1.setWidth(50);
tableColumn1.setText(ResourceString
.getResourceString("label.order.desc"));
}
}
示例11: setTableEditor
import org.insightech.er.db.DBManager; //导入依赖的package包/类
private void setTableEditor(final NormalColumn normalColumn,
TableItem tableItem, Boolean desc) {
Button descCheckButton = new Button(this.indexColumnList, SWT.CHECK);
descCheckButton.pack();
if (DBManagerFactory.getDBManager(this.table.getDiagram()).isSupported(
DBManager.SUPPORT_DESC_INDEX)) {
TableEditor editor = new TableEditor(this.indexColumnList);
editor.minimumWidth = descCheckButton.getSize().x;
editor.horizontalAlignment = SWT.CENTER;
editor.setEditor(descCheckButton, tableItem, 1);
this.columnCheckMap.put(normalColumn, editor);
}
this.descCheckBoxMap.put(normalColumn, descCheckButton);
descCheckButton.setSelection(desc.booleanValue());
}
示例12: perfomeOK
import org.insightech.er.db.DBManager; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
protected void perfomeOK() {
String text = nameText.getText();
this.resultIndex = new Index(table, text,
!this.uniqueCheckBox.getSelection(), this.typeCombo.getText(),
null);
this.resultIndex.setDescription(this.descriptionText.getText().trim());
for (NormalColumn selectedColumn : selectedColumns) {
Boolean desc = Boolean.valueOf(this.descCheckBoxMap.get(
selectedColumn).getSelection());
this.resultIndex.addColumn(selectedColumn, desc);
}
DBManager dbManager = DBManagerFactory.getDBManager(table.getDiagram());
if (dbManager.isSupported(DBManager.SUPPORT_FULLTEXT_INDEX)) {
this.resultIndex.setFullText(this.fullTextCheckBox.getSelection());
}
}
示例13: enableUseDefaultDriver
import org.insightech.er.db.DBManager; //导入依赖的package包/类
private void enableUseDefaultDriver() {
String database = this.getDBSName();
if (!Check.isEmpty(database)) {
DBManager dbManager = DBManagerFactory.getDBManager(database);
if (StandardSQLDBManager.ID.equals(dbManager.getId())) {
this.useDefaultDriverButton.setSelection(false);
this.useDefaultDriverButton.setEnabled(false);
} else {
this.useDefaultDriverButton.setSelection(true);
this.useDefaultDriverButton.setEnabled(true);
}
}
}
示例14: initializeDetailTab
import org.insightech.er.db.DBManager; //导入依赖的package包/类
@Override
protected void initializeDetailTab(Composite composite) {
this.uniqueKeyNameText = CompositeFactory.createText(this, composite,
"label.unique.key.name", false, true);
super.initializeDetailTab(composite);
DBManager manager = DBManagerFactory.getDBManager(this.diagram);
if (MySQLDBManager.ID.equals(this.diagram.getDatabase())) {
this.characterSetCombo = CompositeFactory.createCombo(this,
composite, "label.character.set");
this.collationCombo = CompositeFactory.createCombo(this, composite,
"label.collation");
}
if (manager.isSupported(DBManager.SUPPORT_AUTO_INCREMENT_SETTING)) {
CompositeFactory.fillLine(composite);
this.autoIncrementSettingButton = CompositeFactory
.createLargeButton(composite,
"label.auto.increment.setting", 2);
this.autoIncrementSettingButton.setEnabled(false);
}
}
示例15: initializeCheckBoxComposite
import org.insightech.er.db.DBManager; //导入依赖的package包/类
@Override
protected void initializeCheckBoxComposite(Composite composite) {
this.primaryKeyCheck = CompositeFactory.createCheckbox(this, composite,
"label.primary.key", false);
super.initializeCheckBoxComposite(composite);
DBManager manager = DBManagerFactory.getDBManager(this.diagram);
if (manager.isSupported(DBManager.SUPPORT_AUTO_INCREMENT)) {
this.autoIncrementCheck = CompositeFactory.createCheckbox(this,
composite, "label.auto.increment", false);
}
if (this.isRefered) {
this.uniqueKeyCheck.setEnabled(false);
}
this.enableAutoIncrement(false);
}