Examples of Ball


Examples of org.apache.cayenne.testdo.testmap.Ball

        Thing t1 = context.newObject(Thing.class);
        invalidate.add(t1);
        t1.setVolume(10);
        t1.setWeight(10);

        Ball bl1 = context.newObject(Ball.class);
        invalidate.add(bl1);
        bl1.setBox(bx1);
        bl1.setThingVolume(10);
        bl1.setThingWeight(10);

        Thing t2 = context.newObject(Thing.class);
        invalidate.add(t2);
        t2.setVolume(20);
        t2.setWeight(20);

        Ball bl2 = context.newObject(Ball.class);
        invalidate.add(bl2);
        bl2.setBox(bx1);
        bl2.setThingVolume(20);
        bl2.setThingWeight(20);

        Thing t3 = context.newObject(Thing.class);
        invalidate.add(t3);
        t3.setVolume(30);
        t3.setWeight(30);

        Ball bl3 = context.newObject(Ball.class);
        invalidate.add(bl3);
        bl3.setBox(bx2);
        bl3.setThingVolume(30);
        bl3.setThingWeight(30);

        Thing t4 = context.newObject(Thing.class);
        invalidate.add(t4);
        t4.setVolume(40);
        t4.setWeight(40);

        Ball bl4 = context.newObject(Ball.class);
        invalidate.add(bl4);
        bl4.setBox(bx2);
        bl4.setThingVolume(40);
        bl4.setThingWeight(40);

        Thing t5 = context.newObject(Thing.class);
        invalidate.add(t5);
        t5.setVolume(20);
        t5.setWeight(10);

        Ball bl5 = context.newObject(Ball.class);
        invalidate.add(bl5);
        bl5.setBox(bx2);
        bl5.setThingVolume(20);
        bl5.setThingWeight(10);

        Thing t6 = context.newObject(Thing.class);
        invalidate.add(t6);
        t6.setVolume(40);
        t6.setWeight(30);

        Ball bl6 = context.newObject(Ball.class);
        invalidate.add(bl6);
        bl6.setBox(bx2);
        bl6.setThingVolume(40);
        bl6.setThingWeight(30);

        context.commitChanges();

        tBoxThing.insert(Cayenne.intPKForObject(bx1), t1.getWeight(), t1.getVolume());
        tBoxThing.insert(Cayenne.intPKForObject(bx1), t2.getWeight(), t2.getVolume());
View Full Code Here

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

  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.entities.Ball

  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.entities.Ball

  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.Ball

  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() );
View Full Code Here

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

  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.Ball

  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
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.