Package net.stinfoservices.pacifiq.server.model

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


        UzerDTO user = (UzerDTO) getSession().getAttribute("user");
        hasUpdateRights(user, id);

        AbstractTAA tAA = tAADAO.find(id);
        if (tAA instanceof SpecificTAA) {
            SpecificTAA sTAA = (SpecificTAA) tAA;
            sTAA.setDraftDate(draft);
            tAADAO.save(tAA);
        }
        alertManagement.alert(user);
    }
View Full Code Here


        UzerDTO user = (UzerDTO) getSession().getAttribute("user");
        hasUpdateRights(user, id);

        AbstractTAA tAA = tAADAO.find(id);
        if (tAA instanceof SpecificTAA) {
            SpecificTAA sTAA = (SpecificTAA) tAA;
            sTAA.setDateOfSubmissionToDoS(submissionToDoS);
            tAADAO.save(tAA);
        }
        alertManagement.alert(user);
    }
View Full Code Here

        UzerDTO user = (UzerDTO) getSession().getAttribute("user");
        hasUpdateRights(user, id);

        AbstractTAA tAA = tAADAO.find(id);
        if (tAA instanceof SpecificTAA) {
            SpecificTAA sTAA = (SpecificTAA) tAA;
            sTAA.setDateOfApprovalByDoS(approvedByDoS);
            tAADAO.save(tAA);
        }
        alertManagement.alert(user);
    }
View Full Code Here

        UzerDTO user = (UzerDTO) getSession().getAttribute("user");
        hasUpdateRights(user, id);

        AbstractTAA tAA = tAADAO.find(id);
        if (tAA instanceof SpecificTAA) {
            SpecificTAA sTAA = (SpecificTAA) tAA;
            sTAA.setFullExecutionDate(fullyExecuted);
            tAADAO.save(tAA);
        }
        alertManagement.alert(user);
    }
View Full Code Here

            // changing version, backup last one ?
            document.setId(null);
        }
        if (document.getId() == null) {
            if (document.getSpecific()) {
                taa = new SpecificTAA();
            } else {
                taa = new GenericTAA();
            }
        }
View Full Code Here

                taa.getItems().add(itemDAO.find(itemDto.getId()));
            }
        }

        if (taa instanceof SpecificTAA) {
            final SpecificTAA staa = (SpecificTAA) taa;
            staa.setDraftDate(dto.getDraftDate());
            staa.setDateOfSubmissionToDoS(dto.getDateOfSubmissionToDoS());
            staa.setDateOfApprovalByDoS(dto.getDateOfApprovalByDoS());
            staa.setFullExecutionDate(dto.getFullExecutionDate());
        } else if (taa instanceof GenericTAA) {
            final GenericTAA gtaa = (GenericTAA) taa;
            gtaa.setGcCOMSATStaffDate(dto.getGcCOMSATStaffDate());
            gtaa.setGcCOMSATApprovalDate(dto.getGcCOMSATApprovalDate());
        }
View Full Code Here

            List<SpecificTAA> result = entityManager
                    .createQuery(
                            "SELECT o FROM " + IModel.DATABASE_PRE
                                    + "SpecificTAA o WHERE (o.licenseNumber = :licenseNumber) ORDER BY o.versionNumber ASC")
                    .setParameter("licenseNumber", licenseNumber).getResultList();
            SpecificTAA t = null;

            if (result.size() > 0) {
                t = result.get(0);
            }
View Full Code Here

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

        try {
            SpecificTAA t = entityManager.merge(taa);

            entityManager.persist(t);
            t = entityManager.find(SpecificTAA.class, t.getId());
            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

        if (taa == null) {
            return;
        }

        try {
            SpecificTAA ntaa = entityManager.merge(taa);

            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

    @Test
    @DatabaseSetup(value = UPDATESPECIFIC_DATASET)
    @DatabaseTearDown(value = UPDATESPECIFIC_DATASET, type = DatabaseOperation.DELETE)
    public void testFindSpecific() throws Exception {
        AbstractTAA taa = taaDAO.find(1L);
        SpecificTAA taac = new SpecificTAA();

        taac.setId(1L);
        taac.setLicenseNumber(UPDATED_LICENSENUMBER);
        taac.setVersion(2);
        assertNotNull(taa);
        assertSame(2, taa.getVersion());
        assertEquals(taac.getLicenseNumber(), taa.getLicenseNumber());
        assertEquals(taac, taa);
        assertNull(taaDAO.find(2L));
        assertNull(taaDAO.find(0L));
    }
View Full Code Here

TOP

Related Classes of net.stinfoservices.pacifiq.server.model.SpecificTAA

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.