org.pentaho.di.core.util.Utils.normalizeArrays()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(7.4k)|赞(0)|评价(0)|浏览(86)

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

Utils.normalizeArrays介绍

[英]Normalize int array lengths for synchronization of arrays within steps
[中]规范化int数组长度,以便在步骤内同步数组

代码示例

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

/**
 * If we use injection we can have different arrays lengths.
 * We need synchronize them for consistency behavior with UI
 */
@AfterInjection
public void afterInjectionSynchronization() {
 int nrStream = ( keyStream == null ) ? -1 : keyStream.length;
 if ( nrStream > 0 ) {
  String[][] rtn = Utils.normalizeArrays( nrStream, keyLookup );
  keyLookup = rtn[ 0 ];
 }
 int nrFields = ( fieldStream == null ) ? -1 : fieldStream.length;
 if ( nrFields <= 0 ) {
  return;
 }
 String[][] rtnFieldLookup = Utils.normalizeArrays( nrFields, fieldLookup );
 fieldLookup = rtnFieldLookup[ 0 ];
 int[][] rtnFieldUpdate = Utils.normalizeArrays( nrFields, fieldUpdate );
 fieldUpdate = rtnFieldUpdate[ 0 ];
}

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

/**
 * If we use injection we can have different arrays lengths.
 * We need synchronize them for consistency behavior with UI
 */
@AfterInjection
public void afterInjectionSynchronization() {
 int nrFields = ( subjectField == null ) ? -1 : subjectField.length;
 if ( nrFields <= 0 ) {
  return;
 }
 String[][] rtn = Utils.normalizeArrays( nrFields, aggregateField );
 aggregateField = rtn[ 0 ];
 int[][] rtnInt = Utils.normalizeArrays( nrFields, aggregateType, valueField );
 aggregateType = rtnInt[ 0 ];
 valueField = rtnInt[ 1 ];
}

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

/**
 * If we use injection we can have different arrays lengths.
 * We need synchronize them for consistency behavior with UI
 */
@AfterInjection
public void afterInjectionSynchronization() {
 int nrFields = ( fieldTable == null ) ? -1 : fieldTable.length;
 if ( nrFields <= 0 ) {
  return;
 }
 String[][] rtnStrings = Utils.normalizeArrays( nrFields, fieldStream );
 fieldStream = rtnStrings[ 0 ];
 int[][] rtnInts = Utils.normalizeArrays( nrFields, fieldFormatType );
 fieldFormatType = rtnInts[ 0 ];
}

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

/**
 * If we use injection we can have different arrays lengths.
 * We need synchronize them for consistency behavior with UI
 */
@AfterInjection
public void afterInjectionSynchronization() {
 int nrFields = ( feedField == null ) ? -1 : feedField.length;
 if ( nrFields <= 0 ) {
  return;
 }
 String[][] rtnStringArray = Utils.normalizeArrays( nrFields, feedFieldType, outputField, conversionMask );
 feedFieldType = rtnStringArray[ 0 ];
 outputField = rtnStringArray[ 1 ];
 conversionMask = rtnStringArray[ 2 ];
 int[][] rtnIntArray = Utils.normalizeArrays( nrFields, outputType );
 outputType = rtnIntArray[ 0 ];
}

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

/**
  * If we use injection we can have different arrays lengths.
  * We need synchronize them for consistency behavior with UI
  */
 @AfterInjection
 public void afterInjectionSynchronization() {
  int nrFields = ( fieldTable == null ) ? -1 : fieldTable.length;
  if ( nrFields <= 0 ) {
   return;
  }
  String[][] rtnStringArray = Utils.normalizeArrays( nrFields, fieldStream, dateMask );
  fieldStream = rtnStringArray[ 0 ];
  dateMask = rtnStringArray[ 1 ];

  boolean[][] rtnBoolArray = Utils.normalizeArrays( nrFields, matchColumn, updateColumn );
  matchColumn = rtnBoolArray[ 0 ];
  updateColumn = rtnBoolArray[ 1 ];

 }
}

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

/**
 * If we use injection we can have different arrays lengths.
 * We need synchronize them for consistency behavior with UI
 */
@AfterInjection
public void afterInjectionSynchronization() {
 int nrFields = ( keyStream == null ) ? -1 : keyStream.length;
 if ( nrFields <= 0 ) {
  return;
 }
 String[][] rtn = Utils.normalizeArrays( nrFields, keyLookup, keyCondition, keyStream2 );
 keyLookup = rtn[ 0 ];
 keyCondition = rtn[ 1 ];
 keyStream2 = rtn[ 2 ];
 nrFields = updateLookup.length;
 rtn = Utils.normalizeArrays( nrFields, updateStream );
 updateStream = rtn[ 0 ];
}

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

/**
  * If we use injection we can have different arrays lengths.
  * We need synchronize them for consistency behavior with UI
  */
 @AfterInjection
 public void afterInjectionSynchronization() {
  int nrFields = ( subjectField == null ? -1 : subjectField.length );
  if ( nrFields <= 0 ) {
   return;
  }
  String[][] normalizedStringArrays = Utils.normalizeArrays( nrFields, aggregateField, valueField );
  aggregateField = normalizedStringArrays[ 0 ];
  valueField = normalizedStringArrays[ 1 ];

  int[][] normalizedIntArrays = Utils.normalizeArrays( nrFields, aggregateType );
  aggregateType = normalizedIntArrays[ 0 ];
 }
}

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

/**
 * If we use injection we can have different arrays lengths.
 * We need synchronize them for consistency behavior with UI
 */
@AfterInjection
public void afterInjectionSynchronization() {
 int nrFields = ( fieldName == null ) ? -1 : fieldName.length;
 if ( nrFields <= 0 ) {
  return;
 }
 boolean[][] rtnBooleanArrays = Utils.normalizeArrays( nrFields, ascending, caseSensitive, collatorEnabled, preSortedField );
 ascending = rtnBooleanArrays[ 0 ];
 caseSensitive = rtnBooleanArrays[ 1 ];
 collatorEnabled = rtnBooleanArrays[ 2 ];
 preSortedField = rtnBooleanArrays[ 3 ];
 int[][] rtnIntArrays = Utils.normalizeArrays( nrFields, collatorStrength );
 collatorStrength = rtnIntArrays[ 0 ];
}

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

String[][] normalizedStringArrays = Utils.normalizeArrays( nrFields, fieldID, fieldFormat, fieldGroup, fieldDecimal, fieldCurrency, fieldNullIf, fieldIfNull );
fieldID = normalizedStringArrays[ 0 ];
fieldFormat = normalizedStringArrays[ 1 ];
fieldIfNull = normalizedStringArrays[ 6 ];
boolean[][] normalizedBooleanArrays = Utils.normalizeArrays( nrFields, fieldRemoveID );
fieldRemoveID = normalizedBooleanArrays[ 0 ];
int[][] normalizedIntArrays = Utils.normalizeArrays( nrFields, fieldType, fieldLength, fieldPrecision, fieldTrimType );
fieldType = normalizedIntArrays[ 0 ];
fieldLength = normalizedIntArrays[ 1 ];

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

/**
 * If we use injection we can have different arrays lengths.
 * We need synchronize them for consistency behavior with UI
 */
@AfterInjection
public void afterInjectionSynchronization() {
 int nrFields = ( sourceValue == null ) ? -1 : sourceValue.length;
 if ( nrFields <= 0 ) {
  return;
 }
 String[][] rtn = Utils.normalizeArrays( nrFields, targetValue );
 targetValue = rtn[ 0 ];
}

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

/**
 * If we use injection we can have different arrays lengths.
 * We need synchronize them for consistency behavior with UI
 */
@AfterInjection
public void afterInjectionSynchronization() {
 int nrFields = ( fieldName == null ) ? -1 : fieldName.length;
 if ( nrFields <= 0 ) {
  return;
 }
 boolean[][] rtn = Utils.normalizeArrays( nrFields, ascending );
 ascending = rtn[ 0 ];
}

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

/**
  * If we use injection we can have different arrays lengths. We need synchronize them for consistency behavior with
  * UI
  */
 @AfterInjection
 public void afterInjectionSynchronization() {
  int nrFields = ( keyField == null ) ? -1 : keyField.length;
  if ( nrFields <= 0 ) {
   return;
  }
  String[][] rtn = Utils.normalizeArrays( nrFields, keyLookup );
  keyLookup = rtn[ 0 ];
 }
}

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

/**
 * If we use injection we can have different arrays lengths.
 * We need synchronize them for consistency behavior with UI
 */
@AfterInjection
public void afterInjectionSynchronization() {
 int nrFields = ( fieldInStream == null ) ? -1 : fieldInStream.length;
 if ( nrFields <= 0 ) {
  return;
 }
 String[][] rtnStringArrays = Utils.normalizeArrays( nrFields, fieldOutStream, replaceString, replaceByString, replaceFieldByString );
 fieldOutStream = rtnStringArrays[ 0 ];
 replaceString = rtnStringArrays[ 1 ];
 replaceByString = rtnStringArrays[ 2 ];
 replaceFieldByString = rtnStringArrays[ 3 ];
 nullToEmpty( fieldOutStream );
 nullToEmpty( replaceString );
 nullToEmpty( replaceByString );
 nullToEmpty( replaceFieldByString );
 int[][] rtnIntArrays = Utils.normalizeArrays( nrFields, useRegEx, wholeWord, caseSensitive, isUnicode );
 useRegEx = rtnIntArrays[ 0 ];
 wholeWord = rtnIntArrays[ 1 ];
 caseSensitive = rtnIntArrays[ 2 ];
 isUnicode = rtnIntArrays[ 3 ];
 boolean[][] rtnBooleanArrays = Utils.normalizeArrays( nrFields, setEmptyString );
 setEmptyString = rtnBooleanArrays[ 0 ];
}

相关文章

微信公众号

最新文章

更多