public Job unmarshal( JaxbSafeJob jaxbSafeJob ) throws Exception {
if ( jaxbSafeJob == null ) {
return null;
}
Job job = new Job();
try {
job.setJobTrigger( jaxbSafeJob.jobTrigger );
job.setJobParams( toProperMap( jaxbSafeJob.jobParams ) );
job.setLastRun( jaxbSafeJob.lastRun );
job.setNextRun( jaxbSafeJob.nextRun );
job.setSchedulableClass( jaxbSafeJob.schedulableClass );
job.setJobId( jaxbSafeJob.jobId );
job.setUserName( jaxbSafeJob.userName );
job.setJobName( jaxbSafeJob.jobName );
job.setState( jaxbSafeJob.state );
} catch ( Throwable t ) {
// no message bundle since this is a development error case
logger.error( "Error unmarshalling job", t ); //$NON-NLS-1$
return null;
}