private void getTransLogTableOptions() { if ( previousLogTableIndex == LOG_INDEX_TRANS ) { // The connection... // transLogTable.setConnectionName( wLogconnection.getText() ); transLogTable.setSchemaName( wLogSchema.getText() ); transLogTable.setTableName( wLogTable.getText() ); transLogTable.setLogInterval( wLogInterval.getText() ); transLogTable.setLogSizeLimit( wLogSizeLimit.getText() ); transLogTable.setTimeoutInDays( wLogTimeout.getText() ); for ( int i = 0; i < transLogTable.getFields().size(); i++ ) { TableItem item = wOptionFields.table.getItem( i ); LogTableField field = transLogTable.getFields().get( i ); field.setEnabled( item.getChecked() ); field.setFieldName( item.getText( 1 ) ); if ( field.isSubjectAllowed() ) { field.setSubject( transMeta.findStep( item.getText( 2 ) ) ); } } } }
public void loadFromRepository( RepositoryAttributeInterface attributeInterface ) throws KettleException { super.loadFromRepository( attributeInterface ); logInterval = attributeInterface.getAttributeString( getLogTableCode() + PROP_LOG_TABLE_INTERVAL ); logSizeLimit = attributeInterface.getAttributeString( getLogTableCode() + PROP_LOG_TABLE_SIZE_LIMIT ); for ( int i = 0; i < getFields().size(); i++ ) { String id = attributeInterface.getAttributeString( getLogTableCode() + PROP_LOG_TABLE_FIELD_ID + i ); // Only read further if the ID is available. // For backward compatibility, this might not be provided yet! // if ( id != null ) { LogTableField field = findField( id ); if ( field.isSubjectAllowed() ) { // BaseLogTable.loadFromRepository sets subject as a String // String stepname = (String) field.getSubject(); if ( !Utils.isEmpty( stepname ) ) { field.setSubject( StepMeta.findStep( steps, stepname ) ); } else { field.setSubject( null ); } } } } }
wlFields.setLayoutData( fdlFields ); final java.util.List<LogTableField> fields = transLogTable.getFields(); final int nrRows = fields.size();