Examples of Dog


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

    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

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

    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

Examples of org.apache.wink.providers.jackson.internal.pojo.polymorphic.Dog

    public static class AnimalResource {

        @GET
        @Produces("application/json")
        public Animal getDog() throws IOException {
            Animal animal = new Dog();
            return animal;
        }
View Full Code Here

Examples of org.apache.wink.providers.jackson.internal.pojo.polymorphic.Dog

    public static class AnimalResource {

        @GET
        @Produces("application/json")
        public Animal getDog() throws IOException {
            Animal animal = new Dog();
            return animal;
        }
View Full Code Here

Examples of org.hibernate.ogm.examples.gettingstarted.domain.Dog

      logger.infof( "About to store dog and breed" );
      EntityManager em = emf.createEntityManager();
      Breed collie = new Breed();
      collie.setName( "Collie" );
      em.persist( collie );
      Dog dina = new Dog();
      dina.setName( "Dina" );
      dina.setBreed( collie );
      em.persist( dina );
      Long dinaId = dina.getId();
      em.flush();
      em.close();
      tm.commit();

      //Retrieve your entities the way you are used to in plain JPA
      logger.infof( "About to retrieve dog and breed" );
      tm.begin();
      em = emf.createEntityManager();
      dina = em.find( Dog.class, dinaId );
      logger.infof( "Found dog %s of breed %s", dina.getName(), dina.getBreed().getName() );
      em.flush();
      em.close();
      tm.commit();

      emf.close();
View Full Code Here

Examples of org.hibernate.test.annotations.id.entities.Dog

  public void testTableGenerator() throws Exception {
    Session s = openSession();
    Transaction tx = s.beginTransaction();

    Ball b = new Ball();
    Dog d = new Dog();
    Computer c = new Computer();
    s.persist(b);
    s.persist(d);
    s.persist(c);
    tx.commit();
    s.close();
    assertEquals("table id not generated", new Integer(1), b.getId());
    assertEquals("generator should not be shared", new Integer(1), d
        .getId());
    assertEquals("default value should work", new Long(1), c.getId());

    s = openSession();
    tx = s.beginTransaction();
View Full Code Here

Examples of org.hibernate.test.annotations.id.entities.Dog

  public void testTableGenerator() throws Exception {
    Session s = openSession();
    Transaction tx = s.beginTransaction();

    Ball b = new Ball();
    Dog d = new Dog();
    Computer c = new Computer();
    s.persist(b);
    s.persist(d);
    s.persist(c);
    tx.commit();
    s.close();
    assertEquals("table id not generated", new Integer(1), b.getId());
    assertEquals("generator should not be shared", new Integer(1), d
        .getId());
    assertEquals("default value should work", new Long(1), c.getId());

    s = openSession();
    tx = s.beginTransaction();
View Full Code Here

Examples of org.hibernate.test.annotations.id.entities.Dog

  public void testTableGenerator() throws Exception {
    Session s = openSession();
    Transaction tx = s.beginTransaction();

    Ball b = new Ball();
    Dog d = new Dog();
    Computer c = new Computer();
    s.persist(b);
    s.persist(d);
    s.persist(c);
    tx.commit();
    s.close();
    assertEquals("table id not generated", new Integer(1), b.getId());
    assertEquals("generator should not be shared", new Integer(1), d
        .getId());
    assertEquals("default value should work", new Long(1), c.getId());

    s = openSession();
    tx = s.beginTransaction();
View Full Code Here

Examples of org.hibernate.test.annotations.id.sequences.entities.Dog

  public void testTableGenerator() throws Exception {
    Session s = openSession();
    Transaction tx = s.beginTransaction();

    Ball b = new Ball();
    Dog d = new Dog();
    Computer c = new Computer();
    s.persist( b );
    s.persist( d );
    s.persist( c );
    tx.commit();
    s.close();
    assertEquals( "table id not generated", new Integer( 1 ), b.getId() );
    assertEquals(
        "generator should not be shared", new Integer( 1 ), d
            .getId()
    );
    assertEquals( "default value should work", new Long( 1 ), c.getId() );

    s = openSession();
View Full Code Here

Examples of org.hibernate.test.annotations.id.sequences.entities.Dog

  public void testTableGenerator() throws Exception {
    Session s = openSession();
    Transaction tx = s.beginTransaction();

    Ball b = new Ball();
    Dog d = new Dog();
    Computer c = new Computer();
    s.persist(b);
    s.persist(d);
    s.persist(c);
    tx.commit();
    s.close();
    assertEquals("table id not generated", new Integer(1), b.getId());
    assertEquals("generator should not be shared", new Integer(1), d
        .getId());
    assertEquals("default value should work", new Long(1), c.getId());

    s = openSession();
    tx = s.beginTransaction();
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.