Package com.coherentlogic.wb.client.core.domain

Examples of com.coherentlogic.wb.client.core.domain.DataPoint


    private DataPointDAO dataPointDAO;

    private DataPoint dataPoint = null;

    static DataPoint createDataPoint () {
        DataPoint dataPoint = new DataPoint ();

        DataPointCountry dataPointCountry =
            IdValuePairTestHelper.create(DataPointCountry.class);

        dataPoint.setCountry(dataPointCountry);

        DataPointIndicator dataPointIndicator =
            IdValuePairTestHelper.create(DataPointIndicator.class);

        dataPoint.setDataPointIndicator(dataPointIndicator);

        dataPoint.setDate(DATE);
        dataPoint.setDecimal(DECIMAL);
        dataPoint.setId(DataPointCountryDAOTest.VALUEX);
        dataPoint.setValue(DataPointCountryDAOTest.VALUEY);

        return dataPoint;
    }
View Full Code Here


        Long primaryKey = dataPoint.getPrimaryKey();

        assertNotNull(primaryKey);

        DataPoint dataPoint2 =
            dataPointDAO.find(primaryKey);

        assertNotNull(dataPoint2);
        assertEquals(dataPoint, dataPoint2);

        DataPointIndicator dataPointIndicator =
            dataPoint.getDataPointIndicator();

        assertNotNull(dataPointIndicator);
        assertNotNull(dataPointIndicator.getId());

        /* @see DataPointIndicatorDAOTest Where this problem doesn't exist.
         * @todo Figure out if this is correct:
         *
         * Calling .persist() will not automatically set the id value. Your JPA
         * provider will ensure that it is set before the entity is finally
         * written to db. So you are right to assume that the id will be
         * assigned when the transaction is committed. But this is not the only
         * possible case. When you call .flush() the very same will happen.
         */

//        assertNotNull(dataPointIndicator.getPrimaryKey());
        assertNotNull(dataPointIndicator.getValue());

        dataPoint2.setValue(DataPointCountryDAOTest.VALUEY);

        dataPointDAO.merge(dataPoint2);

        DataPoint dataPoint3 =
            dataPointDAO.find(primaryKey);

        assertEquals(
            DataPointCountryDAOTest.VALUEY,
            dataPoint3.getValue());

        dataPointDAO.remove(dataPoint3);

        DataPoint dataPoint4 =
            dataPointDAO.find(primaryKey);

        assertNull(dataPoint4);
    }
View Full Code Here

    static DataPoints createDataPoints () {
        DataPoints result = new DataPoints ();

        List<DataPoint> dataPointList = new ArrayList<DataPoint> ();

        DataPoint dataPoint = DataPointDAOTest.createDataPoint();

        dataPointList.add(dataPoint);

        result.setDataPointList(dataPointList);
View Full Code Here

        List<DataPoint> dataPointList = result.getDataPointList();

        assertEquals(12, dataPointList.size());

        DataPoint dataPoint = dataPointList.get(4);

        reviewIdValuePair("SP.POP.TOTL", "Population (Total)",
            dataPoint.getDataPointIndicator());

        reviewIdValuePair("BR", "Brazil",
            dataPoint.getCountry());

        assertEquals ("1999", dataPoint.getDate());
        // Pages is subject to change so may want to use greater than #.
        assertEquals ("172006362", dataPoint.getValue());
        assertEquals ("0", dataPoint.getDecimal());
    }
View Full Code Here

TOP

Related Classes of com.coherentlogic.wb.client.core.domain.DataPoint

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.