本文整理汇总了Java中org.pentaho.di.core.database.BaseDatabaseMeta类的典型用法代码示例。如果您正苦于以下问题:Java BaseDatabaseMeta类的具体用法?Java BaseDatabaseMeta怎么用?Java BaseDatabaseMeta使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BaseDatabaseMeta类属于org.pentaho.di.core.database包,在下文中一共展示了BaseDatabaseMeta类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getPoolingData
import org.pentaho.di.core.database.BaseDatabaseMeta; //导入依赖的package包/类
private void getPoolingData()
{
// The extra options as well...
Properties properties = databaseMeta.getConnectionPoolingProperties();
Iterator<Object> keys = properties.keySet().iterator();
while (keys.hasNext())
{
String parameter = (String) keys.next();
String value = (String) properties.get(parameter);
String defValue = DatabaseConnectionPoolParameter.findParameter(parameter, BaseDatabaseMeta.poolingParameters).getDefaultValue();
TableItem item = new TableItem(wPoolParameters.table, SWT.NONE);
item.setText(1, Const.NVL(parameter, ""));
item.setText(2, Const.NVL(defValue, ""));
item.setText(3, Const.NVL(value, ""));
}
wPoolParameters.removeEmptyRows();
wPoolParameters.setRowNums();
wPoolParameters.optWidth(true);
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:21,代码来源:ClassicDatabaseDialog.java
示例2: poolingRowChange
import org.pentaho.di.core.database.BaseDatabaseMeta; //导入依赖的package包/类
public void poolingRowChange(int idx) {
if (idx != -1) {
if (idx >= BaseDatabaseMeta.poolingParameters.length) {
idx = BaseDatabaseMeta.poolingParameters.length - 1;
}
if (idx < 0) {
idx = 0;
}
poolingDescription.setValue(BaseDatabaseMeta.poolingParameters[idx].getDescription());
XulTreeRow row = poolParameterTree.getRootChildren().getItem(idx).getRow();
if (row.getSelectedColumnIndex() == 2){
row.addCellText(0, "true"); //$NON-NLS-1$
}
}
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:20,代码来源:DataHandler.java
示例3: restoreDefaults
import org.pentaho.di.core.database.BaseDatabaseMeta; //导入依赖的package包/类
public void restoreDefaults() {
if ( poolParameterTree != null ) {
for ( int i = 0; i < poolParameterTree.getRootChildren().getItemCount(); i++ ) {
XulTreeItem item = poolParameterTree.getRootChildren().getItem( i );
String parameterName = item.getRow().getCell( 1 ).getLabel();
String defaultValue =
DatabaseConnectionPoolParameter
.findParameter( parameterName, BaseDatabaseMeta.poolingParameters ).getDefaultValue();
if ( ( defaultValue == null ) || ( defaultValue.trim().length() <= 0 ) ) {
continue;
}
item.getRow().addCellText( 2, defaultValue );
}
}
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:17,代码来源:DataHandler.java
示例4: poolingRowChange
import org.pentaho.di.core.database.BaseDatabaseMeta; //导入依赖的package包/类
public void poolingRowChange( int idx ) {
if ( idx != -1 ) {
if ( idx >= BaseDatabaseMeta.poolingParameters.length ) {
idx = BaseDatabaseMeta.poolingParameters.length - 1;
}
if ( idx < 0 ) {
idx = 0;
}
poolingDescription.setValue( BaseDatabaseMeta.poolingParameters[idx].getDescription() );
XulTreeRow row = poolParameterTree.getRootChildren().getItem( idx ).getRow();
if ( row.getSelectedColumnIndex() == 2 ) {
row.addCellText( 0, "true" );
}
}
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:20,代码来源:DataHandler.java
示例5: testGetSetData
import org.pentaho.di.core.database.BaseDatabaseMeta; //导入依赖的package包/类
@Test
public void testGetSetData() throws Exception {
Object data = dataHandler.getData();
assertNotNull( data );
assertTrue( data instanceof DatabaseMeta );
DatabaseMeta initialDbMeta = (DatabaseMeta) data;
DatabaseMeta dbMeta = mock( DatabaseMeta.class );
when( dbMeta.getAccessType() ).thenReturn( DatabaseMeta.TYPE_ACCESS_JNDI );
Properties props = new Properties();
props.put( BaseDatabaseMeta.ATTRIBUTE_PREFIX_EXTRA_OPTION + "KettleThin.webappname", "foo" );
when( dbMeta.getAttributes() ).thenReturn( props );
when( accessBox.getSelectedItem() ).thenReturn( "JNDI" );
when( deckOptionsBox.getSelectedIndex() ).thenReturn( -1 );
dataHandler.setData( dbMeta );
assertEquals( dbMeta, dataHandler.getData() );
assertNotSame( initialDbMeta, dataHandler.getData() );
assertFalse( props.containsKey( BaseDatabaseMeta.ATTRIBUTE_PREFIX_EXTRA_OPTION + "KettleThin.webappname" ) );
verify( dbMeta ).setDBName( "foo" );
dataHandler.setData( null );
assertEquals( dbMeta, dataHandler.getData() );
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:25,代码来源:DataHandlerTest.java
示例6: restoreDefaults
import org.pentaho.di.core.database.BaseDatabaseMeta; //导入依赖的package包/类
public void restoreDefaults(){
if (poolParameterTree != null) {
for (int i = 0; i < poolParameterTree.getRootChildren().getItemCount(); i++){
XulTreeItem item = poolParameterTree.getRootChildren().getItem(i);
String parameterName = item.getRow().getCell(1).getLabel();
String defaultValue = DatabaseConnectionPoolParameter.findParameter(parameterName, BaseDatabaseMeta.poolingParameters).getDefaultValue();
if ((defaultValue == null) || (defaultValue.trim().length()<=0)){
continue;
}
item.getRow().addCellText(2, defaultValue);
}
}
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:15,代码来源:DataHandler.java
示例7: setDefaultPoolParameters
import org.pentaho.di.core.database.BaseDatabaseMeta; //导入依赖的package包/类
private void setDefaultPoolParameters() {
if (poolParameterTree != null) {
for (DatabaseConnectionPoolParameter parameter : BaseDatabaseMeta.poolingParameters){
XulTreeRow row = poolParameterTree.getRootChildren().addNewRow();
row.addCellText(0, "false"); //$NON-NLS-1$
row.addCellText(1, parameter.getParameter());
row.addCellText(2, parameter.getDefaultValue());
}
}
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:11,代码来源:DataHandler.java
示例8: getDatabaseInfo
import org.pentaho.di.core.database.BaseDatabaseMeta; //导入依赖的package包/类
public DatabaseMeta getDatabaseInfo() {
if ( wUsername.getText() != null && wUsername.getText().length() > 0 ) {
databaseMeta.setUsername( wUsername.getText() );
}
if ( wPassword.getText() != null && wPassword.getText().length() > 0 ) {
databaseMeta.setPassword( wPassword.getText() );
}
wTest.setEnabled( ( (BaseDatabaseMeta) databaseMeta.getDatabaseInterface() ).canTest() );
return databaseMeta;
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:14,代码来源:CreateDatabaseWizardPage2.java
示例9: setDefaultPoolParameters
import org.pentaho.di.core.database.BaseDatabaseMeta; //导入依赖的package包/类
private void setDefaultPoolParameters() {
if ( poolParameterTree != null ) {
for ( DatabaseConnectionPoolParameter parameter : BaseDatabaseMeta.poolingParameters ) {
XulTreeRow row = poolParameterTree.getRootChildren().addNewRow();
row.addCellText( 0, "false" );
row.addCellText( 1, parameter.getParameter() );
row.addCellText( 2, parameter.getDefaultValue() );
}
}
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:11,代码来源:DataHandler.java
注:本文中的org.pentaho.di.core.database.BaseDatabaseMeta类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论