Package net.stinfoservices.pacifiq.server.model

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


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

        AbstractTAA tAA = tAADAO.find(id);
        if (tAA instanceof GenericTAA) {
            GenericTAA sTAA = (GenericTAA) tAA;
            sTAA.setGcCOMSATStaffDate(gcCOMSATStaffDate);
            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 GenericTAA) {
            GenericTAA sTAA = (GenericTAA) tAA;
            sTAA.setGcCOMSATApprovalDate(gcCOMSATApprovalDate);
            tAADAO.save(tAA);
        }
        alertManagement.alert(user);
    }
View Full Code Here

        }
        if (document.getId() == null) {
            if (document.getSpecific()) {
                taa = new SpecificTAA();
            } else {
                taa = new GenericTAA();
            }
        }

        // Generic/Specific
        applyDiffTAA(taa, document);
View Full Code Here

            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

    @DatabaseSetup(value = UPDATEGENERIC_DATASET)
    @DatabaseTearDown(value = UPDATEGENERIC_DATASET, type = DatabaseOperation.DELETE)
    @Override
    public void testFind() throws Exception {
        AbstractTAA taa = taaDAO.find(1L);
        GenericTAA taac = new GenericTAA();

        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

    @DatabaseSetup(value = UPDATEGENERIC_DATASET)
    @DatabaseTearDown(value = UPDATEGENERIC_DATASET, type = DatabaseOperation.DELETE)
    @Override
    public void testFindAll() throws Exception {
        List<AbstractTAA> taas = taaDAO.findAll();
        GenericTAA taa = new GenericTAA();

        taa.setId(1L);
        taa.setLicenseNumber(UPDATED_LICENSENUMBER);
        taa.setVersion(2);
        assertSame(1, taas.size());
        assertNotNull(taas.get(0));
        assertEquals(taas.get(0), taa);
    }
View Full Code Here

    @DatabaseSetup(value = UPDATEGENERIC_DATASET)
    @DatabaseTearDown(value = UPDATEGENERIC_DATASET, type = DatabaseOperation.DELETE)
    @Override
    public void testFindEntries() throws Exception {
        List<AbstractTAA> taas = taaDAO.findEntries(0, 1);
        GenericTAA taa = new GenericTAA();

        taa.setId(1L);
        taa.setLicenseNumber(UPDATED_LICENSENUMBER);
        taa.setVersion(2);
        assertSame(1, taas.size());
        assertNotNull(taas.get(0));
        assertEquals(taas.get(0), taa);
        taas = taaDAO.findEntries(0, 0);
        assertSame(0, taas.size());
View Full Code Here

    public void testSave() throws Exception {
        try {
            DatabaseConnection connection = new DatabaseConnection(dataSource.getConnection());
            IDataSet expectedDataSet = new FlatXmlDataSetBuilder().build(this.getClass().getResource("/dbunit/dao/admin/taa-create1_no-id.xml")
                    .openStream());
            GenericTAA taa = new GenericTAA();
            AbstractTAA ntaa;

            taa.setId(null);
            taa.setLicenseNumber(DEFAULT_LICENSENUMBER);
            taa.setVersion(1);
            ntaa = taaDAO.save(taa);
            assertEquals(ntaa.getLicenseNumber(), taa.getLicenseNumber());
            entityManager.getTransaction().commit();
            DatabaseAssertionMode.NON_STRICT.getDatabaseAssertion().assertEquals(expectedDataSet,
                    connection.createDataSet(expectedDataSet.getTableNames()));
            connection.close();
        } catch (DatabaseUnitException e) {
View Full Code Here

    @DatabaseTearDown(value = UPDATEGENERIC_DATASET, type = DatabaseOperation.DELETE_ALL)
    public void testSave2() throws Exception {
        try {
            DatabaseConnection connection = new DatabaseConnection(dataSource.getConnection());
            IDataSet expectedDataSet = new FlatXmlDataSetBuilder().build(this.getClass().getResource(UPDATEGENERIC_DATASET).openStream());
            GenericTAA taa = new GenericTAA();
            AbstractTAA ntaa;

            taa.setId(1L);
            taa.setLicenseNumber(UPDATED_LICENSENUMBER);
            taa.setVersion(1);
            ntaa = taaDAO.save(taa);
            assertEquals(ntaa.getLicenseNumber(), taa.getLicenseNumber());
            entityManager.getTransaction().commit();
            DatabaseAssertionMode.NON_STRICT.getDatabaseAssertion().assertEquals(expectedDataSet,
                    connection.createDataSet(expectedDataSet.getTableNames()));
            connection.close();
        } catch (DatabaseUnitException e) {
View Full Code Here

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

        taa.setId(null);
        taa.setLicenseNumber(DEFAULT_LICENSENUMBER);
        taa.setVersion(1);
        taaDAO.remove(taa);
        entityManager.getTransaction().commit();
    }
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.