Package com.googlecode.objectify.test.PolymorphicAAATests

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


    this.cat.name = "Catrina";
    this.cat.longHair = true;
    this.cat.hypoallergenic = true;
    ofy().save().entity(this.cat).now();

    this.dog = new Dog();
    this.dog.name = "Doug";
    this.dog.longHair = true;
    this.dog.loudness = 11;
    ofy().save().entity(this.dog).now();
  }
View Full Code Here


    assert mamet.longHair == this.mammal.longHair;

    Cat catrina = (Cat)all.get(2);
    assert catrina.hypoallergenic == this.cat.hypoallergenic;

    Dog doug = (Dog)all.get(3);
    assert doug.loudness == this.dog.loudness;
  }
View Full Code Here

    assert mamet.longHair == this.mammal.longHair;

    Cat catrina = (Cat)all.get(1);
    assert catrina.hypoallergenic == this.cat.hypoallergenic;

    Dog doug = (Dog)all.get(2);
    assert doug.loudness == this.dog.loudness;
  }
View Full Code Here

    assert dogs.size() == 0;

    List<Animal> loud = ofy().load().type(Animal.class).filter("loudness", this.dog.loudness).list();
    assert loud.size() == 1;

    Dog doug = (Dog)loud.get(0);
    assert doug.loudness == this.dog.loudness;

    // Let's try that again with a mammal query
    List<Mammal> mloud = ofy().load().type(Mammal.class).filter("loudness", this.dog.loudness).list();
    assert mloud.size() == 1;
View Full Code Here

TOP

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

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.