当前位置: 首页>>代码示例>>Java>>正文


Java JobEntryBase.setObjectId方法代码示例

本文整理汇总了Java中org.pentaho.di.job.entry.JobEntryBase.setObjectId方法的典型用法代码示例。如果您正苦于以下问题:Java JobEntryBase.setObjectId方法的具体用法?Java JobEntryBase.setObjectId怎么用?Java JobEntryBase.setObjectId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.pentaho.di.job.entry.JobEntryBase的用法示例。


在下文中一共展示了JobEntryBase.setObjectId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: insertJobEntry

import org.pentaho.di.job.entry.JobEntryBase; //导入方法依赖的package包/类
public synchronized ObjectId insertJobEntry(ObjectId id_job, JobEntryBase jobEntryBase) throws KettleException {
	ObjectId id = repository.connectionDelegate.getNextJobEntryID();

	ObjectId id_jobentry_type = getJobEntryTypeID(jobEntryBase.getPluginId());

	log.logDebug("ID_JobEntry_type = " + id_jobentry_type + " for type = [" + jobEntryBase.getPluginId() + "]");

	RowMetaAndData table = new RowMetaAndData();

	table.addValue(new ValueMeta(KettleDatabaseRepository.FIELD_JOBENTRY_ID_JOBENTRY, ValueMetaInterface.TYPE_INTEGER), id);
	table.addValue(new ValueMeta(KettleDatabaseRepository.FIELD_JOBENTRY_ID_JOB, ValueMetaInterface.TYPE_INTEGER), id_job);
	table.addValue(new ValueMeta(KettleDatabaseRepository.FIELD_JOBENTRY_ID_JOBENTRY_TYPE, ValueMetaInterface.TYPE_INTEGER), id_jobentry_type);
	table.addValue(new ValueMeta(KettleDatabaseRepository.FIELD_JOBENTRY_NAME, ValueMetaInterface.TYPE_STRING), jobEntryBase.getName());
	table.addValue(new ValueMeta(KettleDatabaseRepository.FIELD_JOBENTRY_DESCRIPTION, ValueMetaInterface.TYPE_STRING), jobEntryBase.getDescription());

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

	jobEntryBase.setObjectId(id);
	
	return id;
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:25,代码来源:KettleDatabaseRepositoryJobEntryDelegate.java

示例2: insertJobEntry

import org.pentaho.di.job.entry.JobEntryBase; //导入方法依赖的package包/类
public synchronized ObjectId insertJobEntry( ObjectId id_job, JobEntryBase jobEntryBase ) throws KettleException {
  ObjectId id = repository.connectionDelegate.getNextJobEntryID();

  ObjectId id_jobentry_type = getJobEntryTypeID( jobEntryBase.getPluginId() );

  log.logDebug( "ID_JobEntry_type = " + id_jobentry_type + " for type = [" + jobEntryBase.getPluginId() + "]" );

  RowMetaAndData table = new RowMetaAndData();

  table.addValue( new ValueMetaInteger(
    KettleDatabaseRepository.FIELD_JOBENTRY_ID_JOBENTRY ), id );
  table.addValue(
    new ValueMetaInteger( KettleDatabaseRepository.FIELD_JOBENTRY_ID_JOB ), id_job );
  table
    .addValue(
      new ValueMetaInteger(
        KettleDatabaseRepository.FIELD_JOBENTRY_ID_JOBENTRY_TYPE ),
      id_jobentry_type );
  table.addValue(
    new ValueMetaString( KettleDatabaseRepository.FIELD_JOBENTRY_NAME ),
    jobEntryBase.getName() );
  table.addValue( new ValueMetaString(
    KettleDatabaseRepository.FIELD_JOBENTRY_DESCRIPTION ), jobEntryBase
    .getDescription() );

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

  jobEntryBase.setObjectId( id );

  return id;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:36,代码来源:KettleDatabaseRepositoryJobEntryDelegate.java


注:本文中的org.pentaho.di.job.entry.JobEntryBase.setObjectId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。