Package jpa.controllers.exceptions

Examples of jpa.controllers.exceptions.NonexistentEntityException


        } catch (Exception ex) {
            String msg = ex.getLocalizedMessage();
            if (msg == null || msg.length() == 0) {
                Integer id = comments.getId();
                if (findComments(id) == null) {
                    throw new NonexistentEntityException("The comments with id " + id + " no longer exists.");
                }
            }
            throw ex;
        } finally {
            if (em != null) {
View Full Code Here


            Comments comments;
            try {
                comments = em.getReference(Comments.class, id);
                comments.getId();
            } catch (EntityNotFoundException enfe) {
                throw new NonexistentEntityException("The comments with id " + id + " no longer exists.", enfe);
            }
            List<String> illegalOrphanMessages = null;
            Commentrates commentratesOrphanCheck = comments.getCommentrates();
            if (commentratesOrphanCheck != null) {
                if (illegalOrphanMessages == null) {
View Full Code Here

        } catch (Exception ex) {
            String msg = ex.getLocalizedMessage();
            if (msg == null || msg.length() == 0) {
                Integer id = enrollment.getId();
                if (findEnrollment(id) == null) {
                    throw new NonexistentEntityException("The enrollment with id " + id + " no longer exists.");
                }
            }
            throw ex;
        } finally {
            if (em != null) {
View Full Code Here

            Enrollment enrollment;
            try {
                enrollment = em.getReference(Enrollment.class, id);
                enrollment.getId();
            } catch (EntityNotFoundException enfe) {
                throw new NonexistentEntityException("The enrollment with id " + id + " no longer exists.", enfe);
            }
            List<String> illegalOrphanMessages = null;
            Courserates courseratesOrphanCheck = enrollment.getCourserates();
            if (courseratesOrphanCheck != null) {
                if (illegalOrphanMessages == null) {
View Full Code Here

        } catch (Exception ex) {
            String msg = ex.getLocalizedMessage();
            if (msg == null || msg.length() == 0) {
                Integer id = tagcorrelations.getId();
                if (findTagcorrelations(id) == null) {
                    throw new NonexistentEntityException("The tagcorrelations with id " + id + " no longer exists.");
                }
            }
            throw ex;
        } finally {
            if (em != null) {
View Full Code Here

            Tagcorrelations tagcorrelations;
            try {
                tagcorrelations = em.getReference(Tagcorrelations.class, id);
                tagcorrelations.getId();
            } catch (EntityNotFoundException enfe) {
                throw new NonexistentEntityException("The tagcorrelations with id " + id + " no longer exists.", enfe);
            }
            Tag referencedTagId = tagcorrelations.getReferencedTagId();
            if (referencedTagId != null) {
                referencedTagId.getTagcorrelationsList().remove(tagcorrelations);
                referencedTagId = em.merge(referencedTagId);
View Full Code Here

        } catch (Exception ex) {
            String msg = ex.getLocalizedMessage();
            if (msg == null || msg.length() == 0) {
                Integer id = commentrates.getId();
                if (findCommentrates(id) == null) {
                    throw new NonexistentEntityException("The commentrates with id " + id + " no longer exists.");
                }
            }
            throw ex;
        } finally {
            if (em != null) {
View Full Code Here

            Commentrates commentrates;
            try {
                commentrates = em.getReference(Commentrates.class, id);
                commentrates.getId();
            } catch (EntityNotFoundException enfe) {
                throw new NonexistentEntityException("The commentrates with id " + id + " no longer exists.", enfe);
            }
            Comments comments = commentrates.getComments();
            if (comments != null) {
                comments.setCommentrates(null);
                comments = em.merge(comments);
View Full Code Here

        } catch (Exception ex) {
            String msg = ex.getLocalizedMessage();
            if (msg == null || msg.length() == 0) {
                Integer id = coursetag.getId();
                if (findCoursetag(id) == null) {
                    throw new NonexistentEntityException("The coursetag with id " + id + " no longer exists.");
                }
            }
            throw ex;
        } finally {
            if (em != null) {
View Full Code Here

            Coursetag coursetag;
            try {
                coursetag = em.getReference(Coursetag.class, id);
                coursetag.getId();
            } catch (EntityNotFoundException enfe) {
                throw new NonexistentEntityException("The coursetag with id " + id + " no longer exists.", enfe);
            }
            List<String> illegalOrphanMessages = null;
            List<Tagrates> tagratesListOrphanCheck = coursetag.getTagratesList();
            for (Tagrates tagratesListOrphanCheckTagrates : tagratesListOrphanCheck) {
                if (illegalOrphanMessages == null) {
View Full Code Here

TOP

Related Classes of jpa.controllers.exceptions.NonexistentEntityException

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.