本文整理匯總了Java中org.pentaho.di.core.database.DatabaseMeta.getDatabaseTypeCode方法的典型用法代碼示例。如果您正苦於以下問題:Java DatabaseMeta.getDatabaseTypeCode方法的具體用法?Java DatabaseMeta.getDatabaseTypeCode怎麽用?Java DatabaseMeta.getDatabaseTypeCode使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.pentaho.di.core.database.DatabaseMeta
的用法示例。
在下文中一共展示了DatabaseMeta.getDatabaseTypeCode方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setPortNumber
import org.pentaho.di.core.database.DatabaseMeta; //導入方法依賴的package包/類
public void setPortNumber()
{
String type = DatabaseMeta.getDatabaseTypeCode(wConnType.getSelectionIndex()+1);
// What port should we select?
String acce = wConnAcc.getItem(wConnAcc.getSelectionIndex());
int port = DatabaseMeta.getPortForDBType(type, acce);
if (port < 0)
wPort.setText(""); //$NON-NLS-1$
else
wPort.setText("" + port); //$NON-NLS-1$
}
示例2: getData
import org.pentaho.di.core.database.DatabaseMeta; //導入方法依賴的package包/類
public void getData()
{
wConn.setText(NVL(databaseMeta == null ? "" : databaseMeta.getName(), "")); //$NON-NLS-1$ //$NON-NLS-2$
wConnType.select(databaseMeta.getDatabaseType() - 1);
wConnType.showSelection();
previousDatabaseType = DatabaseMeta.getDatabaseTypeCode(wConnType.getSelectionIndex()+1);
setAccessList();
String accessList[] = wConnAcc.getItems();
int accessIndex = Const.indexOfString(databaseMeta.getAccessTypeDesc(), accessList);
wConnAcc.select(accessIndex);
wConnAcc.showSelection();
wHostName.setText(NVL(databaseMeta.getHostname(), "")); //$NON-NLS-1$
wDBName.setText(NVL(databaseMeta.getDatabaseName(), "")); //$NON-NLS-1$
wPort.setText(NVL(databaseMeta.getDatabasePortNumberString(), "")); //$NON-NLS-1$
wServername.setText(NVL(databaseMeta.getServername(), "")); //$NON-NLS-1$
wUsername.setText(NVL(databaseMeta.getUsername(), "")); //$NON-NLS-1$
wPassword.setText(NVL(databaseMeta.getPassword(), "")); //$NON-NLS-1$
wData.setText(NVL(databaseMeta.getDataTablespace(), "")); //$NON-NLS-1$
wIndex.setText(NVL(databaseMeta.getIndexTablespace(), "")); //$NON-NLS-1$
wSAPLanguage.setText(databaseMeta.getAttributes().getProperty(SAPR3DatabaseMeta.ATTRIBUTE_SAP_LANGUAGE, "")); //$NON-NLS-1$
wSAPSystemNumber.setText(databaseMeta.getAttributes().getProperty(SAPR3DatabaseMeta.ATTRIBUTE_SAP_SYSTEM_NUMBER, "")); //$NON-NLS-1$
wSAPClient.setText(databaseMeta.getAttributes().getProperty(SAPR3DatabaseMeta.ATTRIBUTE_SAP_CLIENT, "")); //$NON-NLS-1$
wURL.setText(databaseMeta.getAttributes().getProperty(GenericDatabaseMeta.ATRRIBUTE_CUSTOM_URL, "")); //$NON-NLS-1$
wDriverClass.setText(databaseMeta.getAttributes().getProperty(GenericDatabaseMeta.ATRRIBUTE_CUSTOM_DRIVER_CLASS, "")); //$NON-NLS-1$
wStreamResult.setSelection(databaseMeta.isStreamingResults());
wQuoteAllFields.setSelection(databaseMeta.isQuoteAllFields());
wForceIdentifiersLowerCase.setSelection(databaseMeta.isForcingIdentifiersToLowerCase());
wForceIdentifiersUpperCase.setSelection(databaseMeta.isForcingIdentifiersToUpperCase());
getOptionsData();
checkPasswordVisible(wPassword.getTextWidget());
wSQL.setText(NVL(databaseMeta.getConnectSQL(), "")); //$NON-NLS-1$
getPoolingData();
// SQL Server options...
wDoubleDecimalSeparator.setSelection( databaseMeta.isUsingDoubleDecimalAsSchemaTableSeparator());
if (databaseMeta.getSQLServerInstance()!=null) wInstanceName.setText( databaseMeta.getSQLServerInstance() );
wConn.setFocus();
wConn.selectAll();
getClusterData();
}