org.pentaho.di.repository.Repository.getStepAttributeInteger()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(15.5k)|赞(0)|评价(0)|浏览(127)

本文整理了Java中org.pentaho.di.repository.Repository.getStepAttributeInteger方法的一些代码示例,展示了Repository.getStepAttributeInteger的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Repository.getStepAttributeInteger方法的具体详情如下:
包路径:org.pentaho.di.repository.Repository
类名称:Repository
方法名:getStepAttributeInteger

Repository.getStepAttributeInteger介绍

暂无

代码示例

代码示例来源:origin: pentaho/pentaho-kettle

@Override
public long getStepAttributeInteger( ObjectId objectId, String s ) throws KettleException {
 return getDelegate().getStepAttributeInteger( objectId, s );
}

代码示例来源:origin: pentaho/pentaho-kettle

@Override
public long getStepAttributeInteger( ObjectId objectId, int i, String s ) throws KettleException {
 return getDelegate().getStepAttributeInteger( objectId, i, s );
}

代码示例来源:origin: pentaho/pentaho-kettle

/**
 * {@inheritDoc}
 *
 * @see at.aschauer.commons.pentaho.plugin.PluginProperty#readFromRepositoryStep(org.pentaho.di.repository.Repository,
 *      long)
 */
public void readFromRepositoryStep( final Repository repository, final IMetaStore metaStore,
 final ObjectId stepId ) throws KettleException {
 final Long longValue = repository.getStepAttributeInteger( stepId, this.getKey() );
 this.setValue( longValue.intValue() );
}

代码示例来源:origin: pentaho/pentaho-kettle

public FormulaMetaFunction( Repository rep, ObjectId id_step, int nr ) throws KettleException {
 fieldName = rep.getStepAttributeString( id_step, nr, "field_name" );
 formula = rep.getStepAttributeString( id_step, nr, "formula_string" );
 valueType = ValueMetaFactory.getIdForValueMeta( rep.getStepAttributeString( id_step, nr, "value_type" ) );
 valueLength = (int) rep.getStepAttributeInteger( id_step, nr, "value_length" );
 valuePrecision = (int) rep.getStepAttributeInteger( id_step, nr, "value_precision" );
 replaceField = rep.getStepAttributeString( id_step, nr, "replace_field" );
}

代码示例来源:origin: pentaho/pentaho-kettle

public JaninoMetaFunction( Repository rep, ObjectId id_step, int nr ) throws KettleException {
 fieldName = rep.getStepAttributeString( id_step, nr, "field_name" );
 formula = rep.getStepAttributeString( id_step, nr, "formula_string" );
 valueType = ValueMetaFactory.getIdForValueMeta( rep.getStepAttributeString( id_step, nr, "value_type" ) );
 valueLength = (int) rep.getStepAttributeInteger( id_step, nr, "value_length" );
 valuePrecision = (int) rep.getStepAttributeInteger( id_step, nr, "value_precision" );
 replaceField = rep.getStepAttributeString( id_step, nr, "replace_field" );
}

代码示例来源:origin: pentaho/pentaho-kettle

@Override
public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases )
 throws KettleException {
 super.readRep( rep, metaStore, id_step, databases );
 targetFieldName = rep.getStepAttributeString( id_step, ConcatFieldsNodeNameSpace + "targetFieldName" );
 targetFieldLength =
  (int) rep.getStepAttributeInteger( id_step, ConcatFieldsNodeNameSpace + "targetFieldLength" );
 removeSelectedFields =
  rep.getStepAttributeBoolean( id_step, ConcatFieldsNodeNameSpace + "removeSelectedFields" );
}

代码示例来源:origin: pentaho/pentaho-kettle

public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {
 try {
  int nrfields = rep.countNrStepAttributes( id_step, "field_name" );
  allocate( nrfields );
  for ( int i = 0; i < nrfields; i++ ) {
   fieldname[i] = rep.getStepAttributeString( id_step, i, "field_name" );
   type[i] = ValueMetaFactory.getIdForValueMeta( rep.getStepAttributeString( id_step, i, "field_type" ) );
   length[i] = (int) rep.getStepAttributeInteger( id_step, i, "field_length" );
   precision[i] = (int) rep.getStepAttributeInteger( id_step, i, "field_precision" );
  }
 } catch ( Exception e ) {
  throw new KettleException( BaseMessages.getString(
   PKG, "InjectorMeta.Exception.ErrorReadingStepInfoFromRepository" ), e );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {
 try {
  int nrfields = rep.countNrStepAttributes( id_step, "field_name" );
  allocate( nrfields );
  for ( int i = 0; i < nrfields; i++ ) {
   fieldname[i] = rep.getStepAttributeString( id_step, i, "field_name" );
   type[i] = ValueMetaFactory.getIdForValueMeta( rep.getStepAttributeString( id_step, i, "field_type" ) );
   length[i] = (int) rep.getStepAttributeInteger( id_step, i, "field_length" );
   precision[i] = (int) rep.getStepAttributeInteger( id_step, i, "field_precision" );
  }
 } catch ( Exception e ) {
  throw new KettleException( BaseMessages.getString(
   PKG, "RowsFromResultMeta.Exception.ErrorReadingStepInfoFromRepository" ), e );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

@Override public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {
 try {
  filename = rep.getStepAttributeString( id_step, "file_name" );
  try {
   rowLimit = rep.getStepAttributeString( id_step, "limit" );
  } catch ( KettleException readOldAttributeType ) {
   // PDI-12897
   rowLimit = String.valueOf( rep.getStepAttributeInteger( id_step, "limit" ) );
  }
  addfilenameresult = rep.getStepAttributeBoolean( id_step, "addfilenameresult" );
 } catch ( Exception e ) {
  throw new KettleException( BaseMessages.getString(
   PKG, "CubeInputMeta.Exception.UnexpectedErrorWhileReadingStepInfo" ), e );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

public SasInputField( Repository rep, ObjectId stepId, int fieldNr ) throws KettleException {
 name = rep.getStepAttributeString( stepId, fieldNr, "field_name" );
 rename = rep.getStepAttributeString( stepId, fieldNr, "field_rename" );
 type = ValueMetaFactory.getIdForValueMeta( rep.getStepAttributeString( stepId, fieldNr, "field_type" ) );
 length = (int) rep.getStepAttributeInteger( stepId, fieldNr, "field_length" );
 precision = (int) rep.getStepAttributeInteger( stepId, fieldNr, "field_precision" );
 conversionMask = rep.getStepAttributeString( stepId, fieldNr, "field_conversion_mask" );
 decimalSymbol = rep.getStepAttributeString( stepId, fieldNr, "field_decimal" );
 groupingSymbol = rep.getStepAttributeString( stepId, fieldNr, "field_grouping" );
 trimType = ValueMetaString.getTrimTypeByCode( rep.getStepAttributeString( stepId, fieldNr, "field_trim_type" ) );
}

代码示例来源:origin: pentaho/pentaho-kettle

public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases )
 throws KettleException {
 try {
  int nrfields = rep.countNrStepAttributes( id_step, "field_name" );
  allocate( nrfields );
  for ( int i = 0; i < nrfields; i++ ) {
   fieldName[ i ] = rep.getStepAttributeString( id_step, i, "field_name" );
   fieldType[ i ] = ValueMetaFactory.getIdForValueMeta( rep.getStepAttributeString( id_step, i, "field_type" ) );
   fieldLength[ i ] = (int) rep.getStepAttributeInteger( id_step, i, "field_length" );
   fieldPrecision[ i ] = (int) rep.getStepAttributeInteger( id_step, i, "field_precision" );
  }
  selectingAndSortingUnspecifiedFields = rep.getStepAttributeBoolean( id_step, "select_unspecified" );
 } catch ( Exception e ) {
  throw new KettleException( BaseMessages.getString(
   PKG, "MappingInputMeta.Exception.UnexpectedErrorInReadingStepInfo" ), e );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases )
 throws KettleException {
 try {
  passAllRows = rep.getStepAttributeBoolean( id_step, "pass_all_rows" );
  directory = rep.getStepAttributeString( id_step, "directory" );
  prefix = rep.getStepAttributeString( id_step, "prefix" );
  cacheSize = (int) rep.getStepAttributeInteger( id_step, "cache_size" );
  compressFiles = rep.getStepAttributeBoolean( id_step, "compress" );
  if ( cacheSize == 0 ) {
   cacheSize = CACHE_SIZE;
  }
 } catch ( Exception e ) {
  throw new KettleException( "Unexpected error reading step information from the repository", e );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

public MappingIODefinition( Repository rep, ObjectId id_step, String prefix, int nr ) throws KettleException {
 this();
 inputStepname = rep.getStepAttributeString( id_step, nr, prefix + "input_step" );
 outputStepname = rep.getStepAttributeString( id_step, nr, prefix + "output_step" );
 mainDataPath = rep.getStepAttributeBoolean( id_step, nr, prefix + "main_path" );
 renamingOnOutput = rep.getStepAttributeBoolean( id_step, nr, prefix + "rename_on_output" );
 description = rep.getStepAttributeString( id_step, nr, prefix + "description" );
 int nrRenames = (int) rep.getStepAttributeInteger( id_step, nr, prefix + "nr_renames" );
 for ( int i = 0; i < nrRenames; i++ ) {
  String parent = rep.getStepAttributeString( id_step, nr, prefix + "rename_parent_" + i );
  String child = rep.getStepAttributeString( id_step, nr, prefix + "rename_child_" + i );
  valueRenames.add( new MappingValueRename( parent, child ) );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

public void readRep( Repository rep, IMetaStore metaStore, ObjectId idStep, List<DatabaseMeta> databases )
 throws KettleException {
 try {
  this.databaseMeta = rep.loadDatabaseMetaFromStepAttribute( idStep, "connection", databases );
  this.dimension = rep.getStepAttributeString( idStep, "dimension" );
  this.baseElementsOnly = rep.getStepAttributeBoolean( idStep, "baseElementsOnly" );
  int nrLevels = rep.countNrStepAttributes( idStep, "levelname" );
  for ( int i = 0; i < nrLevels; i++ ) {
   String levelName = rep.getStepAttributeString( idStep, i, "levelname" );
   int levelNumber = (int) rep.getStepAttributeInteger( idStep, i, "levelnumber" );
   String fieldName = rep.getStepAttributeString( idStep, i, "fieldname" );
   String fieldType = rep.getStepAttributeString( idStep, i, "fieldtype" );
   this.levels.add( new PaloDimensionLevel( levelName, levelNumber, fieldName, fieldType ) );
  }
 } catch ( Exception e ) {
  throw new KettleException( "Unexpected error reading step information from the repository", e );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

@Override
public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {
 try {
  directory = rep.getStepAttributeString( id_step, "directory" );
  prefix = rep.getStepAttributeString( id_step, "prefix" );
  cacheSize = (int) rep.getStepAttributeInteger( id_step, "cache_size" );
  mainStepname = rep.getStepAttributeString( id_step, "main" );
  condition = rep.loadConditionFromStepAttribute( id_step, "id_condition" );
  if ( condition == null ) {
   condition = new Condition();
  }
 } catch ( Exception e ) {
  throw new KettleException( BaseMessages.getString(
   PKG, "JoinRowsMeta.Exception.UnexpectedErrorInReadStepInfoFromRepository" ), e );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {
 try {
  databaseMeta = rep.loadDatabaseMetaFromStepAttribute( id_step, "id_connection", databases );
  rowLimit = (int) rep.getStepAttributeInteger( id_step, "rowlimit" );
  sql = rep.getStepAttributeString( id_step, "sql" );
  outerJoin = rep.getStepAttributeBoolean( id_step, "outer_join" );
  replacevars = rep.getStepAttributeBoolean( id_step, "replace_vars" );
  sqlfieldname = rep.getStepAttributeString( id_step, "sql_fieldname" );
  queryonlyonchange = rep.getStepAttributeBoolean( id_step, "query_only_on_change" );
 } catch ( Exception e ) {
  throw new KettleException( BaseMessages.getString(
   PKG, "DynamicSQLRowMeta.Exception.UnexpectedErrorReadingStepInfo" ), e );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {
 try {
  int nrfiles = rep.countNrStepAttributes( id_step, "file_name" );
  dynamicFoldernameField = rep.getStepAttributeString( id_step, "foldername_field" );
  includeRowNumber = rep.getStepAttributeBoolean( id_step, "rownum" );
  isFoldernameDynamic = rep.getStepAttributeBoolean( id_step, "foldername_dynamic" );
  rowNumberField = rep.getStepAttributeString( id_step, "rownum_field" );
  rowLimit = rep.getStepAttributeInteger( id_step, "limit" );
  allocate( nrfiles );
  for ( int i = 0; i < nrfiles; i++ ) {
   folderName[i] = rep.getStepAttributeString( id_step, i, "file_name" );
   folderRequired[i] = rep.getStepAttributeString( id_step, i, "file_required" );
  }
 } catch ( Exception e ) {
  throw new KettleException( "Unexpected error reading step information from the repository", e );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {
 try {
  filename = rep.getStepAttributeString( id_step, "filename" );
  tablename = rep.getStepAttributeString( id_step, "table" );
  tableTruncated = rep.getStepAttributeBoolean( id_step, "truncate" );
  fileCreated = rep.getStepAttributeBoolean( id_step, "create_file" );
  tableCreated = rep.getStepAttributeBoolean( id_step, "create_table" );
  commitSize = (int) rep.getStepAttributeInteger( id_step, "commit_size" );
  String addToResultFiles = rep.getStepAttributeString( id_step, "add_to_result_filenames" );
  if ( Utils.isEmpty( addToResultFiles ) ) {
   addToResultFilenames = true;
  } else {
   addToResultFilenames = rep.getStepAttributeBoolean( id_step, "add_to_result_filenames" );
  }
  doNotOpeNnewFileInit = rep.getStepAttributeBoolean( id_step, "do_not_open_newfile_init" );
 } catch ( Exception e ) {
  throw new KettleException( "Unexpected error reading step information from the repository", e );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, int fieldNr ) throws KettleException {
 setName( rep.getStepAttributeString( id_step, fieldNr, "field_name" ) );
 setField( rep.getStepAttributeString( id_step, fieldNr, "field_attribut" ) );
 setIdLookup( rep.getStepAttributeBoolean( id_step, fieldNr, "field_idlookup" ) );
 setType( ValueMetaFactory.getIdForValueMeta( rep.getStepAttributeString( id_step, fieldNr, "field_type" ) ) );
 setFormat( rep.getStepAttributeString( id_step, fieldNr, "field_format" ) );
 setCurrencySymbol( rep.getStepAttributeString( id_step, fieldNr, "field_currency" ) );
 setDecimalSymbol( rep.getStepAttributeString( id_step, fieldNr, "field_decimal" ) );
 setGroupSymbol( rep.getStepAttributeString( id_step, fieldNr, "field_group" ) );
 setLength( (int) rep.getStepAttributeInteger( id_step, fieldNr, "field_length" ) );
 setPrecision( (int) rep.getStepAttributeInteger( id_step, fieldNr, "field_precision" ) );
 setTrimType( SalesforceInputField.getTrimTypeByCode( rep.getStepAttributeString(
  id_step, fieldNr, "field_trim_type" ) ) );
 setRepeated( rep.getStepAttributeBoolean( id_step, fieldNr, "field_repeat" ) );
}

代码示例来源:origin: pentaho/pentaho-kettle

@Override
public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {
 try {
  dbfFileName = rep.getStepAttributeString( id_step, "file_dbf" );
  rowLimit = (int) rep.getStepAttributeInteger( id_step, "limit" );
  rowNrAdded = rep.getStepAttributeBoolean( id_step, "add_rownr" );
  rowNrField = rep.getStepAttributeString( id_step, "field_rownr" );
  includeFilename = rep.getStepAttributeBoolean( id_step, "include" );
  filenameField = rep.getStepAttributeString( id_step, "include_field" );
  charactersetName = rep.getStepAttributeString( id_step, "charset_name" );
  acceptingFilenames = rep.getStepAttributeBoolean( id_step, "accept_filenames" );
  acceptingField = rep.getStepAttributeString( id_step, "accept_field" );
  acceptingStepName = rep.getStepAttributeString( id_step, "accept_stepname" );
 } catch ( Exception e ) {
  throw new KettleException( BaseMessages.getString(
   PKG, "XBaseInputMeta.Exception.UnexpectedErrorReadingMetaDataFromRepository" ), e );
 }
}

相关文章

Repository类方法