public BookmarkResource(UriInfo uriInfo, EntityManager em, UserEntity userEntity, String bmid) {
this.uriInfo = uriInfo;
this.em = em;
bookmarkEntity = em.find(BookmarkEntity.class, new BookmarkEntityPK(bmid, userEntity.getUserid()));
if (null == bookmarkEntity) {
throw new ExtendedNotFoundException("bookmark with userid=" +
userEntity.getUserid() + " and bmid=" +
bmid + " not found\n");
}
bookmarkEntity.setUserEntity(userEntity);
}