/** * {@inheritDoc} * * @see org.pentaho.di.trans.step.StepMetaInterface#readRep(org.pentaho.di.repository.Repository, long, * java.util.List, java.util.Map) */ public void readRep( final Repository repo, final IMetaStore metaStore, final ObjectId stepId, final List<DatabaseMeta> databaseList ) throws KettleException { PluginPropertyHandler.walk( this.getProperties(), new ReadFromRepository( repo, metaStore, stepId ) ); initDbMeta( databaseList ); }
/** * {@inheritDoc} * * @see org.pentaho.di.trans.step.StepMetaInterface#saveRep(org.pentaho.di.repository.Repository, long, long) */ public void saveRep( final Repository repo, final IMetaStore metaStore, final ObjectId transformationId, final ObjectId stepId ) throws KettleException { final SaveToRepository handler = new SaveToRepository( repo, metaStore, transformationId, stepId ); PluginPropertyHandler.walk( this.getProperties(), handler ); }
/** * {@inheritDoc} * * @see org.pentaho.di.trans.step.StepMetaInterface#loadXML(org.w3c.dom.Node, java.util.List, java.util.Map) */ public void loadXML( final Node node, final List<DatabaseMeta> databaseMeta, final IMetaStore metaStore ) throws KettleXMLException { this.getProperties().walk( new LoadXml( node ) ); initDbMeta( databaseMeta ); }
/** * {@inheritDoc} * * @see org.pentaho.di.trans.step.StepMetaInterface#setDefault() */ public void setDefault() { this.fastloadPath.setValue( DEFAULT_FASTLOAD_PATH ); this.dataFile.setValue( DEFAULT_DATA_FILE ); this.sessions.setValue( DEFAULT_SESSIONS ); this.errorLimit.setValue( DEFAULT_ERROR_LIMIT ); this.truncateTable.setValue( DEFAULT_TRUNCATETABLE ); this.variableSubstitution.setValue( DEFAULT_VARIABLE_SUBSTITUTION ); this.targetTable.setValue( DEFAULT_TARGET_TABLE ); this.useControlFile.setValue( true ); }
/** * @param properties * properties * @return XML String * @throws IllegalArgumentException * if properties is null */ public static String toXml( final KeyValueSet properties ) throws IllegalArgumentException { assertProperties( properties ); final AppendXml handler = new AppendXml(); properties.walk( handler ); return handler.getXml(); }
/** * @param filter * filter to use. * @return matching key values. * @throws IllegalArgumentException * if filter is null. */ public List<KeyValue<?>> get( final Predicate filter ) throws IllegalArgumentException { final AddClosureArrayList<KeyValue<?>> result = new AddClosureArrayList<KeyValue<?>>(); this.walk( result, filter ); return result; }
/** * @param key * key to set. * @return new string property. * @throws IllegalArgumentException * if key is invalid. */ public StringPluginProperty createString( final String key ) throws IllegalArgumentException { final StringPluginProperty property = new StringPluginProperty( key ); this.properties.add( property ); return property; }
/** * @param key * key to set. * @return new integer property. * @throws IllegalArgumentException * if key is invalid. */ public IntegerPluginProperty createInteger( final String key ) throws IllegalArgumentException { final IntegerPluginProperty property = new IntegerPluginProperty( key ); this.properties.add( property ); return property; }
/** * {@inheritDoc} * * @see org.pentaho.di.trans.step.BaseStepMeta#getXML() */ @Override public String getXML() throws KettleException { return PluginPropertyHandler.toXml( this.getProperties() ); }
/** * @param key * key to set. * @return new boolean property. * @throws IllegalArgumentException * if key is invalid. */ public BooleanPluginProperty createBoolean( final String key ) throws IllegalArgumentException { final BooleanPluginProperty property = new BooleanPluginProperty( key ); this.properties.add( property ); return property; }
/** * @param key * key. * @return new string list. * @throws IllegalArgumentException * if key is invalid. */ public StringListPluginProperty createStringList( final String key ) throws IllegalArgumentException { final StringListPluginProperty property = new StringListPluginProperty( key ); this.properties.add( property ); return property; } }
/** * @param dateString - string for check * @return true if we can parse string without exception */ public static boolean isValidDate( String dateString ) { try { getDateFromString( dateString ); return true; } catch ( ParseException e ) { return false; } }
/** * Giving back a date/time string in the format following the rule from the most to the least significant * * @param date * the date to convert * @return a string in the form yyyddMM_hhmmss */ public static String getFormattedDateTime( Date date ) { return getFormattedDateTime( date, false ); }
/** * @param key * key to set. * @return new key value initialized with default value. * @throws IllegalArgumentException * if key is blank. */ public KeyValue<T> create( final String key ) throws IllegalArgumentException { return new KeyValue<T>( key, this.defaultValue ); }
/** * {@inheritDoc} * * @see org.pentaho.di.trans.step.BaseStepMeta#clone() */ @Override public Object clone() { return super.clone(); }
/** * Log exception. * * @param exception * exception to log. */ public void logUnexpectedError( final Throwable exception ) { this.logError( UNEXPECTED_ERROR, exception ); }
public String getDescription() { String description = "Mod partitioner"; if ( !Utils.isEmpty( fieldName ) ) { description += "(" + fieldName + ")"; } return description; }
public TextOneFileSelector( String sourcefolderin, String sourcefilenamein, String destfolderin ) { if ( !Utils.isEmpty( sourcefilenamein ) ) { filename = sourcefilenamein; } if ( !Utils.isEmpty( sourcefolderin ) ) { foldername = sourcefolderin; } if ( !Utils.isEmpty( destfolderin ) ) { destfolder = destfolderin; } }