当前位置: 首页>>代码示例>>Java>>正文


Java DatabaseMeta.getDatabaseTypeCode方法代码示例

本文整理汇总了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$
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:13,代码来源:ClassicDatabaseDialog.java

示例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();
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:53,代码来源:ClassicDatabaseDialog.java


注:本文中的org.pentaho.di.core.database.DatabaseMeta.getDatabaseTypeCode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。