Examples of DSP5


Examples of net.stinfoservices.pacifiq.server.model.DSP5

    public void updateLicenseNumber(Long id, String licenseNumber) throws Exception {
        try {
            UzerDTO user = (UzerDTO) getSession().getAttribute("user");
            hasUpdateRights(user, id);
            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.server.model.DSP5

    @Override
    @Transactional(readOnly = false)
    public void updateApplicant(Long id, Long idApplicant) throws Exception {
        UzerDTO user = (UzerDTO) getSession().getAttribute("user");
        hasUpdateRights(user, id);
        DSP5 dsp5 = dSP5DAO.find(id);
        ConcreteBusinessPartner applicant = concreteBusinessPartnerDAO.find(idApplicant);
        dsp5.setApplicant(applicant);
        dSP5DAO.save(dsp5);
        alertManagement.alert(user);
    }
View Full Code Here

Examples of net.stinfoservices.pacifiq.server.model.DSP5

    @Override
    @Transactional(readOnly = false)
    public void updateDateOfIssue(Long id, Date dateIssued) throws Exception {
        UzerDTO user = (UzerDTO) getSession().getAttribute("user");
        hasUpdateRights(user, id);
        DSP5 dsp5 = dSP5DAO.find(id);
        dsp5.setDateOfIssue(dateIssued);
        dSP5DAO.save(dsp5);
        alertManagement.alert(user);
    }
View Full Code Here

Examples of net.stinfoservices.pacifiq.server.model.DSP5

    @Override
    @Transactional(readOnly = false)
    public void updateEndDate(Long id, Date endDate) throws Exception {
        UzerDTO user = (UzerDTO) getSession().getAttribute("user");
        hasUpdateRights(user, id);
        DSP5 dsp5 = dSP5DAO.find(id);
        dsp5.setEndDate(endDate);
        dSP5DAO.save(dsp5);
        alertManagement.alert(user);
    }
View Full Code Here

Examples of net.stinfoservices.pacifiq.server.model.DSP5

    @Transactional(readOnly = false)
    public void deleteDocument(Long id) throws Exception {
        ServiceSecurityHelper.hasAuthority(ProfileHelper.LICENSES_EDITION, getSession());

        UzerDTO user = (UzerDTO) getSession().getAttribute("user");
        DSP5 dsp5 = dSP5DAO.find(id);
        dSP5DAO.remove(dsp5);
        alertManagement.alert(user);
    }
View Full Code Here

Examples of net.stinfoservices.pacifiq.server.model.DSP5

            ServiceSecurityHelper.hasAuthority(ProfileHelper.LICENSES_EDITION, getSession());
        } catch (Exception e) {
            readOnly = true;
        }

        DSP5 dsp5 = dSP5DAO.find(id);
        DSP5DTO dto = new DSP5DTO(dsp5, DTOPath.DSP5_DOC);
        dto.setOverConsumption(isConsumedItemCountTooBig(dsp5));
        if (readOnly) {
            dto.freeze();
        }
View Full Code Here

Examples of net.stinfoservices.pacifiq.server.model.DSP5

            ServiceSecurityHelper.hasAuthority(ProfileHelper.LICENSES_EDITION, getSession());

            UzerDTO user = (UzerDTO) getSession().getAttribute("user");
            alertManagement.alert(user);
            // TODO : manage new BusinessPartner also !
            DSP5 dsp5 = (dto.getId() == null ? new DSP5() : dSP5DAO.find(dto.getId()));
            applyDiffDSP5(dsp5, dto);
            // just for an ID insert ?
            Long id = dSP5DAO.save(dsp5).getId();
            return id;
        } catch (JpaSystemException e) {
View Full Code Here

Examples of net.stinfoservices.pacifiq.server.model.DSP5

        }

        taa.getDsp5s().clear();
        if (dto.getDsp5s() != null) {
            for (Long dsp5Id : dto.getDsp5s().keySet()) {
                DSP5 dsp5 = dSP5DAO.find(dsp5Id);
                taa.getDsp5s().add(dsp5);
            }
        }

        taa.getRelatedDocuments().clear();
View Full Code Here

Examples of net.stinfoservices.pacifiq.server.model.DSP5

        if (dsp5 == null) {
            return (null);
        }

        try {
            DSP5 d = entityManager.merge(dsp5);

            entityManager.persist(d);
            d = entityManager.find(DSP5.class, d.getId());
            LOGGER.info(MessageFormat.format(ResourceBundle.getBundle("system").getString("OBJECT_WLN_SAVED"), this.getClass().getSimpleName(),
                    d.getLicenseNumber()));

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

Examples of net.stinfoservices.pacifiq.server.model.DSP5

        if (dsp5 == null) {
            return;
        }

        try {
            DSP5 ndsp5 = entityManager.merge(dsp5);

            entityManager.remove(ndsp5);
            LOGGER.info(MessageFormat.format(ResourceBundle.getBundle("system").getString("OBJECT_WLN_DELETED"), this.getClass().getSimpleName(),
                    ndsp5.getId()));
        } 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.