Package com.googlecode.objectify.test.PolymorphicAAATests

Examples of com.googlecode.objectify.test.PolymorphicAAATests.Animal


    fact().register(Animal.class);
    fact().register(Mammal.class);
    fact().register(Cat.class);
    fact().register(Dog.class);

    this.animal = new Animal();
    this.animal.name = "Ann";
    ofy().save().entity(this.animal).now();

    this.mammal = new Mammal();
    this.mammal.name = "Mamet";
View Full Code Here


  public void testQueryAll() throws Exception
  {
    List<Animal> all = ofy().load().type(Animal.class).list();
    assert all.size() == 4;

    Animal ann = all.get(0);
    assert ann.name.equals(this.animal.name);

    Mammal mamet = (Mammal)all.get(1);
    assert mamet.longHair == this.mammal.longHair;
View Full Code Here

TOP

Related Classes of com.googlecode.objectify.test.PolymorphicAAATests.Animal

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.