Package cat.quickdb.date200912.model

Examples of cat.quickdb.date200912.model.Bind


        Assert.assertEquals("house", s.getReference1().getValue());
    }

    @Test
    public void testNames(){
        Name2 test2 = new Name2();
        test2.setMyName("name test2-otro");

        Names t = new Names();
        t.setOtro("mi otro nombre");
        t.setPruebaIgnore("pruebaaaaaaaaa");
        t.setTesta(test2);
View Full Code Here


    @Test
    public void testNames(){
        Name2 test2 = new Name2();
        test2.setMyName("name test2-otro");

        Names t = new Names();
        t.setOtro("mi otro nombre");
        t.setPruebaIgnore("pruebaaaaaaaaa");
        t.setTesta(test2);

        Assert.assertTrue(admin.save(t));

        Names t2 = new Names();
        Assert.assertTrue(admin.obtain(t2, "otro = 'mi otro nombre'"));
        Assert.assertEquals("mi otro nombre", t2.getOtro());
        Assert.assertEquals(null, t2.getPruebaIgnore());
    }
View Full Code Here

        admin.executeQuery("DROP TABLE Obj1");
        admin.executeQuery("DROP TABLE Obj2");
        admin.executeQuery("DROP TABLE Obj3");
        admin.executeQuery("DROP TABLE Obj4");

        Obj1 o1 = new Obj1();
        o1.setName("diego");
        Obj2 o2 = new Obj2();
        o2.setDescription("description");
        Obj3 o3 = new Obj3();
        o3.setAddress("puey 600");

        Obj4 o4 = new Obj4();
        o4.setPrueba("this is a test");
        o1.setObj4(o4);

        admin.openAtomicBlock();
        admin.save(o1);
        admin.save(o2);
        admin.save(o3);
        admin.closeAtomicBlock();

        Obj1 oo1 = new Obj1();
        Obj2 oo2 = new Obj2();
        Obj3 oo3 = new Obj3();
        Assert.assertTrue(admin.obtain(oo1, "name = 'diego'"));
        Assert.assertTrue(admin.obtain(oo2, "description = 'description'"));
        Assert.assertTrue(admin.obtain(oo3, "address = 'puey 600'"));

        Assert.assertEquals("diego", oo1.getName());
        Assert.assertEquals("description", oo2.getDescription());
        Assert.assertEquals("puey 600", oo3.getAddress());

        admin.openAtomicBlock();
        admin.save(o2);
View Full Code Here

        admin.executeQuery("DROP TABLE Obj3");
        admin.executeQuery("DROP TABLE Obj4");

        Obj1 o1 = new Obj1();
        o1.setName("diego");
        Obj2 o2 = new Obj2();
        o2.setDescription("description");
        Obj3 o3 = new Obj3();
        o3.setAddress("puey 600");

        Obj4 o4 = new Obj4();
        o4.setPrueba("this is a test");
        o1.setObj4(o4);

        admin.openAtomicBlock();
        admin.save(o1);
        admin.save(o2);
        admin.save(o3);
        admin.closeAtomicBlock();

        Obj1 oo1 = new Obj1();
        Obj2 oo2 = new Obj2();
        Obj3 oo3 = new Obj3();
        Assert.assertTrue(admin.obtain(oo1, "name = 'diego'"));
        Assert.assertTrue(admin.obtain(oo2, "description = 'description'"));
        Assert.assertTrue(admin.obtain(oo3, "address = 'puey 600'"));

        Assert.assertEquals("diego", oo1.getName());
        Assert.assertEquals("description", oo2.getDescription());
        Assert.assertEquals("puey 600", oo3.getAddress());

        admin.openAtomicBlock();
        admin.save(o2);
        admin.save(o3);
View Full Code Here

        Obj1 o1 = new Obj1();
        o1.setName("diego");
        Obj2 o2 = new Obj2();
        o2.setDescription("description");
        Obj3 o3 = new Obj3();
        o3.setAddress("puey 600");

        Obj4 o4 = new Obj4();
        o4.setPrueba("this is a test");
        o1.setObj4(o4);

        admin.openAtomicBlock();
        admin.save(o1);
        admin.save(o2);
        admin.save(o3);
        admin.closeAtomicBlock();

        Obj1 oo1 = new Obj1();
        Obj2 oo2 = new Obj2();
        Obj3 oo3 = new Obj3();
        Assert.assertTrue(admin.obtain(oo1, "name = 'diego'"));
        Assert.assertTrue(admin.obtain(oo2, "description = 'description'"));
        Assert.assertTrue(admin.obtain(oo3, "address = 'puey 600'"));

        Assert.assertEquals("diego", oo1.getName());
        Assert.assertEquals("description", oo2.getDescription());
        Assert.assertEquals("puey 600", oo3.getAddress());

        admin.openAtomicBlock();
        admin.save(o2);
        admin.save(o3);
        admin.cancelAtomicBlock();
View Full Code Here

        Obj2 o2 = new Obj2();
        o2.setDescription("description");
        Obj3 o3 = new Obj3();
        o3.setAddress("puey 600");

        Obj4 o4 = new Obj4();
        o4.setPrueba("this is a test");
        o1.setObj4(o4);

        admin.openAtomicBlock();
        admin.save(o1);
        admin.save(o2);
        admin.save(o3);
        admin.closeAtomicBlock();

        Obj1 oo1 = new Obj1();
        Obj2 oo2 = new Obj2();
        Obj3 oo3 = new Obj3();
        Assert.assertTrue(admin.obtain(oo1, "name = 'diego'"));
        Assert.assertTrue(admin.obtain(oo2, "description = 'description'"));
        Assert.assertTrue(admin.obtain(oo3, "address = 'puey 600'"));

        Assert.assertEquals("diego", oo1.getName());
        Assert.assertEquals("description", oo2.getDescription());
        Assert.assertEquals("puey 600", oo3.getAddress());

        admin.openAtomicBlock();
        admin.save(o2);
        admin.save(o3);
        admin.cancelAtomicBlock();

        ArrayList array1 = admin.obtainAll(Obj2.class, "id > 0");
        ArrayList array2 = admin.obtainAll(Obj3.class, "id > 0");
        Assert.assertEquals(1, array1.size());
        Assert.assertEquals(1, array2.size());

        admin.openAtomicBlock();
        admin.save(o1);
        admin.closeAtomicBlock();

        ArrayList array3 = admin.obtainAll(Obj1.class, "id > 0");
        Assert.assertEquals(2, array3.size());
        Obj4 oo4 = new Obj4();
        ArrayList array4 = admin.obtainAll(Obj4.class, "id > 0");
        Assert.assertEquals(2, array4.size());
    }
View Full Code Here

        Object2 obj2 = new Object2();
        obj2.setName2("name2");
        obj2.setObject3(obj3);

        Object1 obj = new Object1();
        obj.setName1("name1");
        obj.setObject2(obj2);

        Assert.assertTrue(admin.save(obj));

        Object1 o = new Object1();
        Assert.assertTrue(admin.lazyLoad(o, "name1 = 'name1'"));
        Assert.assertEquals(null, o.getObject2());
        Assert.assertTrue(admin.lazyLoad(o));
        Assert.assertEquals(null, o.getObject2().getObject3());
        Assert.assertTrue(admin.lazyLoad(o));

        Assert.assertTrue(admin.obtain(o, "id = '1'"));
        Assert.assertEquals("name1", o.getName1());
    }
View Full Code Here

    public void testLazyLoad(){
        Object3 obj3 = new Object3();
        obj3.setDescription("description");
        obj3.setName3("name3");

        Object2 obj2 = new Object2();
        obj2.setName2("name2");
        obj2.setObject3(obj3);

        Object1 obj = new Object1();
        obj.setName1("name1");
        obj.setObject2(obj2);
View Full Code Here

        Assert.assertEquals("description - son", son.getDescriptionSon());
    }

    @Test
    public void testLazyLoad(){
        Object3 obj3 = new Object3();
        obj3.setDescription("description");
        obj3.setName3("name3");

        Object2 obj2 = new Object2();
        obj2.setName2("name2");
        obj2.setObject3(obj3);
View Full Code Here

        Assert.assertTrue(admin.delete(son));
    }

    @Test
    public void testQuerySystemWithInheritance(){
        Reference1 ref = new Reference1();
        ref.setValue("house");

        Son1 son = new Son1();
        son.setData("data from son");
        son.setSonName("child");
        son.setDescription("parent description");
View Full Code Here

TOP

Related Classes of cat.quickdb.date200912.model.Bind

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.