Package net.stinfoservices.pacifiq.shared.exception

Examples of net.stinfoservices.pacifiq.shared.exception.CustomException


    @Override
    public void updateName(Long id, String name) throws Exception {
        try {
            programServiceCore.updateName(id, name);
        } catch (JpaSystemException e) {
            throw new CustomException(MessageFormat.format(programServiceCore.getMessageResource().getString("EXCEPTION_PROGRAM_NAME_ALREADY_USED"),
                    name));
        }
    }
View Full Code Here


    @Override
    public ProgramDTO saveDocument(ProgramDTO document) throws Exception {
        try {
            return programServiceCore.saveDocument(document);
        } catch (JpaSystemException e) {
            throw new CustomException(MessageFormat.format(programServiceCore.getMessageResource().getString("EXCEPTION_PROGRAM_NAME_ALREADY_USED"),
                    document.getName()));
        }
    }
View Full Code Here

    public List<GenericTAA> findAll() throws Exception {
        try {
            return (Collections.unmodifiableList(entityManager.createQuery(
                    "SELECT o FROM " + IModel.DATABASE_PRE + "GenericTAA o ORDER BY o.licenseNumber ASC").getResultList()));
        } catch (Exception ex) {
            throw new CustomException(ex);
        }
    }
View Full Code Here

            String having = "having (o.licenseNumber, o.versionNumber) in (select t.licenseNumber, max(t.versionNumber) as versionNumber from GenericTAA t group by t.licenseNumber)";
            return (Collections.unmodifiableList(entityManager.createQuery(
                    "SELECT o FROM " + IModel.DATABASE_PRE + "GenericTAA o " + having + " ORDER BY o.licenseNumber ASC").getResultList()));

        } catch (Exception ex) {
            throw new CustomException(ex);
        }
    }
View Full Code Here

        try {
            return (Collections.unmodifiableList(entityManager
                    .createQuery("SELECT o FROM " + IModel.DATABASE_PRE + "GenericTAA o ORDER BY o.licenseNumber ASC").setFirstResult(firstResult)
                    .setMaxResults(maxResults).getResultList()));
        } catch (Exception ex) {
            throw new CustomException(ex);
        }
    }
View Full Code Here

            LOGGER.info(MessageFormat.format(ResourceBundle.getBundle("system").getString("OBJECT_WLN_SAVED"), this.getClass().getSimpleName(),
                    t.getLicenseNumber() + "-" + t.getVersionNumber()));

            return (t);
        } catch (Exception ex) {
            throw new CustomException(ex);
        }
    }
View Full Code Here

            entityManager.remove(ntaa);
            LOGGER.info(MessageFormat.format(ResourceBundle.getBundle("system").getString("OBJECT_WLN_DELETED"), this.getClass().getSimpleName(),
                    ntaa.getLicenseNumber() + "-" + ntaa.getVersionNumber()));
        } catch (Exception ex) {
            throw new CustomException(ex);
        }
    }
View Full Code Here

                c = result.get(0);
            }

            return (c);
        } catch (Exception ex) {
            throw new CustomException(ex);
        }
    }
View Full Code Here

        }

        try {
            return (entityManager.find(Alert.class, id));
        } catch (Exception ex) {
            throw new CustomException(ex);
        }
    }
View Full Code Here

    public List<Alert> findAll() throws Exception {
        try {
            return (Collections.unmodifiableList(entityManager.createQuery("SELECT o FROM " + IModel.DATABASE_PRE + "Alert o order by id")
                    .getResultList()));
        } catch (Exception ex) {
            throw new CustomException(ex);
        }
    }
View Full Code Here

TOP

Related Classes of net.stinfoservices.pacifiq.shared.exception.CustomException

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.