Examples of CustomException


Examples of com.clojurebook.CustomException

import com.clojurebook.CustomException;
import clojure.lang.PersistentHashMap;

public class BatchJob {
    private static void performOperation (String jobId, String priority) {
        throw new CustomException(PersistentHashMap.create("jobId", jobId, "priority", priority),
                "Operation failed");
    }
View Full Code Here

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

            alertManagement.alert(user);
            DSP5 dsp5 = dSP5DAO.find(id);
            dsp5.setLicenseNumber(licenseNumber);
            dSP5DAO.save(dsp5);
        } catch (JpaSystemException e) {
            throw new CustomException(MessageFormat.format(
                    LocaleManager.getInstance(getSession()).getMessageResource(getClass()).getString("EXCEPTION_LICENSE_NUMBER_ALREADY_EXISTS"),
                    licenseNumber));
        }
    }
View Full Code Here

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

            applyDiffDSP5(dsp5, dto);
            // just for an ID insert ?
            Long id = dSP5DAO.save(dsp5).getId();
            return id;
        } catch (JpaSystemException e) {
            throw new CustomException(MessageFormat.format(
                    LocaleManager.getInstance(getSession()).getMessageResource(getClass()).getString("EXCEPTION_LICENSE_NUMBER_ALREADY_EXISTS"),
                    dto.getLicenseNumber()));
        }
    }
View Full Code Here

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

        if (hasRights) {
            return;
        }

        throw new CustomException(LocaleManager.getInstance(getSession()).getMessageResource(getClass())
                .getString("EXCEPTION_ACCESS_DENIED_BECAUSE_OF_RIGHTS_LICENSE_EDITION"));
    }
View Full Code Here

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

        if (hasRights) {
            return;
        }

        throw new CustomException(LocaleManager.getInstance(getSession()).getMessageResource(getClass())
                .getString("EXCEPTION_ACCESS_DENIED_BECAUSE_OF_RIGHTS_LICENSE_EDITION"));
    }
View Full Code Here

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

        }

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

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

            Uzer result = (Uzer) entityManager.createQuery("SELECT o FROM " + IModel.DATABASE_PRE + "Uzer o WHERE o.email = :email")
                    .setParameter("email", email).getSingleResult();

            return (result);
        } catch (Exception ex) {
            throw new CustomException(getClass(), "No user was found with the corresponding email address!", ex);
        }
    }
View Full Code Here

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

                                    + "Uzer o LEFT JOIN FETCH o.programsWithConsultationRights LEFT JOIN FETCH o.programsWithEditionRights LEFT JOIN FETCH o.profile WHERE o.email = :email")
                    .setParameter("email", email).getSingleResult();

            return (result);
        } catch (Exception ex) {
            throw new CustomException(getClass(), "No user was found with the corresponding email address!", ex);
        }
    }
View Full Code Here

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

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

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

    public List<Uzer> findEntries(int firstResult, int maxResults) throws Exception {
        try {
            return (Collections.unmodifiableList(entityManager.createQuery("SELECT o FROM " + IModel.DATABASE_PRE + "Uzer o ORDER BY o.email ASC")
                    .setFirstResult(firstResult).setMaxResults(maxResults).getResultList()));
        } catch (Exception ex) {
            throw new CustomException(ex);
        }
    }
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.