@RobeService(group = "User", description = "Updates a single User matches with the given id.")
    @PATCH
    @UnitOfWork
    @Path(" {
    """
	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.
    """id}")
    public User merge(@RobeAuth Credentials credentials, @PathParam("id") String id, User model) {
        if (!id.equals(model.getOid()))
            throw new WebApplicationException(Response.status(412).build());
        User dest = userDao.findById(id);
        if (dest == null) {
            throw new WebApplicationException(Response.status(404).build());
        }
        Fields.mergeRight(model, dest);
        return userDao.update(dest);
    }
@RobeService(group = "User", description = "Updates a single User matches with the given id.")
    @PATCH
    @UnitOfWork
    @Path("{id}")
    public User merge(@RobeAuth Credentials credentials, @PathParam("id") String id, User model) {
        if (!id.equals(model.getOid()))
            throw new WebApplicationException(Response.status(412).build());
        User dest = userDao.findById(id);
        if (dest == null) {
            throw new WebApplicationException(Response.status(404).build());
        }
        Fields.mergeRight(model, dest);
        return userDao.update(dest);
    }
@ RobeService ( group = "User" , description = "Updates a single User matches with the given id." ) @ PATCH @ UnitOfWork @ Path ( "{id}" ) public User merge ( @ RobeAuth Credentials credentials , @ PathParam ( "id" ) String id , User model ) { if ( ! id . equals ( model . getOid ( ) ) ) throw new WebApplicationException ( Response . status ( 412 ) . build ( ) ) ; User dest = userDao . findById ( id ) ; if ( dest == null ) { throw new WebApplicationException ( Response . status ( 404 ) . build ( ) ) ; } Fields . mergeRight ( model , dest ) ; return userDao . update ( dest ) ; }
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.
Updates a single { @link User } matches with the given id . <p > Status Code : Not Found 404 Not Matches 412