robe-admin/src/main/java/io/robe/admin/resources/UserResource.java
@RobeService(group = "User", description = "Updates a single User matches with the given id.")
    @PUT
    @UnitOfWork
    @Path("{id}")
    public User update(@RobeAuth Credentials credentials, @PathParam("id") String id, @Valid User model) {

        if (!id.equals(model.getOid())) {
            throw new WebApplicationException(Response.status(412).build());
        }
        User entity = userDao.findById(id);
        if (entity == null) {
            throw new WebApplicationException(Response.status(404).build());
        }
        userDao.detach(entity);
        return userDao.update(model);
    }
@RobeService(group = "User", description = "Updates a single User matches with the given id.")
    @PUT
    @UnitOfWork
    @Path("{id}")
    public User update(@RobeAuth Credentials credentials, @PathParam("id") String id, @Valid User model) {

        if (!id.equals(model.getOid())) {
            throw new WebApplicationException(Response.status(412).build());
        }
        User entity = userDao.findById(id);
        if (entity == null) {
            throw new WebApplicationException(Response.status(404).build());
        }
        userDao.detach(entity);
        return userDao.update(model);
    }
Updates a single {@link User} matches with the given id.
<p>
Status Code:
Not Found  404
Not Matches 412

@param credentials injected by {@link RobeAuth} annotation for authentication.
@param id          This is the oid of {@link User}
@param model       data of {@link User}
@return Updates a single {@link User} matches with the given id.