code: public <T> T update(T entity) {
  		if (entity == null) {
  			throw new ApitraryOrmException("Cannot update null entity");
  		}
  
  		log.debug("Updating " + entity.getClass());
  
  		PutRequest request = new PutRequest();
  		request.setEntity(resolveApitraryEntity(entity));
  		request.setId(resolveApitraryEntityId(entity));
  
  		String payload = marshall(entity);
  
  		request.setRequestPayload(payload);
  
  		PutResponse response = resolveApitraryClient().send(request);
  
  		if (HttpStatus.No_Content.ordinal() != response.getStatusCode()) {
  			if (HttpStatus.Not_Found.ordinal() == response.getStatusCode()) {
  				throw new ApitraryOrmUpdateException("Cannot update object: object with given id does not exist.");
  			} else {
  				String statusMessage = (String) new PutResponseUnmarshaller().unMarshall(response, entity);
  				throw new ApitraryOrmUpdateException(statusMessage);
  			}
  		}
  		return entity;
  	}
docs: <p>
  update.
  </p>
  
  @param entity
  a T object.
  @param <T>
  a T object.
  @return a T object.