• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java ValueMetaBoolean类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中org.pentaho.di.core.row.value.ValueMetaBoolean的典型用法代码示例。如果您正苦于以下问题:Java ValueMetaBoolean类的具体用法?Java ValueMetaBoolean怎么用?Java ValueMetaBoolean使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

ValueMetaBoolean类属于org.pentaho.di.core.row.value包,在下文中一共展示了ValueMetaBoolean类的36个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getValueMetaInterface

点赞 3

import org.pentaho.di.core.row.value.ValueMetaBoolean; //导入依赖的package包/类
private ValueMetaInterface getValueMetaInterface( String fieldName, int fieldType ) {
  switch ( fieldType ) {
    case ValueMetaInterface.TYPE_INET:
      return new ValueMetaInternetAddress( fieldName );
    case ValueMetaInterface.TYPE_STRING:
      return new ValueMetaString( fieldName );
    case ValueMetaInterface.TYPE_INTEGER:
      return new ValueMetaInteger( fieldName );
    case ValueMetaInterface.TYPE_NUMBER:
      return new ValueMetaNumber( fieldName );
    case ValueMetaInterface.TYPE_BIGNUMBER:
      return new ValueMetaBigNumber( fieldName );
    case ValueMetaInterface.TYPE_TIMESTAMP:
      return new ValueMetaTimestamp( fieldName );
    case ValueMetaInterface.TYPE_DATE:
      return new ValueMetaDate( fieldName );
    case ValueMetaInterface.TYPE_BOOLEAN:
      return new ValueMetaBoolean( fieldName );
    case ValueMetaInterface.TYPE_BINARY:
      return new ValueMetaBinary( fieldName );
  }
  return null;
}
 

开发者ID:pentaho,
项目名称:pentaho-hadoop-shims,
代码行数:24,
代码来源:PentahoOrcRecordWriter.java

示例2: createRowMetaInterface

点赞 3

import org.pentaho.di.core.row.value.ValueMetaBoolean; //导入依赖的package包/类
public RowMetaInterface createRowMetaInterface() {
  RowMetaInterface rm = new RowMeta();

  ValueMetaInterface[] valuesMeta =
  {
    new ValueMetaString( "string" ),
    new ValueMetaInteger( "integer" ),
    new ValueMetaNumber( "number" ),
    new ValueMetaBigNumber( "bigdecimal" ),
    new ValueMetaDate( "date" ),
    new ValueMetaBinary( "binary" ),
    new ValueMetaBoolean( "bool" ),
    new ValueMetaTimestamp( "timestamp" ),
    new ValueMetaInternetAddress( "inetaddress" ), };

  for ( int i = 0; i < valuesMeta.length; i++ ) {
    rm.addValueMeta( valuesMeta[i] );
  }

  return rm;
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:22,
代码来源:JaninoStepIT.java

示例3: createResultRowMetaInterface

点赞 3

import org.pentaho.di.core.row.value.ValueMetaBoolean; //导入依赖的package包/类
public RowMetaInterface createResultRowMetaInterface() {
  RowMetaInterface rm = new RowMeta();

  ValueMetaInterface[] valuesMeta =
  {
    new ValueMetaString( "field1" ), new ValueMetaInteger( "field2" ),
    new ValueMetaNumber( "field3" ), new ValueMetaBoolean( "field5" ),
    new ValueMetaBigNumber( "field6" ),
    new ValueMetaBoolean( "result" ), };

  for ( int i = 0; i < valuesMeta.length; i++ ) {
    rm.addValueMeta( valuesMeta[i] );
  }

  return rm;
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:17,
代码来源:DetectLastRowStepIT.java

示例4: createRowMetaInterface

点赞 3

import org.pentaho.di.core.row.value.ValueMetaBoolean; //导入依赖的package包/类
public RowMetaInterface createRowMetaInterface() {
  RowMetaInterface rm = new RowMeta();

  ValueMetaInterface[] valuesMeta =
  {
    new ValueMetaString( "field1" ), new ValueMetaInteger( "field2" ),
    new ValueMetaNumber( "field3" ), new ValueMetaDate( "field4" ),
    new ValueMetaBoolean( "field5" ),
    new ValueMetaBigNumber( "field6" ),
    new ValueMetaBigNumber( "field7" ) };

  for ( int i = 0; i < valuesMeta.length; i++ ) {
    rm.addValueMeta( valuesMeta[i] );
  }

  return rm;
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:18,
代码来源:BlockingStepIT.java

示例5: createRowMetaInterface

点赞 3

import org.pentaho.di.core.row.value.ValueMetaBoolean; //导入依赖的package包/类
public RowMetaInterface createRowMetaInterface() {
  RowMetaInterface rm = new RowMeta();

  ValueMetaInterface[] valuesMeta =
  {
    new ValueMetaString( "field1" ), new ValueMetaInteger( "field2" ),
    new ValueMetaNumber( "field3" ), new ValueMetaDate( "field4" ),
    new ValueMetaBoolean( "field5" ),
    new ValueMetaBigNumber( "field6" ),
    new ValueMetaBigNumber( "field7" ), };

  for ( int i = 0; i < valuesMeta.length; i++ ) {
    rm.addValueMeta( valuesMeta[i] );
  }

  return rm;
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:18,
代码来源:TransSingleThreadIT.java

示例6: insertJobEntryCopy

点赞 3

import org.pentaho.di.core.row.value.ValueMetaBoolean; //导入依赖的package包/类
public synchronized ObjectId insertJobEntryCopy( ObjectId id_job, ObjectId id_jobentry,
  ObjectId id_jobentry_type, int nr, long gui_location_x, long gui_location_y, boolean gui_draw,
  boolean parallel ) throws KettleException {
  ObjectId id = repository.connectionDelegate.getNextJobEntryCopyID();

  RowMetaAndData table = new RowMetaAndData();

  //CHECKSTYLE:LineLength:OFF
  table.addValue( new ValueMetaInteger( KettleDatabaseRepository.FIELD_JOBENTRY_COPY_ID_JOBENTRY_COPY ), id );
  table.addValue( new ValueMetaInteger( KettleDatabaseRepository.FIELD_JOBENTRY_COPY_ID_JOBENTRY ), id_jobentry );
  table.addValue( new ValueMetaInteger( KettleDatabaseRepository.FIELD_JOBENTRY_COPY_ID_JOB ), id_job );
  table.addValue( new ValueMetaInteger( KettleDatabaseRepository.FIELD_JOBENTRY_COPY_ID_JOBENTRY_TYPE ), id_jobentry_type );
  table.addValue( new ValueMetaInteger( KettleDatabaseRepository.FIELD_JOBENTRY_COPY_NR ), new Long( nr ) );
  table.addValue( new ValueMetaInteger( KettleDatabaseRepository.FIELD_JOBENTRY_COPY_GUI_LOCATION_X ), new Long( gui_location_x ) );
  table.addValue( new ValueMetaInteger( KettleDatabaseRepository.FIELD_JOBENTRY_COPY_GUI_LOCATION_Y ), new Long( gui_location_y ) );
  table.addValue( new ValueMetaBoolean( KettleDatabaseRepository.FIELD_JOBENTRY_COPY_GUI_DRAW ), Boolean.valueOf( gui_draw ) );
  table.addValue( new ValueMetaBoolean( KettleDatabaseRepository.FIELD_JOBENTRY_COPY_PARALLEL ), Boolean.valueOf( parallel ) );

  repository.connectionDelegate.getDatabase().prepareInsert( table.getRowMeta(), KettleDatabaseRepository.TABLE_R_JOBENTRY_COPY );
  repository.connectionDelegate.getDatabase().setValuesInsert( table );
  repository.connectionDelegate.getDatabase().insertRow();
  repository.connectionDelegate.getDatabase().closeInsert();

  return id;
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:26,
代码来源:KettleDatabaseRepositoryJobEntryDelegate.java

示例7: createRowMetaInterface

点赞 3

import org.pentaho.di.core.row.value.ValueMetaBoolean; //导入依赖的package包/类
private static RowMetaInterface createRowMetaInterface() {
  RowMetaInterface rm = new RowMeta();

  ValueMetaInterface[] valuesMeta =
  {
    new ValueMetaString( "field1" ), new ValueMetaInteger( "field2" ),
    new ValueMetaNumber( "field3" ), new ValueMetaDate( "field4" ),
    new ValueMetaBoolean( "field5" ),
    new ValueMetaBigNumber( "field6" ),
    new ValueMetaBigNumber( "field7" ) };

  for ( ValueMetaInterface aValuesMeta : valuesMeta ) {
    rm.addValueMeta( aValuesMeta );
  }

  return rm;
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:18,
代码来源:BlockingStep_PDI_11344_Test.java

示例8: check

点赞 3

import org.pentaho.di.core.row.value.ValueMetaBoolean; //导入依赖的package包/类
/**
 * Check boolean property.
 */
protected void check( String propertyName, BooleanGetter getter ) throws KettleException {
  ValueMetaInterface valueMetaString = new ValueMetaString( "f" );

  injector.setProperty( meta, propertyName, setValue( valueMetaString, "Y" ), "f" );
  assertEquals( true, getter.get() );

  injector.setProperty( meta, propertyName, setValue( valueMetaString, "N" ), "f" );
  assertEquals( false, getter.get() );

  ValueMetaInterface valueMetaBoolean = new ValueMetaBoolean( "f" );

  injector.setProperty( meta, propertyName, setValue( valueMetaBoolean, true ), "f" );
  assertEquals( true, getter.get() );

  injector.setProperty( meta, propertyName, setValue( valueMetaBoolean, false ), "f" );
  assertEquals( false, getter.get() );

  skipPropertyTest( propertyName );
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:23,
代码来源:BaseMetadataInjectionTest.java

示例9: ValueMetaAndData

点赞 3

import org.pentaho.di.core.row.value.ValueMetaBoolean; //导入依赖的package包/类
public ValueMetaAndData( String valueName, Object valueData ) throws KettleValueException {
  this.valueData = valueData;
  if ( valueData instanceof String ) {
    this.valueMeta = new ValueMetaString( valueName );
  } else if ( valueData instanceof Double ) {
    this.valueMeta = new ValueMetaNumber( valueName );
  } else if ( valueData instanceof Long ) {
    this.valueMeta = new ValueMetaInteger( valueName );
  } else if ( valueData instanceof Date ) {
    this.valueMeta = new ValueMetaDate( valueName, ValueMetaInterface.TYPE_DATE );
  } else if ( valueData instanceof BigDecimal ) {
    this.valueMeta = new ValueMetaBigNumber( valueName );
  } else if ( valueData instanceof Boolean ) {
    this.valueMeta = new ValueMetaBoolean( valueName );
  } else if ( valueData instanceof byte[] ) {
    this.valueMeta = new ValueMetaBinary( valueName );
  } else {
    this.valueMeta = new ValueMetaSerializable( valueName );
  }
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:21,
代码来源:ValueMetaAndData.java

示例10: populateMetaAndData

点赞 3

import org.pentaho.di.core.row.value.ValueMetaBoolean; //导入依赖的package包/类
private static void populateMetaAndData( int i, Object[] rowString10, RowMetaInterface metaString10,
  Object[] rowMixed10, RowMetaInterface metaMixed10 ) {
  rowString10[i] = StringUtil.generateRandomString( 20, "", "", false );
  ValueMetaInterface meta = new ValueMetaString( "String" + ( i + 1 ), 20, 0 );
  metaString10.addValueMeta( meta );

  rowMixed10[i * 5 + 0] = StringUtil.generateRandomString( 20, "", "", false );
  ValueMetaInterface meta0 = new ValueMetaString( "String" + ( i * 5 + 1 ), 20, 0 );
  metaMixed10.addValueMeta( meta0 );

  rowMixed10[i * 5 + 1] = new Date();
  ValueMetaInterface meta1 = new ValueMetaDate( "String" + ( i * 5 + 1 ) );
  metaMixed10.addValueMeta( meta1 );

  rowMixed10[i * 5 + 2] = new Double( Math.random() * 1000000 );
  ValueMetaInterface meta2 = new ValueMetaNumber( "String" + ( i * 5 + 1 ), 12, 4 );
  metaMixed10.addValueMeta( meta2 );

  rowMixed10[i * 5 + 3] = new Long( (long) ( Math.random() * 1000000 ) );
  ValueMetaInterface meta3 = new ValueMetaInteger( "String" + ( i * 5 + 1 ), 8, 0 );
  metaMixed10.addValueMeta( meta3 );

  rowMixed10[i * 5 + 4] = Boolean.valueOf( Math.random() > 0.5 ? true : false );
  ValueMetaInterface meta4 = new ValueMetaBoolean( "String" + ( i * 5 + 1 ) );
  metaMixed10.addValueMeta( meta4 );
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:27,
代码来源:SpeedTest.java

示例11: testEmptyValues

点赞 3

import org.pentaho.di.core.row.value.ValueMetaBoolean; //导入依赖的package包/类
@Test
public void testEmptyValues() throws Exception {
  RowMeta rowsMetaEmpty = new RowMeta();

  rowsMetaEmpty.addValueMeta( new ValueMetaString( "str" ) );
  rowsMetaEmpty.addValueMeta( new ValueMetaBoolean( "bool" ) );
  rowsMetaEmpty.addValueMeta( new ValueMetaInteger( "int" ) );
  rowsMetaEmpty.addValueMeta( new ValueMetaNumber( "num" ) );
  rowsMetaEmpty.addValueMeta( new ValueMetaBigNumber( "bignum" ) );
  rowsMetaEmpty.addValueMeta( new ValueMetaBinary( "bin" ) );
  rowsMetaEmpty.addValueMeta( new ValueMetaDate( "date" ) );
  rowsMetaEmpty.addValueMeta( new ValueMetaTimestamp( "timestamp" ) );
  rowsMetaEmpty.addValueMeta( new ValueMetaInternetAddress( "inet" ) );
  row = new RowMetaAndData( rowsMetaEmpty, null, null, null, null, null, null, null, null, null );
  assertTrue( row.isEmptyValue( "str" ) );
  assertTrue( row.isEmptyValue( "bool" ) );
  assertTrue( row.isEmptyValue( "int" ) );
  assertTrue( row.isEmptyValue( "num" ) );
  assertTrue( row.isEmptyValue( "bignum" ) );
  assertTrue( row.isEmptyValue( "bin" ) );
  assertTrue( row.isEmptyValue( "date" ) );
  assertTrue( row.isEmptyValue( "timestamp" ) );
  assertTrue( row.isEmptyValue( "inet" ) );
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:25,
代码来源:RowMetaAndDataTest.java

示例12: getRowMeta

点赞 2

import org.pentaho.di.core.row.value.ValueMetaBoolean; //导入依赖的package包/类
public static final RowMetaInterface getRowMeta() {
  RowMetaInterface rowMeta = new RowMeta();
  
  rowMeta.addValueMeta(new ValueMetaString(BaseMessages.getString(PKG, "UnitTestResult.FieldName.TransformationName")));
  rowMeta.addValueMeta(new ValueMetaString(BaseMessages.getString(PKG, "UnitTestResult.FieldName.UnitTestName")));
  rowMeta.addValueMeta(new ValueMetaString(BaseMessages.getString(PKG, "UnitTestResult.FieldName.DataSetName")));
  rowMeta.addValueMeta(new ValueMetaString(BaseMessages.getString(PKG, "UnitTestResult.FieldName.StepName")));
  rowMeta.addValueMeta(new ValueMetaBoolean(BaseMessages.getString(PKG, "UnitTestResult.FieldName.Error")));
  rowMeta.addValueMeta(new ValueMetaString(BaseMessages.getString(PKG, "UnitTestResult.FieldName.Comment")));

  return rowMeta;
}
 

开发者ID:mattcasters,
项目名称:pentaho-pdi-dataset,
代码行数:13,
代码来源:UnitTestResult.java

示例13: getValueMetaInterface

点赞 2

import org.pentaho.di.core.row.value.ValueMetaBoolean; //导入依赖的package包/类
private ValueMetaInterface getValueMetaInterface( String fieldName, int fieldType ) {
  switch ( fieldType ) {
    case ValueMetaInterface.TYPE_INET:
      return new ValueMetaInternetAddress( fieldName );
    case ValueMetaInterface.TYPE_STRING:
      return new ValueMetaString( fieldName );
    case ValueMetaInterface.TYPE_INTEGER:
      return new ValueMetaInteger( fieldName );
    case ValueMetaInterface.TYPE_NUMBER:
      return new ValueMetaNumber( fieldName );
    case ValueMetaInterface.TYPE_BIGNUMBER:
      return new ValueMetaBigNumber( fieldName );
    case ValueMetaInterface.TYPE_TIMESTAMP:
      ValueMetaTimestamp valueMetaTimestamp = new ValueMetaTimestamp( fieldName );
      valueMetaTimestamp.setConversionMask( "yyyy/MM/dd HH:mm:ss.SSS" );
      return valueMetaTimestamp;
    case ValueMetaInterface.TYPE_DATE:
      ValueMetaDate valueMetaDate = new ValueMetaDate( fieldName );
      valueMetaDate.setConversionMask( "yyyy/MM/dd HH:mm:ss.SSS" );
      return valueMetaDate;
    case ValueMetaInterface.TYPE_BOOLEAN:
      return new ValueMetaBoolean( fieldName );
    case ValueMetaInterface.TYPE_BINARY:
      return new ValueMetaBinary( fieldName );
  }
  return null;
}
 

开发者ID:pentaho,
项目名称:pentaho-hadoop-shims,
代码行数:28,
代码来源:PentahoAvroReadWriteTest.java

示例14: createRowMetaInterface

点赞 2

import org.pentaho.di.core.row.value.ValueMetaBoolean; //导入依赖的package包/类
public RowMetaInterface createRowMetaInterface() {
  RowMetaInterface rm = new RowMeta();

  ValueMetaInterface[] valuesMeta =
  {
    new ValueMetaString( "field1" ), new ValueMetaInteger( "field2" ),
    new ValueMetaNumber( "field3" ), new ValueMetaBoolean( "field5" ),
    new ValueMetaBigNumber( "field6" ), };

  for ( int i = 0; i < valuesMeta.length; i++ ) {
    rm.addValueMeta( valuesMeta[i] );
  }

  return rm;
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:16,
代码来源:DetectLastRowStepIT.java

示例15: createRowMetaInterfaceResult3

点赞 2

import org.pentaho.di.core.row.value.ValueMetaBoolean; //导入依赖的package包/类
/**
 * Create the meta data for the results (isnum/num2str/str2num).
 */
public RowMetaInterface createRowMetaInterfaceResult3() {
  RowMetaInterface rm = new RowMeta();

  ValueMetaInterface[] valuesMeta =
    {
      new ValueMetaString( "string" ), new ValueMetaNumber( "numb1" ),
      new ValueMetaBoolean( "bool1" ), new ValueMetaString( "str1" ), };

  for ( int i = 0; i < valuesMeta.length; i++ ) {
    rm.addValueMeta( valuesMeta[ i ] );
  }

  return rm;
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:18,
代码来源:JavaScriptStringIT.java

示例16: createRowMetaInterfaceResult1

点赞 2

import org.pentaho.di.core.row.value.ValueMetaBoolean; //导入依赖的package包/类
/**
 * Create the meta data for the results (ltrim/rtrim/trim).
 */
public RowMetaInterface createRowMetaInterfaceResult1() {
  RowMetaInterface rm = new RowMeta();

  ValueMetaInterface[] valuesMeta =
    { new ValueMetaString( "string" ), new ValueMetaBoolean( "bool" ) };

  for ( int i = 0; i < valuesMeta.length; i++ ) {
    rm.addValueMeta( valuesMeta[ i ] );
  }

  return rm;
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:16,
代码来源:JavaScriptSpecialIT.java

示例17: createResultRowMetaInterface3

点赞 2

import org.pentaho.di.core.row.value.ValueMetaBoolean; //导入依赖的package包/类
public RowMetaInterface createResultRowMetaInterface3() {
  return createRowMetaInterface(
    new ValueMetaString( "field1" ),
    new ValueMetaBoolean( "res" ),
    new ValueMetaString( "cap" ),
    new ValueMetaString( "capIfNull" ),
    new ValueMetaString( "capNullIf" ),
    new ValueMetaInteger( "capIfNullNullIf" ) );
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:10,
代码来源:RegexEvalIT.java

示例18: createRowMetaInterface

点赞 2

import org.pentaho.di.core.row.value.ValueMetaBoolean; //导入依赖的package包/类
public RowMetaInterface createRowMetaInterface() {
  RowMetaInterface rm = new RowMeta();

  ValueMetaInterface[] valuesMeta =
  {
    new ValueMetaString( "string" ), new ValueMetaBoolean( "boolean" ),
    new ValueMetaInteger( "integer" ),
    new ValueMetaTimestamp( "timestamp" ) };

  for ( int i = 0; i < valuesMeta.length; i++ ) {
    rm.addValueMeta( valuesMeta[i] );
  }

  return rm;
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:16,
代码来源:RowGeneratorIT.java

示例19: insertPartitionSchema

点赞 2

import org.pentaho.di.core.row.value.ValueMetaBoolean; //导入依赖的package包/类
public synchronized ObjectId insertPartitionSchema( PartitionSchema partitionSchema ) throws KettleException {
  if ( getPartitionSchemaID( partitionSchema.getName() ) != null ) {
    // This partition schema name is already in use. Throw an exception.
    throw new KettleObjectExistsException( "Failed to create object in repository. Object ["
      + partitionSchema.getName() + "] already exists." );
  }

  ObjectId id = repository.connectionDelegate.getNextPartitionSchemaID();

  RowMetaAndData table = new RowMetaAndData();

  table.addValue( new ValueMetaInteger( KettleDatabaseRepository.FIELD_PARTITION_SCHEMA_ID_PARTITION_SCHEMA ), id );
  table.addValue( new ValueMetaString( KettleDatabaseRepository.FIELD_PARTITION_SCHEMA_NAME ),
    partitionSchema.getName() );
  table.addValue( new ValueMetaBoolean( KettleDatabaseRepository.FIELD_PARTITION_SCHEMA_DYNAMIC_DEFINITION ),
    partitionSchema.isDynamicallyDefined() );
  table.addValue( new ValueMetaString( KettleDatabaseRepository.FIELD_PARTITION_SCHEMA_PARTITIONS_PER_SLAVE ),
    partitionSchema.getNumberOfPartitionsPerSlave() );

  repository.connectionDelegate.getDatabase().prepareInsert(
    table.getRowMeta(), KettleDatabaseRepository.TABLE_R_PARTITION_SCHEMA );
  repository.connectionDelegate.getDatabase().setValuesInsert( table );
  repository.connectionDelegate.getDatabase().insertRow();
  repository.connectionDelegate.getDatabase().closeInsert();

  return id;
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:28,
代码来源:KettleDatabaseRepositoryPartitionSchemaDelegate.java

示例20: updatePartitionSchema

点赞 2

import org.pentaho.di.core.row.value.ValueMetaBoolean; //导入依赖的package包/类
public synchronized void updatePartitionSchema( PartitionSchema partitionSchema ) throws KettleException {
  RowMetaAndData table = new RowMetaAndData();
  table.addValue( new ValueMetaString( KettleDatabaseRepository.FIELD_PARTITION_SCHEMA_NAME ),
    partitionSchema.getName() );
  table.addValue( new ValueMetaBoolean( KettleDatabaseRepository.FIELD_PARTITION_SCHEMA_DYNAMIC_DEFINITION ),
    partitionSchema.isDynamicallyDefined() );
  table.addValue( new ValueMetaString( KettleDatabaseRepository.FIELD_PARTITION_SCHEMA_PARTITIONS_PER_SLAVE ),
    partitionSchema.getNumberOfPartitionsPerSlave() );

  repository.connectionDelegate.updateTableRow(
    KettleDatabaseRepository.TABLE_R_PARTITION_SCHEMA,
    KettleDatabaseRepository.FIELD_PARTITION_SCHEMA_ID_PARTITION_SCHEMA, table, partitionSchema.getObjectId() );
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:14,
代码来源:KettleDatabaseRepositoryPartitionSchemaDelegate.java

示例21: insertJobHop

点赞 2

import org.pentaho.di.core.row.value.ValueMetaBoolean; //导入依赖的package包/类
public synchronized ObjectId insertJobHop( ObjectId id_job, ObjectId id_jobentry_copy_from,
  ObjectId id_jobentry_copy_to, boolean enabled, boolean evaluation, boolean unconditional ) throws KettleException {
  ObjectId id = repository.connectionDelegate.getNextJobHopID();

  RowMetaAndData table = new RowMetaAndData();

  table.addValue( new ValueMetaInteger(
    KettleDatabaseRepository.FIELD_JOB_HOP_ID_JOB_HOP ), id );
  table.addValue(
    new ValueMetaInteger( KettleDatabaseRepository.FIELD_JOB_HOP_ID_JOB ), id_job );
  table.addValue(
    new ValueMetaInteger(
      KettleDatabaseRepository.FIELD_JOB_HOP_ID_JOBENTRY_COPY_FROM ),
    id_jobentry_copy_from );
  table
    .addValue(
      new ValueMetaInteger(
        KettleDatabaseRepository.FIELD_JOB_HOP_ID_JOBENTRY_COPY_TO ),
      id_jobentry_copy_to );
  table.addValue(
    new ValueMetaBoolean( KettleDatabaseRepository.FIELD_JOB_HOP_ENABLED ), Boolean
      .valueOf( enabled ) );
  table.addValue( new ValueMetaBoolean(
    KettleDatabaseRepository.FIELD_JOB_HOP_EVALUATION ), Boolean
    .valueOf( evaluation ) );
  table.addValue( new ValueMetaBoolean(
    KettleDatabaseRepository.FIELD_JOB_HOP_UNCONDITIONAL ), Boolean
    .valueOf( unconditional ) );

  repository.connectionDelegate.getDatabase().prepareInsert(
    table.getRowMeta(), KettleDatabaseRepository.TABLE_R_JOB_HOP );
  repository.connectionDelegate.getDatabase().setValuesInsert( table );
  repository.connectionDelegate.getDatabase().insertRow();
  repository.connectionDelegate.getDatabase().closeInsert();

  return id;
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:38,
代码来源:KettleDatabaseRepositoryJobDelegate.java

示例22: updateSlave

点赞 2

import org.pentaho.di.core.row.value.ValueMetaBoolean; //导入依赖的package包/类
public synchronized void updateSlave( SlaveServer slaveServer ) throws KettleException {
  RowMetaAndData table = new RowMetaAndData();
  table.addValue(
    new ValueMetaString( KettleDatabaseRepository.FIELD_SLAVE_NAME ), slaveServer
      .getName() );
  table.addValue(
    new ValueMetaString( KettleDatabaseRepository.FIELD_SLAVE_HOST_NAME ),
    slaveServer.getHostname() );
  table.addValue(
    new ValueMetaString( KettleDatabaseRepository.FIELD_SLAVE_PORT ), slaveServer
      .getPort() );
  table.addValue( new ValueMetaString(
    KettleDatabaseRepository.FIELD_SLAVE_WEB_APP_NAME ), slaveServer
    .getWebAppName() );
  table.addValue(
    new ValueMetaString( KettleDatabaseRepository.FIELD_SLAVE_USERNAME ),
    slaveServer.getUsername() );
  table.addValue(
    new ValueMetaString( KettleDatabaseRepository.FIELD_SLAVE_PASSWORD ), Encr
      .encryptPasswordIfNotUsingVariables( slaveServer.getPassword() ) );
  table.addValue( new ValueMetaString(
    KettleDatabaseRepository.FIELD_SLAVE_PROXY_HOST_NAME ), slaveServer
    .getProxyHostname() );
  table.addValue(
    new ValueMetaString( KettleDatabaseRepository.FIELD_SLAVE_PROXY_PORT ),
    slaveServer.getProxyPort() );
  table.addValue( new ValueMetaString(
    KettleDatabaseRepository.FIELD_SLAVE_NON_PROXY_HOSTS ), slaveServer
    .getNonProxyHosts() );
  table.addValue(
    new ValueMetaBoolean( KettleDatabaseRepository.FIELD_SLAVE_MASTER ), Boolean
      .valueOf( slaveServer.isMaster() ) );

  repository.connectionDelegate.updateTableRow(
    KettleDatabaseRepository.TABLE_R_SLAVE, KettleDatabaseRepository.FIELD_SLAVE_ID_SLAVE, table, slaveServer
      .getObjectId() );
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:38,
代码来源:KettleDatabaseRepositorySlaveServerDelegate.java

示例23: fillTableRow

点赞 2

import org.pentaho.di.core.row.value.ValueMetaBoolean; //导入依赖的package包/类
public RowMetaAndData fillTableRow( IUser userInfo ) {
  RowMetaAndData r = new RowMetaAndData();
  r.addValue( new ValueMetaInteger( "ID_USER" ), userInfo.getObjectId() );
  r.addValue( new ValueMetaString( "LOGIN" ), userInfo.getLogin() );
  r.addValue( new ValueMetaString( "PASSWORD" ), Encr.encryptPassword( userInfo
    .getPassword() ) );
  r.addValue( new ValueMetaString( "NAME" ), userInfo.getUsername() );
  r.addValue( new ValueMetaString( "DESCRIPTION" ), userInfo.getDescription() );
  r.addValue( new ValueMetaBoolean( "ENABLED" ), Boolean.valueOf( userInfo.isEnabled() ) );
  return r;
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:12,
代码来源:KettleDatabaseRepositoryUserDelegate.java

示例24: insertTransHop

点赞 2

import org.pentaho.di.core.row.value.ValueMetaBoolean; //导入依赖的package包/类
private synchronized ObjectId insertTransHop( ObjectId id_transformation, ObjectId id_step_from,
  ObjectId id_step_to, boolean enabled ) throws KettleException {
  ObjectId id = repository.connectionDelegate.getNextTransHopID();

  RowMetaAndData table = new RowMetaAndData();

  table.addValue( new ValueMetaInteger(
    KettleDatabaseRepository.FIELD_TRANS_HOP_ID_TRANS_HOP ), id );
  table
    .addValue(
      new ValueMetaInteger(
        KettleDatabaseRepository.FIELD_TRANS_HOP_ID_TRANSFORMATION ),
      id_transformation );
  table.addValue( new ValueMetaInteger(
    KettleDatabaseRepository.FIELD_TRANS_HOP_ID_STEP_FROM ), id_step_from );
  table.addValue( new ValueMetaInteger(
    KettleDatabaseRepository.FIELD_TRANS_HOP_ID_STEP_TO ), id_step_to );
  table.addValue( new ValueMetaBoolean(
    KettleDatabaseRepository.FIELD_TRANS_HOP_ENABLED ), Boolean
    .valueOf( enabled ) );

  repository.connectionDelegate.getDatabase().prepareInsert(
    table.getRowMeta(), KettleDatabaseRepository.TABLE_R_TRANS_HOP );
  repository.connectionDelegate.getDatabase().setValuesInsert( table );
  repository.connectionDelegate.getDatabase().insertRow();
  repository.connectionDelegate.getDatabase().closeInsert();

  return id;
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:30,
代码来源:KettleDatabaseRepositoryTransDelegate.java

示例25: insertStep

点赞 2

import org.pentaho.di.core.row.value.ValueMetaBoolean; //导入依赖的package包/类
public synchronized ObjectId insertStep( ObjectId id_transformation, String name, String description,
  String steptype, boolean distribute, long copies, long gui_location_x, long gui_location_y,
  boolean gui_draw, String copiesString ) throws KettleException {
  ObjectId id = repository.connectionDelegate.getNextStepID();

  ObjectId id_step_type = getStepTypeID( steptype );

  RowMetaAndData table = new RowMetaAndData();

  table.addValue( new ValueMetaInteger( KettleDatabaseRepository.FIELD_STEP_ID_STEP ), id );
  table.addValue( new ValueMetaInteger( KettleDatabaseRepository.FIELD_STEP_ID_TRANSFORMATION ), id_transformation );
  table.addValue( new ValueMetaString( KettleDatabaseRepository.FIELD_STEP_NAME ), name );
  table.addValue( new ValueMetaString( KettleDatabaseRepository.FIELD_STEP_DESCRIPTION ), description );
  table.addValue( new ValueMetaInteger( KettleDatabaseRepository.FIELD_STEP_ID_STEP_TYPE ), id_step_type );
  table.addValue( new ValueMetaBoolean( KettleDatabaseRepository.FIELD_STEP_DISTRIBUTE ), Boolean.valueOf( distribute ) );
  table.addValue( new ValueMetaInteger( KettleDatabaseRepository.FIELD_STEP_COPIES ), new Long( copies ) );
  table.addValue( new ValueMetaInteger( KettleDatabaseRepository.FIELD_STEP_GUI_LOCATION_X ), new Long( gui_location_x ) );
  table.addValue( new ValueMetaInteger( KettleDatabaseRepository.FIELD_STEP_GUI_LOCATION_Y ), new Long( gui_location_y ) );
  table.addValue( new ValueMetaBoolean( KettleDatabaseRepository.FIELD_STEP_GUI_DRAW ), Boolean.valueOf( gui_draw ) );
  table.addValue( new ValueMetaString( KettleDatabaseRepository.FIELD_STEP_COPIES_STRING ), copiesString );

  repository.connectionDelegate.getDatabase().prepareInsert( table.getRowMeta(), KettleDatabaseRepository.TABLE_R_STEP );
  repository.connectionDelegate.getDatabase().setValuesInsert( table );
  repository.connectionDelegate.getDatabase().insertRow();
  repository.connectionDelegate.getDatabase().closeInsert();

  return id;
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:29,
代码来源:KettleDatabaseRepositoryStepDelegate.java

示例26: insertValue

点赞 2

import org.pentaho.di.core.row.value.ValueMetaBoolean; //导入依赖的package包/类
public synchronized ObjectId insertValue( String name, String type, String value_str, boolean isnull,
  ObjectId id_value_prev ) throws KettleException {
  ObjectId id_value = lookupValue( name, type, value_str, isnull );
  // if it didn't exist yet: insert it!!

  if ( id_value == null ) {
    id_value = repository.connectionDelegate.getNextValueID();

    // Let's see if the same value is not yet available?
    String tablename = KettleDatabaseRepository.TABLE_R_VALUE;
    RowMetaAndData table = new RowMetaAndData();
    table.addValue( new ValueMetaInteger(
      KettleDatabaseRepository.FIELD_VALUE_ID_VALUE ), id_value );
    table.addValue(
      new ValueMetaString( KettleDatabaseRepository.FIELD_VALUE_NAME ), name );
    table.addValue( new ValueMetaString(
      KettleDatabaseRepository.FIELD_VALUE_VALUE_TYPE ), type );
    table.addValue( new ValueMetaString(
      KettleDatabaseRepository.FIELD_VALUE_VALUE_STR ), value_str );
    table.addValue(
      new ValueMetaBoolean( KettleDatabaseRepository.FIELD_VALUE_IS_NULL ), Boolean
        .valueOf( isnull ) );

    repository.connectionDelegate.getDatabase().prepareInsert( table.getRowMeta(), tablename );
    repository.connectionDelegate.getDatabase().setValuesInsert( table );
    repository.connectionDelegate.getDatabase().insertRow();
    repository.connectionDelegate.getDatabase().closeInsert();
  }

  return id_value;
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:32,
代码来源:KettleDatabaseRepositoryConditionDelegate.java

示例27: lookupValue

点赞 2

import org.pentaho.di.core.row.value.ValueMetaBoolean; //导入依赖的package包/类
public synchronized ObjectId lookupValue( String name, String type, String value_str, boolean isnull ) throws KettleException {
  RowMetaAndData table = new RowMetaAndData();
  table.addValue(
    new ValueMetaString( KettleDatabaseRepository.FIELD_VALUE_NAME ), name );
  table.addValue(
    new ValueMetaString( KettleDatabaseRepository.FIELD_VALUE_VALUE_TYPE ), type );
  table
    .addValue(
      new ValueMetaString( KettleDatabaseRepository.FIELD_VALUE_VALUE_STR ),
      value_str );
  table.addValue(
    new ValueMetaBoolean( KettleDatabaseRepository.FIELD_VALUE_IS_NULL ), Boolean
      .valueOf( isnull ) );

  String sql =
    "SELECT "
      + quote( KettleDatabaseRepository.FIELD_VALUE_ID_VALUE ) + " FROM "
      + quoteTable( KettleDatabaseRepository.TABLE_R_VALUE ) + " ";
  sql += "WHERE " + quote( KettleDatabaseRepository.FIELD_VALUE_NAME ) + "       = ? ";
  sql += "AND   " + quote( KettleDatabaseRepository.FIELD_VALUE_VALUE_TYPE ) + " = ? ";
  sql += "AND   " + quote( KettleDatabaseRepository.FIELD_VALUE_VALUE_STR ) + "  = ? ";
  sql += "AND   " + quote( KettleDatabaseRepository.FIELD_VALUE_IS_NULL ) + "    = ? ";

  RowMetaAndData result = repository.connectionDelegate.getOneRow( sql, table.getRowMeta(), table.getData() );
  if ( result != null && result.getData() != null && result.isNumeric( 0 ) ) {
    return new LongObjectId( result.getInteger( 0, 0L ) );
  } else {
    return null;
  }
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:31,
代码来源:KettleDatabaseRepositoryConditionDelegate.java

示例28: updateCluster

点赞 2

import org.pentaho.di.core.row.value.ValueMetaBoolean; //导入依赖的package包/类
public synchronized void updateCluster( ClusterSchema clusterSchema ) throws KettleException {
  RowMetaAndData table = new RowMetaAndData();

  table.addValue( new ValueMetaInteger(
    KettleDatabaseRepository.FIELD_CLUSTER_ID_CLUSTER ), clusterSchema
    .getObjectId() );
  table.addValue(
    new ValueMetaString( KettleDatabaseRepository.FIELD_CLUSTER_NAME ),
    clusterSchema.getName() );
  table.addValue( new ValueMetaString(
    KettleDatabaseRepository.FIELD_CLUSTER_BASE_PORT ), clusterSchema
    .getBasePort() );
  table
    .addValue(
      new ValueMetaString(
        KettleDatabaseRepository.FIELD_CLUSTER_SOCKETS_BUFFER_SIZE ),
      clusterSchema.getSocketsBufferSize() );
  table.addValue(
    new ValueMetaString(
      KettleDatabaseRepository.FIELD_CLUSTER_SOCKETS_FLUSH_INTERVAL ),
    clusterSchema.getSocketsFlushInterval() );
  table.addValue( new ValueMetaBoolean(
    KettleDatabaseRepository.FIELD_CLUSTER_SOCKETS_COMPRESSED ), Boolean
    .valueOf( clusterSchema.isSocketsCompressed() ) );
  table.addValue(
    new ValueMetaBoolean( KettleDatabaseRepository.FIELD_CLUSTER_DYNAMIC ), Boolean
      .valueOf( clusterSchema.isDynamic() ) );

  repository.connectionDelegate.updateTableRow(
    KettleDatabaseRepository.TABLE_R_CLUSTER, KettleDatabaseRepository.FIELD_CLUSTER_ID_CLUSTER, table,
    clusterSchema.getObjectId() );
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:33,
代码来源:KettleDatabaseRepositoryClusterSchemaDelegate.java

示例29: getFields

点赞 2

import org.pentaho.di.core.row.value.ValueMetaBoolean; //导入依赖的package包/类
public void getFields( RowMetaInterface inputRowMeta, String name, RowMetaInterface[] info, StepMeta nextStep,
  VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException {
  if ( !Utils.isEmpty( resultfieldname ) ) {
    ValueMetaInterface v = new ValueMetaBoolean( resultfieldname );
    v.setOrigin( name );
    inputRowMeta.addValueMeta( v );
  }
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:9,
代码来源:FileLockedMeta.java

示例30: getFields

点赞 2

import org.pentaho.di.core.row.value.ValueMetaBoolean; //导入依赖的package包/类
public void getFields( RowMetaInterface inputRowMeta, String name, RowMetaInterface[] info, StepMeta nextStep,
  VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException {

  if ( !Utils.isEmpty( resultfieldname ) ) {
    ValueMetaInterface v = new ValueMetaBoolean( resultfieldname );
    v.setOrigin( name );
    inputRowMeta.addValueMeta( v );
  }

}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:11,
代码来源:WebServiceAvailableMeta.java

示例31: getFields

点赞 2

import org.pentaho.di.core.row.value.ValueMetaBoolean; //导入依赖的package包/类
public void getFields( RowMetaInterface row, String name, RowMetaInterface[] info, StepMeta nextStep,
  VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException {

  if ( !Utils.isEmpty( resultfieldname ) ) {
    ValueMetaInterface v =
      new ValueMetaBoolean( space.environmentSubstitute( resultfieldname ) );
    v.setOrigin( name );
    row.addValueMeta( v );
  }
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:11,
代码来源:DetectLastRowMeta.java

示例32: getFields

点赞 2

import org.pentaho.di.core.row.value.ValueMetaBoolean; //导入依赖的package包/类
@Override
public void getFields( RowMetaInterface row, String name, RowMetaInterface[] info, StepMeta nextStep,
  VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException {
  if ( ignoreFlagField != null && ignoreFlagField.length() > 0 ) {
    ValueMetaInterface v = new ValueMetaBoolean( ignoreFlagField );
    v.setOrigin( name );

    row.addValueMeta( v );
  }
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:11,
代码来源:UpdateMeta.java

示例33: getFields

点赞 2

import org.pentaho.di.core.row.value.ValueMetaBoolean; //导入依赖的package包/类
public void getFields( RowMetaInterface inputRowMeta, String name, RowMetaInterface[] info, StepMeta nextStep,
  VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException {
  // Output field (String)
  if ( !Utils.isEmpty( resultfieldname ) ) {
    ValueMetaInterface v =
      new ValueMetaBoolean( space.environmentSubstitute( resultfieldname ) );
    v.setOrigin( name );
    inputRowMeta.addValueMeta( v );
  }
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:11,
代码来源:ColumnExistsMeta.java

示例34: ExcelInputData

点赞 2

import org.pentaho.di.core.row.value.ValueMetaBoolean; //导入依赖的package包/类
public ExcelInputData() {
  super();
  workbook = null;
  filenr = 0;
  sheetnr = 0;
  rownr = -1;
  colnr = -1;

  valueMetaString = new ValueMetaString( "v" );
  valueMetaNumber = new ValueMetaNumber( "v" );
  valueMetaDate = new ValueMetaDate( "v" );
  valueMetaBoolean = new ValueMetaBoolean( "v" );
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:14,
代码来源:ExcelInputData.java

示例35: getInputRowMeta

点赞 2

import org.pentaho.di.core.row.value.ValueMetaBoolean; //导入依赖的package包/类
private RowMetaInterface getInputRowMeta() {
  RowMetaInterface rm = new RowMeta();
  rm.addValueMeta( new ValueMetaString( "myGroupField2" ) );
  rm.addValueMeta( new ValueMetaString( "myGroupField1" ) );
  rm.addValueMeta( new ValueMetaString( "myString" ) );
  rm.addValueMeta( new ValueMetaInteger( "myInteger" ) );
  rm.addValueMeta( new ValueMetaNumber( "myNumber" ) );
  rm.addValueMeta( new ValueMetaBigNumber( "myBigNumber" ) );
  rm.addValueMeta( new ValueMetaBinary( "myBinary" ) );
  rm.addValueMeta( new ValueMetaBoolean( "myBoolean" ) );
  rm.addValueMeta( new ValueMetaDate( "myDate" ) );
  rm.addValueMeta( new ValueMetaTimestamp( "myTimestamp" ) );
  rm.addValueMeta( new ValueMetaInternetAddress( "myInternetAddress" ) );
  return rm;
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:16,
代码来源:MemoryGroupByMetaTest.java

示例36: createTestRowMetaNormalStringConversion1

点赞 2

import org.pentaho.di.core.row.value.ValueMetaBoolean; //导入依赖的package包/类
private RowMetaInterface createTestRowMetaNormalStringConversion1() {
  RowMetaInterface rowMeta = new RowMeta();

  // A string object
  ValueMetaInterface meta1 = new ValueMetaString( "stringValue", 30, 0 );
  rowMeta.addValueMeta( meta1 );

  ValueMetaInterface meta2 = new ValueMetaDate( "dateValue", ValueMetaInterface.TYPE_DATE );
  rowMeta.addValueMeta( meta2 );

  ValueMetaInterface meta3 = new ValueMetaNumber( "numberValue", 5, 2 );
  meta3.setConversionMask( "#,##0.00" );
  meta3.setDecimalSymbol( "." );
  meta3.setGroupingSymbol( "," );
  rowMeta.addValueMeta( meta3 );

  ValueMetaInterface meta4 = new ValueMetaInteger( "integerValue", 7, 0 );
  meta4.setConversionMask( "0000000" );
  meta4.setDecimalSymbol( "." );
  meta4.setGroupingSymbol( "," );
  rowMeta.addValueMeta( meta4 );

  ValueMetaInterface meta5 = new ValueMetaBigNumber( "bigNumberValue", 30, 7 );
  meta5.setDecimalSymbol( "." );
  rowMeta.addValueMeta( meta5 );

  ValueMetaInterface meta6 = new ValueMetaBoolean( "booleanValue" );
  rowMeta.addValueMeta( meta6 );

  return rowMeta;
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:32,
代码来源:RowTest.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)