Package net.stinfoservices.pacifiq.server.model

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


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

        bp.setId(1L);
        bp.setName(UPDATED_BUSINESSPARTNER_NAME);
        bp.setVersion(2);
        bpDAO.remove(bp);
    }
View Full Code Here


     *             if an error occurs in the DAO while requesting the database.
     */
    private void applyDiffCBP(ConcreteBusinessPartner cbp, ConcreteBusinessPartnerDTO dto) throws Exception {
        // setting null instead of edited id one can perturb, do not set id here. cbp.setId(dto.getId());
        cbp.setAddress(dto.getAddress());
        BusinessPartner bp = businessPartnerDAO.find(dto.getBusinessPartner().getId());
        cbp.setBusinessPartner(bp);
        cbp.setCountry(dto.getCountry());
    }
View Full Code Here

    @Override
    public void testFind() throws Exception {
        DSP5 dsp5 = dsp5DAO.find(1L);
        DSP5 dsp5c = new DSP5();
        ConcreteBusinessPartner cbp = new ConcreteBusinessPartner();
        BusinessPartner bp = new BusinessPartner();
        Set<ConcreteBusinessPartner> consignees = new HashSet<ConcreteBusinessPartner>();

        bp.setId(1L);
        bp.setName(BUSINESSPARTNER_NAME);
        bp.setVersion(1);
        cbp.setId(1L);
        cbp.setCountry(CONCRETEBUSINESSPARTNER_COUNTRY);
        cbp.setBusinessPartner(bp);
        cbp.setVersion(1);
        consignees.add(cbp);
View Full Code Here

    @Override
    public void testFindAll() throws Exception {
        List<DSP5> dsp5s = dsp5DAO.findAll();
        DSP5 dsp5 = new DSP5();
        ConcreteBusinessPartner cbp = new ConcreteBusinessPartner();
        BusinessPartner bp = new BusinessPartner();
        Set<ConcreteBusinessPartner> consignees = new HashSet<ConcreteBusinessPartner>();

        bp.setId(1L);
        bp.setName(BUSINESSPARTNER_NAME);
        bp.setVersion(1);
        cbp.setId(1L);
        cbp.setCountry(CONCRETEBUSINESSPARTNER_COUNTRY);
        cbp.setBusinessPartner(bp);
        cbp.setVersion(1);
        consignees.add(cbp);
View Full Code Here

    @Override
    public void testFindEntries() throws Exception {
        List<DSP5> dsp5s = dsp5DAO.findEntries(0, 1);
        DSP5 dsp5 = new DSP5();
        ConcreteBusinessPartner cbp = new ConcreteBusinessPartner();
        BusinessPartner bp = new BusinessPartner();
        Set<ConcreteBusinessPartner> consignees = new HashSet<ConcreteBusinessPartner>();

        bp.setId(1L);
        bp.setName(BUSINESSPARTNER_NAME);
        bp.setVersion(1);
        cbp.setId(1L);
        cbp.setCountry(CONCRETEBUSINESSPARTNER_COUNTRY);
        cbp.setBusinessPartner(bp);
        cbp.setVersion(1);
        consignees.add(cbp);
View Full Code Here

            IDataSet expectedDataSet = new FlatXmlDataSetBuilder().build(this.getClass().getResource("/dbunit/dao/admin/dsp5-create_no-id.xml")
                    .openStream());
            DSP5 dsp5 = new DSP5();
            DSP5 ndsp5;
            ConcreteBusinessPartner cbp = new ConcreteBusinessPartner();
            BusinessPartner bp = new BusinessPartner();

            bp.setId(1L);
            bp.setName(BUSINESSPARTNER_NAME);
            bp.setVersion(1);
            cbp.setId(1L);
            cbp.setCountry(CONCRETEBUSINESSPARTNER_COUNTRY);
            cbp.setBusinessPartner(bp);
            cbp.setVersion(1);
            dsp5.setId(null);
View Full Code Here

            DatabaseConnection connection = new DatabaseConnection(dataSource.getConnection());
            IDataSet expectedDataSet = new FlatXmlDataSetBuilder().build(this.getClass().getResource(UPDATE_DATASET).openStream());
            DSP5 dsp5 = new DSP5();
            DSP5 ndsp5;
            ConcreteBusinessPartner cbp = new ConcreteBusinessPartner();
            BusinessPartner bp = new BusinessPartner();
            Set<ConcreteBusinessPartner> consignees = new HashSet<ConcreteBusinessPartner>();

            bp.setId(1L);
            bp.setName(BUSINESSPARTNER_NAME);
            bp.setVersion(1);
            cbp.setId(1L);
            cbp.setCountry(CONCRETEBUSINESSPARTNER_COUNTRY);
            cbp.setBusinessPartner(bp);
            cbp.setVersion(1);
            consignees.add(cbp);
View Full Code Here

    @DatabaseTearDown(value = EMPTY_DATASET, type = DatabaseOperation.DELETE)
    @Override
    public void testRemove() throws Exception {
        DSP5 dsp5 = new DSP5();
        ConcreteBusinessPartner cbp = new ConcreteBusinessPartner();
        BusinessPartner bp = new BusinessPartner();
        Set<ConcreteBusinessPartner> consignees = new HashSet<ConcreteBusinessPartner>();

        bp.setId(1L);
        bp.setName(BUSINESSPARTNER_NAME);
        bp.setVersion(1);
        cbp.setId(1L);
        cbp.setCountry(CONCRETEBUSINESSPARTNER_COUNTRY);
        cbp.setBusinessPartner(bp);
        cbp.setVersion(1);
        consignees.add(cbp);
View Full Code Here

    @ExpectedDatabase(value = EMPTY_DATASET, assertionMode = DatabaseAssertionMode.NON_STRICT)
    @DatabaseTearDown(value = EMPTY_DATASET, type = DatabaseOperation.DELETE)
    public void testRemove2() throws Exception {
        DSP5 dsp5 = new DSP5();
        ConcreteBusinessPartner cbp = new ConcreteBusinessPartner();
        BusinessPartner bp = new BusinessPartner();
        Set<ConcreteBusinessPartner> consignees = new HashSet<ConcreteBusinessPartner>();

        bp.setId(1L);
        bp.setName(BUSINESSPARTNER_NAME);
        bp.setVersion(1);
        cbp.setId(1L);
        cbp.setCountry(CONCRETEBUSINESSPARTNER_COUNTRY);
        cbp.setBusinessPartner(bp);
        cbp.setVersion(1);
        consignees.add(cbp);
View Full Code Here

                // For that case, additionally call getPhysicalNumberOfRows() to tell if there is a row at position zero or not.
                if ((worksheet.getLastRowNum() == 0) && (worksheet.getPhysicalNumberOfRows() == 1)) {
                    // Read the unique line at the position 0 in the current sheet
                    HSSFRow row = worksheet.getRow(0);
                    HSSFCell cellB = row.getCell(0);
                    BusinessPartner bpp = new BusinessPartner();
                    bpp.setName(cellB.getStringCellValue());
                    // TODO - To be completed
                    throw new NotImplementedException("FileExcelReader : bpp.persist()");
                    // FIXME bpp.persist();
                } else {
                    // Read all line in the current sheet
                    for (int i = 3; i < 100; i++) {
                        HSSFRow row = worksheet.getRow(i);
                        HSSFCell cellB = row.getCell(0);

                        BusinessPartner bpp = new BusinessPartner();
                        bpp.setName(cellB.getStringCellValue());
                        // FIXME : bpp.persist();
                        // TODO - To be completed
                        throw new NotImplementedException("FileExcelReader : bpp.persist()");
                    }
                }
View Full Code Here

TOP

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

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.