Package com.google.appengine.api.datastore.client

Examples of com.google.appengine.api.datastore.client.SerializationServiceAsync


    /**
     * Test key serialization.
     */
    public void testKeySerialization() {
        SerializationServiceAsync service =
            GWT.create(SerializationService.class);
        final Key key = KeyFactory.createKey("Some", 3);
        service.getKey(key, new AsyncCallback<Key>() {
            public void onSuccess(Key e) {
                assertEquals(key, e);
                finishTest();
            }

View Full Code Here


    /**
     * Test entity serialization.
     */
    public void testEntitySerialization() {
        SerializationServiceAsync service =
            GWT.create(SerializationService.class);
        Bean bean = new Bean();
        bean.setB(false);
        bean.setD(3.3);
        bean.setDa(new Date());
        bean.setF(23.4f);
        bean.setKey(KeyFactory.createKey("Bean", 3));
        ArrayList<String> list = new ArrayList<String>();
        list.add("1");
        list.add("2");
        list.add("3");
        bean.setList(list);
        bean.setS("String");
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("1", "1");
        map.put("2", "2");
        map.put("3", "3");
        bean.setMap(map);

        service.getEntity(bean, new AsyncCallback<Entity>() {
            public void onSuccess(Entity e) {
                finishTest();
            }

            public void onFailure(Throwable caught) {
View Full Code Here

TOP

Related Classes of com.google.appengine.api.datastore.client.SerializationServiceAsync

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.