Package net.stinfoservices.pacifiq.server.model

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


        dsp5.setEndDate(dto.getEndDate());
        dsp5.setFreeText(dto.getFreeText());
        dsp5.getPrograms().clear();
        if (dto.getPrograms() != null) {
            for (Long programId : dto.getPrograms().keySet()) {
                Program program = programDAO.find(programId);
                dsp5.getPrograms().add(program);
            }
        }

        if (dto.getApplicant() == null) {
View Full Code Here


        }

        taa.getRelatedPrograms().clear();
        if (dto.getPrograms() != null) {
            for (Long programId : dto.getPrograms().keySet()) {
                Program program = programDAO.find(programId);
                taa.getRelatedPrograms().add(program);
            }
        }

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

    @DatabaseTearDown(value = UPDATE_DATASET, type = DatabaseOperation.DELETE)
    @Override
    public void testFind() throws Exception {
        Consumption consumption = consumptionDAO.find(1L);
        Consumption consumptionc = new Consumption();
        Program program = new Program();
        Item item = new Item();
        DSP5 dsp5 = new DSP5();

        consumptionc.setId(1L);
        consumptionc.setQuantity(5);
        program.setId(1L);
        program.setName(PROGRAM_NAME);
        program.setVersion(1);
        consumptionc.setProgram(program);
        dsp5.setId(1L);
        dsp5.setLicenseNumber(DSP5_LICENSE_NUMBER);
        dsp5.setVersion(1);
        item.setId(1L);
View Full Code Here

    @DatabaseTearDown(value = UPDATE_DATASET, type = DatabaseOperation.DELETE)
    @Override
    public void testFindAll() throws Exception {
        List<Consumption> consumptions = consumptionDAO.findAll();
        Consumption consumption = new Consumption();
        Program program = new Program();
        Item item = new Item();
        DSP5 dsp5 = new DSP5();

        consumption.setId(1L);
        consumption.setQuantity(5);
        program.setId(1L);
        program.setName(PROGRAM_NAME);
        program.setVersion(1);
        consumption.setProgram(program);
        dsp5.setId(1L);
        dsp5.setLicenseNumber(DSP5_LICENSE_NUMBER);
        dsp5.setVersion(1);
        item.setId(1L);
View Full Code Here

    @DatabaseTearDown(value = UPDATE_DATASET, type = DatabaseOperation.DELETE)
    @Override
    public void testFindEntries() throws Exception {
        List<Consumption> consumptions = consumptionDAO.findEntries(0, 1);
        Consumption consumption = new Consumption();
        Program program = new Program();
        Item item = new Item();
        DSP5 dsp5 = new DSP5();

        consumption.setId(1L);
        consumption.setQuantity(5);
        program.setId(1L);
        program.setName(PROGRAM_NAME);
        program.setVersion(1);
        consumption.setProgram(program);
        dsp5.setId(1L);
        dsp5.setLicenseNumber(DSP5_LICENSE_NUMBER);
        dsp5.setVersion(1);
        item.setId(1L);
View Full Code Here

            DatabaseConnection connection = new DatabaseConnection(dataSource.getConnection());
            IDataSet expectedDataSet = new FlatXmlDataSetBuilder().build(this.getClass()
                    .getResource("/dbunit/dao/admin/consumption-create_no-id.xml").openStream());
            Consumption consumption = new Consumption();
            Consumption nconsumption;
            Program program = new Program();
            Item item = new Item();
            DSP5 dsp5 = new DSP5();

            consumption.setId(null);
            consumption.setQuantity(1);
            program.setId(1L);
            program.setName(PROGRAM_NAME);
            program.setVersion(1);
            consumption.setProgram(program);
            dsp5.setId(1L);
            dsp5.setLicenseNumber(DSP5_LICENSE_NUMBER);
            dsp5.setVersion(1);
            item.setId(1L);
View Full Code Here

        try {
            DatabaseConnection connection = new DatabaseConnection(dataSource.getConnection());
            IDataSet expectedDataSet = new FlatXmlDataSetBuilder().build(this.getClass().getResource(UPDATE_DATASET).openStream());
            Consumption consumption = new Consumption();
            Consumption nconsumption;
            Program program = new Program();
            Item item = new Item();
            DSP5 dsp5 = new DSP5();

            consumption.setId(1L);
            consumption.setQuantity(5);
            program.setId(1L);
            program.setName(PROGRAM_NAME);
            program.setVersion(1);
            consumption.setProgram(program);
            dsp5.setId(1L);
            dsp5.setLicenseNumber(DSP5_LICENSE_NUMBER);
            dsp5.setVersion(1);
            item.setId(1L);
View Full Code Here

    @ExpectedDatabase(value = EMPTY_DATASET, assertionMode = DatabaseAssertionMode.NON_STRICT)
    @DatabaseTearDown(value = EMPTY_DATASET, type = DatabaseOperation.DELETE)
    @Override
    public void testRemove() throws Exception {
        Consumption consumption = new Consumption();
        Program program = new Program();
        Item item = new Item();
        DSP5 dsp5 = new DSP5();

        consumption.setId(1L);
        consumption.setQuantity(1);
        program.setId(1L);
        program.setName(PROGRAM_NAME);
        program.setVersion(1);
        consumption.setProgram(program);
        dsp5.setId(1L);
        dsp5.setLicenseNumber(DSP5_LICENSE_NUMBER);
        dsp5.setVersion(1);
        item.setId(1L);
View Full Code Here

    @DatabaseSetup(value = UPDATE_DATASET)
    @ExpectedDatabase(value = EMPTY_DATASET, assertionMode = DatabaseAssertionMode.NON_STRICT)
    @DatabaseTearDown(value = EMPTY_DATASET, type = DatabaseOperation.DELETE)
    public void testRemove2() throws Exception {
        Consumption consumption = new Consumption();
        Program program = new Program();
        Item item = new Item();
        DSP5 dsp5 = new DSP5();

        consumption.setId(1L);
        consumption.setQuantity(5);
        program.setId(1L);
        program.setName(PROGRAM_NAME);
        program.setVersion(1);
        consumption.setProgram(program);
        dsp5.setId(1L);
        dsp5.setLicenseNumber(DSP5_LICENSE_NUMBER);
        dsp5.setVersion(1);
        item.setId(1L);
View Full Code Here

        } catch (Exception aae1) {
            ServiceSecurityHelper.hasAuthority(ProfileHelper.SPECIFIC_PROGRAMS_CONSULTATION, getSession());
            hasSpecificRights = true;
        }
        if (hasRights) {
            Program programFound = programDAO.find(programId);

            if (programFound != null) {
                program = new ProgramDTO(programFound, DTOPath.PROGRAM_BOARD);
            }
        } else if (hasSpecificRights) {
            // Uzer has already somes PROGRAM_NAME lists
            UzerDTO user = (UzerDTO) getSession().getAttribute("user");

            if (user != null) {
                for (ProgramDTO dto : user.getProgramsWithConsultationRights()) {
                    if (dto.getId().equals(programId)) {

                        // convert from PROGRAM_NAME to PROGRAM_BOARD
                        Program programFound = programDAO.find(programId);
                        program = new ProgramDTO(programFound, DTOPath.PROGRAM_BOARD);

                        break;
                    }
                }
View Full Code Here

TOP

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

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.