@Test public void testLoadRep() throws Exception { TestJobEntry je = new TestJobEntry(); BlockableJobConfig config = new BlockableJobConfig(); config.setJobEntryName( "testing" ); je.setJobConfig( config ); KettleEnvironment.init(); String filename = File.createTempFile( getClass().getSimpleName() + "-export-dbtest", "" ).getAbsolutePath(); try { DatabaseMeta databaseMeta = new DatabaseMeta( "H2Repo", "H2", "JDBC", null, filename, null, null, null ); RepositoryMeta repositoryMeta = new KettleDatabaseRepositoryMeta( "KettleDatabaseRepository", "H2Repo", "H2 Repository", databaseMeta ); KettleDatabaseRepository repository = new KettleDatabaseRepository(); repository.init( repositoryMeta ); repository.connectionDelegate.connect( true, true ); KettleDatabaseRepositoryCreationHelper helper = new KettleDatabaseRepositoryCreationHelper( repository ); helper.createRepositorySchema( null, false, new ArrayList<String>(), false ); repository.disconnect(); repository.connect( "admin", "admin" ); assertTrue( repository.isConnected() ); je.setObjectId( new LongObjectId( 1 ) ); ObjectId id_job = new LongObjectId( 1 ); je.saveRep( repository, id_job ); TestJobEntry je2 = new TestJobEntry(); je2.loadRep( repository, id_job, null, null ); BlockableJobConfig config2 = je2.getJobConfig(); Assert.assertEquals( config.getJobEntryName(), config2.getJobEntryName() ); } finally { new File( filename + ".h2.db" ).delete(); new File( filename + ".trace.db" ).delete(); } }
@Override public void loadRep( Repository rep, ObjectId id_jobentry, List<DatabaseMeta> databases, List<SlaveServer> slaveServers ) throws KettleException { super.loadRep( rep, id_jobentry, databases, slaveServers ); T loaded = createJobConfig(); JobEntrySerializationHelper.loadRep( loaded, rep, id_jobentry, databases, slaveServers ); setJobConfig( loaded ); }
AbstractJobEntry extends JobEntryBase implements Cloneable,
    JobEntryInterface { @Override public void loadRep( Repository rep, ObjectId id_jobentry, List<DatabaseMeta> databases, List<SlaveServer> slaveServers ) throws KettleException { super.loadRep( rep, id_jobentry, databases, slaveServers ); T loaded = createJobConfig(); JobEntrySerializationHelper.loadRep( loaded, rep, id_jobentry, databases, slaveServers ); setJobConfig( loaded ); } }
AbstractJobEntry extends JobEntryBase implements Cloneable,
    JobEntryInterface { @Override public void loadRep( Repository rep, ObjectId id_jobentry, List<DatabaseMeta> databases, List<SlaveServer> slaveServers ) throws KettleException { super.loadRep( rep, id_jobentry, databases, slaveServers ); T loaded = createJobConfig(); JobEntrySerializationHelper.loadRep( loaded, rep, id_jobentry, databases, slaveServers ); setJobConfig( loaded ); } AbstractJobEntry(); protected  AbstractJobEntry( LogChannelInterface logChannelInterface ); }
AbstractJobEntry extends JobEntryBase implements Cloneable,
    JobEntryInterface { @Override public void loadRep( Repository rep, ObjectId id_jobentry, List<DatabaseMeta> databases, List<SlaveServer> slaveServers ) throws KettleException { super.loadRep( rep, id_jobentry, databases, slaveServers ); T loaded = createJobConfig(); JobEntrySerializationHelper.loadRep( loaded, rep, id_jobentry, databases, slaveServers ); setJobConfig( loaded ); } AbstractJobEntry(); protected  AbstractJobEntry( LogChannelInterface logChannelInterface ); T getJobConfig(); void setJobConfig( T jobConfig ); @Override boolean evaluates(); @Override boolean isUnconditional(); @Override String getXML(); @Override void loadXML( Node node, List<DatabaseMeta> databaseMetas, List<SlaveServer> slaveServers,
      Repository repository ); @Override void loadRep( Repository rep, ObjectId id_jobentry, List<DatabaseMeta> databases,
      List<SlaveServer> slaveServers ); @Override void saveRep( Repository rep, ObjectId id_job ); @Override Result execute( Result result, int i ); void setJobResultFailed( Result jobResult ); boolean isValid( T config ); VariableSpace getVariableSpace(); abstract List<String> getValidationWarnings( T config ); }
AbstractJobEntry extends JobEntryBase implements Cloneable,
    JobEntryInterface { @Override public void loadRep( Repository rep, ObjectId id_jobentry, List<DatabaseMeta> databases, List<SlaveServer> slaveServers ) throws KettleException { super.loadRep( rep, id_jobentry, databases, slaveServers ); T loaded = createJobConfig(); JobEntrySerializationHelper.loadRep( loaded, rep, id_jobentry, databases, slaveServers ); setJobConfig( loaded ); } AbstractJobEntry(); protected  AbstractJobEntry( LogChannelInterface logChannelInterface ); T getJobConfig(); void setJobConfig( T jobConfig ); @Override boolean evaluates(); @Override boolean isUnconditional(); @Override String getXML(); @Override void loadXML( Node node, List<DatabaseMeta> databaseMetas, List<SlaveServer> slaveServers,
      Repository repository ); @Override void loadRep( Repository rep, ObjectId id_jobentry, List<DatabaseMeta> databases,
      List<SlaveServer> slaveServers ); @Override void saveRep( Repository rep, ObjectId id_job ); @Override Result execute( Result result, int i ); void setJobResultFailed( Result jobResult ); boolean isValid( T config ); VariableSpace getVariableSpace(); abstract List<String> getValidationWarnings( T config );  }