Examples of ExtendedNotFoundException


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

    }

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

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

    @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

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

    }

    @DELETE
    public void deleteUser() {
        if (null == userEntity) {
            throw new ExtendedNotFoundException("userid " + userid + "does not exist!");
        }
        TransactionManager.manage(new Transactional(em) {
            public void transact() {
                em.remove(userEntity);
            }
View Full Code Here

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

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

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

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

    @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

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

    }

    @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

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

        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
Copyright © 2018 www.massapi.com. 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.