/**
  * Create a new recording
  *
  * @param recording Information about recording to create
  * @return Information about newly created recording including its generated identity
  */
 @POST
 @Consumes(MediaType.APPLICATION_JSON)
 @Produces(MediaType.APPLICATION_JSON)
 public RecordingEntity create(RecordingEntity recording) {
   try {
     transactionManager.begin();
     recording.setLastUpdated(new Date());
     recording.setLastUpdatedBy(super.CHANGED_BY);
     RecordingEntity createdEntity = super.createEntity(recording);
     getRepository().refresh(createdEntity);
     return new CopyHelper().copy(createdEntity, Expose.class);
   } catch (RuntimeException e) {
     transactionManager.setRollbackOnly();
     throw e;
   } finally {
     transactionManager.end();
   }
 }
 /**
  * Update an existing recording
  *
  * @param id Identity of recording
  * @param recording Information about recording
  * @return Information about recording
  */
 @PUT
 @Consumes(MediaType.APPLICATION_JSON)
 @Produces(MediaType.APPLICATION_JSON)
 @Path("/{id}")
 public RecordingEntity update(@PathParam("id") String id, RecordingEntity recording) {
   try {
     transactionManager.begin();
     recording.setLastUpdated(new Date());
     recording.setLastUpdatedBy(super.CHANGED_BY);
     RecordingEntity updatedEntity = super.updateEntity(id, recording);
     getRepository().refresh(updatedEntity);
     return new CopyHelper().copy(updatedEntity, Expose.class);
   } catch (RuntimeException e) {
     transactionManager.setRollbackOnly();
     throw e;
   } finally {
     transactionManager.end();
   }
 }