Package com.google.appengine.api.datastore

Examples of com.google.appengine.api.datastore.Category


        if (clazz == BlobKey.class)
            return clazz.cast(new BlobKey(self));
        if (clazz == Link.class)
            return clazz.cast(new Link(self));
        if (clazz == Category.class)
            return clazz.cast(new Category(self));
        if (clazz == PhoneNumber.class)
            return clazz.cast(new PhoneNumber(self));
        if (clazz == PostalAddress.class)
            return clazz.cast(new PostalAddress(self));
        if (clazz == Rating.class)
View Full Code Here


        testInequalityQueries(new GeoPt(0f, 10f), new GeoPt(0f, 20f), new GeoPt(0f, 30f));
    }

    @Test
    public void testCategoryProperty() {
        testEqualityQueries(new Category("foo"), new Category("bar"));
        testInequalityQueries(new Category("aaa"), new Category("bbb"), new Category("ccc"));
    }
View Full Code Here

                new PostalAddress("sip sip"),
                new PhoneNumber("sip sip"),
                new Email("sip sip"),
                new IMHandle(IMHandle.Scheme.sip, "sip"),   // this is stored as "sip sip"
                new Link("sip sip"),
                new Category("sip sip"),
                new BlobKey("sip sip")
            ),
            asSet(
                "xmpp xmpp",
                new ShortBlob("xmpp xmpp".getBytes()),
                new PostalAddress("xmpp xmpp"),
                new PhoneNumber("xmpp xmpp"),
                new Email("xmpp xmpp"),
                new IMHandle(IMHandle.Scheme.xmpp, "xmpp"), // this is stored as "xmpp xmpp"
                new Link("xmpp xmpp"),
                new Category("xmpp xmpp"),
                new BlobKey("xmpp xmpp")
            ),
            asSet(-10f, -10d),
            asSet(10f, 10d),
            asSet(20f, 20d),
View Full Code Here

            new PostalAddress("19451 Via Monte Rd. CA95070"), new PostalAddress("9 1st St. CA 95000")};
        Email[] emailDat = {new Email("somebody@google.com"), new Email("somebody2@gmail.com"),
            new Email("somebody3@hotmail.com")};
        Link[] linkDat = {new Link("http://www.hotmail.com"), new Link("http://www.google.com.com"),
            new Link("http://www.gmail.com")};
        Category[] categoryDat = {new Category("developer"), new Category("test"),
            new Category("manager")};
        Text[] textDat = {new Text("english"), new Text("chinese"), new Text("japanese")};
        ShortBlob[] byteString = {new ShortBlob("shortblob".getBytes()),
            new ShortBlob("shortText".getBytes()), new ShortBlob("shortImage".getBytes())};
        Blob[] blobDat = {new Blob("blobImage".getBytes()), new Blob("blobText".getBytes()),
            new Blob("blobData".getBytes())};
View Full Code Here

        doAllFilters(kindName, "stringProp", "mno");
        doEqOnlyFilter(kindName, "phoneProp", new PhoneNumber("650-321-7654"));
        doEqOnlyFilter(kindName, "addressProp", new PostalAddress("19451 Via Monte Rd. CA95070"));
        doEqOnlyFilter(kindName, "emailProp", new Email("somebody2@gmail.com"));
        doEqOnlyFilter(kindName, "linkProp", new Link("http://www.google.com.com"));
        doEqOnlyFilter(kindName, "categoryProp", new Category("test"));
        doEqOnlyFilter(kindName, "byteStrProp", new ShortBlob("shortText".getBytes()));
        String[] inDat = {"abc", "xyz"};
        doInFilter(kindName, "stringProp", inDat);
    }
View Full Code Here

    @Test
    public void testCategoryType() {
        String propertyName = "categoryProp";
        List<Entity> elist = doQuery(kindName, propertyName, Category.class, true);
        Category Category = (Category) elist.get(0).getProperty(propertyName);
        Category sameDat = (Category) elist.get(0).getProperty(propertyName);
        Category diffDat = (Category) elist.get(1).getProperty(propertyName);
        assertTrue(Category.equals(sameDat));
        assertFalse(Category.equals(diffDat));
        assertEquals("developer", Category.getCategory());
        assertEquals(0, Category.compareTo(sameDat));
        assertTrue(Category.compareTo(diffDat) != 0);
View Full Code Here

            newRec.setProperty("emailData", new Email("somebody123" + i + "@google.com"));
            newRec.setProperty("phoneData", new PhoneNumber("408-123-000" + i));
            newRec.setProperty("adressData", new PostalAddress("123 st. CA 12345" + i));
            newRec.setProperty("ratingData", new Rating(10 * i));
            newRec.setProperty("geoptData", new GeoPt((float) (i + 0.12), (float) (i + 0.98)));
            newRec.setProperty("categoryData", new Category("category" + i));
            newRec.setProperty("intList", Arrays.asList(i, 50 + i, 90 + i));
            elist.add(newRec);
        }
        service.put(elist);

View Full Code Here

                        newRec.setProperty("emailData", new Email("somebody123@google.com"));
                        newRec.setProperty("phoneData", new PhoneNumber("408-123-4567"));
                        newRec.setProperty("adressData", new PostalAddress("123 st. CA 12345"));
                        newRec.setProperty("ratingData", new Rating(55));
                        newRec.setProperty("geoptData", new GeoPt((float) 12.12, (float) 98.98));
                        newRec.setProperty("categoryData", new Category("abc"));
                        eList.add(newRec);
                    }
                }
            }
        }
View Full Code Here

TOP

Related Classes of com.google.appengine.api.datastore.Category

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.