Java Code Examples for org.pentaho.di.core.database.DatabaseMeta#equals()
The following examples show how to use
org.pentaho.di.core.database.DatabaseMeta#equals() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CopyTableWizardPage1.java From pentaho-kettle with Apache License 2.0 | 6 votes |
public boolean canFlipToNextPage() { DatabaseMeta source = getSourceDatabase(); DatabaseMeta target = getTargetDatabase(); if ( source == null && target == null ) { setErrorMessage( BaseMessages.getString( PKG, "CopyTableWizardPage1.SourceAndTargetIsNull.DialogMessage" ) ); return false; } else if ( source == null && target != null ) { setErrorMessage( BaseMessages.getString( PKG, "CopyTableWizardPage1.SourceIsNull.DialogMessage" ) ); return false; } else if ( source != null && target == null ) { setErrorMessage( BaseMessages.getString( PKG, "CopyTableWizardPage1.TargetIsNull.DialogMessage" ) ); return false; } else if ( source != null && target != null && source.equals( target ) ) { setErrorMessage( BaseMessages.getString( PKG, "CopyTableWizardPage1.SourceAndTargetIsSame.DialogMessage" ) ); return false; } else { setErrorMessage( null ); setMessage( BaseMessages.getString( PKG, "CopyTableWizardPage1.GoOnNext.DialogMessage" ) ); return true; } }
Example 2
Source File: RipDatabaseWizardPage1.java From pentaho-kettle with Apache License 2.0 | 6 votes |
public boolean canFlipToNextPage() { DatabaseMeta source = getSourceDatabase(); DatabaseMeta target = getTargetDatabase(); if ( source == null && target == null ) { setErrorMessage( "Select both the source and target database!" ); return false; } else if ( source == null && target != null ) { setErrorMessage( "Select the source database!" ); return false; } else if ( source != null && target == null ) { setErrorMessage( "Select the target database!" ); return false; } else if ( source != null && target != null && source.equals( target ) ) { setErrorMessage( "The source and target database can't be the same!" ); return false; } else { setErrorMessage( null ); setMessage( "Select 'next' to proceed" ); return true; } }
Example 3
Source File: DatabaseMetaLoadSaveValidator.java From pentaho-kettle with Apache License 2.0 | 5 votes |
@Override public boolean validateTestObject( DatabaseMeta testObject, Object actual ) { if ( actual instanceof DatabaseMeta ) { return testObject.equals( actual ); } return false; }