Package com.socrata.api

Examples of com.socrata.api.Soda2Producer.addObject()


        final Nomination  nomination = new Nomination(UUID.randomUUID().toString(), "Test Agent", "Department of Testing", "https://sandbox.demo.socrata.com", nominationDate, null, false, false);
        final Nomination  nominationUpdate = new Nomination(nomination.getName(), "Test Agent", "Department of Testing", "https://sandbox.demo.socrata.com", nominationDate, voteDate, true, false);

        final Soda2Producer producer= createProducer();

        final Meta objectMetadata = producer.addObject(UPDATE_DATA_SET, nomination);
        final Nomination createdNomination = producer.getById(UPDATE_DATA_SET, objectMetadata.getId(), Nomination.class);
        TestCase.assertTrue(EqualsBuilder.reflectionEquals(nomination, createdNomination));

        final Meta updateMeta= producer.update(UPDATE_DATA_SET, objectMetadata.getId(), nominationUpdate);
        TestCase.assertEquals(objectMetadata.getId(), updateMeta.getId());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.