public StepPartitioningMeta loadStepPartitioningMeta( ObjectId id_step ) throws KettleException { StepPartitioningMeta stepPartitioningMeta = new StepPartitioningMeta(); stepPartitioningMeta.setPartitionSchemaName( repository .getStepAttributeString( id_step, "PARTITIONING_SCHEMA" ) ); String methodCode = repository.getStepAttributeString( id_step, "PARTITIONING_METHOD" ); stepPartitioningMeta.setMethod( StepPartitioningMeta.getMethod( methodCode ) ); if ( stepPartitioningMeta.getPartitioner() != null ) { stepPartitioningMeta.getPartitioner().loadRep( repository, id_step ); } stepPartitioningMeta.hasChanged( true ); return stepPartitioningMeta; }
public void testRepoRoundTrip() throws KettleException { T metaToSave = createMeta(); Map<String, FieldLoadSaveValidator<?>> validatorMap = createValidatorMapAndInvokeSetters( repoAttributes, metaToSave ); T metaLoaded = createMeta(); Repository rep = new MemoryRepository(); metaToSave.saveRep( rep, null, null ); metaLoaded.loadRep( rep, null ); validateLoadedMeta( repoAttributes, validatorMap, metaToSave, metaLoaded ); }
if ( stepPartitioningMeta.getPartitioner() != null ) { proxy = new RepositoryProxy( stepNode.getNode( NODE_PARTITIONER_CUSTOM ) ); stepPartitioningMeta.getPartitioner().loadRep( proxy, null );