/** * {@inheritDoc} * * @see at.aschauer.commons.pentaho.plugin.PluginProperty#evaluate() */ public boolean evaluate() { return Boolean.TRUE.equals( this.getValue() ); }
/** * {@inheritDoc} * * @see at.aschauer.commons.pentaho.plugin.PluginProperty#saveToPreferences(java.util.prefs.Preferences) */ public void saveToPreferences( final Preferences node ) { node.putBoolean( this.getKey(), this.getValue() ); }
/** * {@inheritDoc} * * @see at.aschauer.commons.pentaho.plugin.PluginProperty#readFromPreferences(java.util.prefs.Preferences) */ public void readFromPreferences( final Preferences node ) { this.setValue( node.getBoolean( this.getKey(), this.getValue() ) ); }
/** * {@inheritDoc} * * @see at.aschauer.commons.pentaho.plugin.PluginProperty#appendXml(java.lang.StringBuilder) */ public void appendXml( final StringBuilder builder ) { builder.append( XMLHandler.addTagValue( this.getKey(), this.getValue() ) ); }
/** * {@inheritDoc} * * @see at.aschauer.commons.pentaho.plugin.PluginProperty#saveToRepositoryStep() */ public void saveToRepositoryStep( final Repository repository, final IMetaStore metaStore, final ObjectId transformationId, final ObjectId stepId ) throws KettleException { repository.saveStepAttribute( transformationId, stepId, this.getKey(), this.getValue() ); }
/** * Execute fastload. * * @throws KettleException * ... */ public void execute() throws KettleException { if ( this.meta.getTruncateTable().getValue() ) { Database db = new Database( this, this.meta.getDbMeta() ); db.connect(); db.truncateTable( this.meta.getTargetTable().getValue() ); db.commit(); db.disconnect(); } startFastLoad(); if ( this.meta.getUseControlFile().getValue() ) { this.invokeLoadingControlFile(); } else { this.invokeLoadingCommand(); } }
setTextIfPropertyValue( this.meta.getSessions(), this.wSessions ); setTextIfPropertyValue( this.meta.getConnectionName(), this.wConnection ); this.wbTruncateTable.setSelection( this.meta.getTruncateTable().getValue() ); this.wUseControlFile.setSelection( this.meta.getUseControlFile().getValue() ); this.wVariableSubstitution.setSelection( this.meta.getVariableSubstitution().getValue() );
/** * {@inheritDoc} * * @see org.pentaho.di.trans.step.BaseStepMeta#getRequiredFields(org.pentaho.di.core.variables.VariableSpace) */ @Override public RowMetaInterface getRequiredFields( final VariableSpace space ) throws KettleException { if ( !this.useControlFile.getValue() ) { final Database database = connectToDatabase(); database.shareVariablesWith( space ); RowMetaInterface fields = database.getTableFieldsMeta( StringUtils.EMPTY, space.environmentSubstitute( this.targetTable.getValue() ) ); database.disconnect(); if ( fields == null ) { throw new KettleException( MESSAGES.getString( "TeraFastMeta.Exception.TableNotFound" ) ); } return fields; } return null; }