Package org.glassfish.jersey.examples.bookmark_em.exception

Examples of org.glassfish.jersey.examples.bookmark_em.exception.ExtendedNotFoundException


    }

    @Path("bookmarks/")
    public BookmarksResource getBookmarksResource() {
        if (null == userEntity) {
            throw new ExtendedNotFoundException("userid " + userid + " does not exist!");
        }
        return new BookmarksResource(uriInfo, em, utx, this);
    }
View Full Code Here


    @GET
    @Produces("application/json")
    public JSONObject getUser() throws JSONException {
        if (null == userEntity) {
            throw new ExtendedNotFoundException("userid " + userid + "does not exist!");
        }
        return new JSONObject().
                put("userid", userEntity.getUserid()).
                put("username", userEntity.getUsername()).
                put("email", userEntity.getEmail()).
View Full Code Here

    }

    @DELETE
    public void deleteUser() {
        if (null == userEntity) {
            throw new ExtendedNotFoundException("userid " + userid + "does not exist!");
        }

        TransactionManager.manage(utx, new Transactional(em) {
            public void transact() {
                em.persist(userEntity);
View Full Code Here

        this.em = em;
        this.utx = utx;

        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);
    }
View Full Code Here

TOP

Related Classes of org.glassfish.jersey.examples.bookmark_em.exception.ExtendedNotFoundException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.