Package com.intel.mtwilson.as.controller.exceptions

Examples of com.intel.mtwilson.as.controller.exceptions.NonexistentEntityException


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


            MwCertificateX509 mwCertificateX509;
            try {
                mwCertificateX509 = em.getReference(MwCertificateX509.class, id);
                mwCertificateX509.getId();
            } catch (EntityNotFoundException enfe) {
                throw new NonexistentEntityException("The mwCertificateX509 with id " + id + " no longer exists.", enfe);
            }
            em.remove(mwCertificateX509);
            em.getTransaction().commit();
        } finally {
                em.close();
View Full Code Here

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

            TblHosts tblHosts;
            try {
                tblHosts = em.getReference(TblHosts.class, id);
                tblHosts.getId();
            } catch (EntityNotFoundException enfe) {
                throw new NonexistentEntityException("The tblHosts with id " + id + " no longer exists.", enfe);
            }
            TblMle vmmMleId = tblHosts.getVmmMleId();
            if (vmmMleId != null) {
                vmmMleId.getTblHostsCollection().remove(tblHosts);
                em.merge(vmmMleId);
View Full Code Here

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

            TblLocationPcr tblLocationPcr;
            try {
                tblLocationPcr = em.getReference(TblLocationPcr.class, id);
                tblLocationPcr.getId();
            } catch (EntityNotFoundException enfe) {
                throw new NonexistentEntityException("The tblLocationPcr with id " + id + " no longer exists.", enfe);
            }
            em.remove(tblLocationPcr);
            em.getTransaction().commit();
        } finally {
                em.close();
View Full Code Here

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

            MwMleSource mwMleSource;
            try {
                mwMleSource = em.getReference(MwMleSource.class, id);
                mwMleSource.getId();
            } catch (EntityNotFoundException enfe) {
                throw new NonexistentEntityException("The mwMleSource with id " + id + " no longer exists.", enfe);
            }
            TblMle mleId = mwMleSource.getMleId();
            if (mleId != null) {
                mleId.getMwMleSourceCollection().remove(mwMleSource);
                em.merge(mleId);
View Full Code Here

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

            MwKeystore mwKeystore;
            try {
                mwKeystore = em.getReference(MwKeystore.class, id);
                mwKeystore.getId();
            } catch (EntityNotFoundException enfe) {
                throw new NonexistentEntityException("The mwKeystore with id " + id + " no longer exists.", enfe);
            }
            em.remove(mwKeystore);
            em.getTransaction().commit();
        } finally {
            em.close();
View Full Code Here

TOP

Related Classes of com.intel.mtwilson.as.controller.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.