private VirtualPoolChangeParam convertNewVirtualPoolChangeParamToOldParam(VolumeVirtualPoolChangeParam newParam){
  VirtualPoolChangeParam oldParam=new VirtualPoolChangeParam();
  oldParam.setVirtualPool(newParam.getVirtualPool());
  oldParam.setProtection(newParam.getProtection());
  oldParam.setConsistencyGroup(newParam.getConsistencyGroup());
  oldParam.setTransferSpeedParam(newParam.getTransferSpeedParam());
  oldParam.setMigrationSuspendBeforeCommit(newParam.isMigrationSuspendBeforeCommit());
  oldParam.setMigrationSuspendBeforeDeleteSource(newParam.isMigrationSuspendBeforeDeleteSource());
  return oldParam;
}

private VirtualPoolChangeParam convertNewVirtualPoolChangeParamToOldParam ( VolumeVirtualPoolChangeParam newParam ) { VirtualPoolChangeParam oldParam = new VirtualPoolChangeParam ( ) ; oldParam . setVirtualPool ( newParam . getVirtualPool ( ) ) ; oldParam . setProtection ( newParam . getProtection ( ) ) ; oldParam . setConsistencyGroup ( newParam . getConsistencyGroup ( ) ) ; oldParam . setTransferSpeedParam ( newParam . getTransferSpeedParam ( ) ) ; oldParam . setMigrationSuspendBeforeCommit ( newParam . isMigrationSuspendBeforeCommit ( ) ) ; oldParam . setMigrationSuspendBeforeDeleteSource ( newParam . isMigrationSuspendBeforeDeleteSource ( ) ) ; return oldParam ; }
copy the contents from new virtual pool change param to old param . old param is passed as an argument in multiple methods and it is not advisable to create over - loaded methods for all those . when we remove the old deprecated param class , we can change the argument in all those methods to take the new param .
