Package net.stinfoservices.pacifiq.server.model

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


    @Test
    @DatabaseSetup(value = UPDATEGENERIC_DATASET)
    @ExpectedDatabase(value = EMPTY_DATASET, assertionMode = DatabaseAssertionMode.NON_STRICT)
    @DatabaseTearDown(value = EMPTY_DATASET, type = DatabaseOperation.DELETE)
    public void testRemove2() throws Exception {
        GenericTAA taa = new GenericTAA();

        taa.setId(1L);
        taa.setLicenseNumber(UPDATED_LICENSENUMBER);
        taa.setVersion(2);
        taaDAO.remove(taa);
        entityManager.getTransaction().commit();
    }
View Full Code Here


    @Test
    public void testClone() throws Exception {
        AbstractTAA taa = taaDAO.find(1L);
        assertNotNull(taa);
        assertTrue(taa instanceof GenericTAA);
        GenericTAA gTAA = (GenericTAA) taa;

        TAADTO gTaaDocument = new TAADTO(gTAA, DTOPath.TAA_DOC);
        assertFalse(gTaaDocument.getSpecific());

        assertEquals(gTaaDocument.getItems().size(), 2);
View Full Code Here

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

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

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

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

            entityManager.persist(t);
            t = entityManager.find(GenericTAA.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 {
            GenericTAA 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

            dateOfSubmissionToDoS = staa.getDateOfSubmissionToDoS();
            dateOfApprovalByDoS = staa.getDateOfApprovalByDoS();
            fullExecutionDate = staa.getFullExecutionDate();

        } else if (taa instanceof GenericTAA) {
            final GenericTAA gtaa = (GenericTAA) taa;
            specific = false;
            gcCOMSATStaffDate = gtaa.getGcCOMSATStaffDate();
            gcCOMSATApprovalDate = gtaa.getGcCOMSATApprovalDate();
        }
    }
View Full Code Here

TOP

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

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.