code: public Response replace(@PathParam("id") final URI_ID id, @NotNull @Valid final MODEL model) throws Exception {
          final MODEL_ID mId = tryConvertId(id);
          matchedReplace(mId, model);
          BeanDescriptor descriptor = getModelBeanDescriptor();
          descriptor.convertSetId(mId, (EntityBean) model);
          EbeanUtils.forceUpdateAllProperties(server, model);
  
          final Response.ResponseBuilder builder = Response.noContent();
          executeTx(t -> {
              preReplaceModel(model);
              replaceModel(model);
              postReplaceModel(model);
          }, t -> {
              logger().debug("not found model record, insert a model record.");
              preInsertModel(model);
              insertModel(model);
              postInsertModel(model);
              builder.status(Response.Status.CREATED).location(buildLocationUri(mId, true));
          });
          return builder.build();
      }
docs: replace or insert a model.
  <br>
  success replace status 204
  <br>
  fail replace but inserted status 201
  
  @param id    the unique id of the model
  @param model the model to update
  @return a {@link javax.ws.rs.core.Response} object.
  @throws java.lang.Exception if any.
  @see javax.ws.rs.PUT
  @see AbstractModelResource#replace