return data;
}
public static BackupJobDescription deserialize( Map<String, Object> data )
{
BackupJobDescription desc = new BackupJobDescription();
if ( data.containsKey( ID_KEY ) )
{
try
{
try
{
desc.setId( (Integer) data.get( ID_KEY ) );
}
catch ( ClassCastException e )
{
desc.setId( Integer.valueOf( (String) data.get( ID_KEY ) ) );
}
}
catch ( Exception e )
{
desc.setId( null );
}
}
else
{
desc.setId( null );
}
desc.setName( (String) data.get( NAME_KEY ) );
desc.setCronExpression( (String) data.get( CRON_EXPRESSION_KEY ) );
desc.setPath( (String) data.get( BACKUP_PATH_KEY ) );
desc.setAutoFoundation( (Boolean) data.get( AUTO_FOUNDATION_KEY ) );
return desc;
}