Package quickdb.date200912.model

Examples of quickdb.date200912.model.Delete2


        admin.executeQuery("DROP TABLE Delete1Delete2Delete2");
        admin.executeQuery("DROP TABLE Delete2Delete1Delete1");
       
        Delete2 d2a = new Delete2();
        d2a.setName("delete2 - prueba1");
        Delete1 d1a = new Delete1();
        d1a.setDescription("delete2-delete1-desc1");
        Delete1 d1b = new Delete1();
        d1b.setDescription("delete2-delete1-desc2");
        ArrayList a1 = new ArrayList();
        a1.add(d1a);
        a1.add(d1b);
        d2a.setDelete1(a1);

        Delete2 d2b = new Delete2();
        d2b.setName("delete2 - prueba2");
        Delete1 d1c = new Delete1();
        d1c.setDescription("delete2-delete1-desc3");
        Delete1 d1d = new Delete1();
        d1d.setDescription("delete2-delete1-desc4");
        ArrayList a2 = new ArrayList();
        a2.add(d1c);
        a2.add(d1d);
        d2b.setDelete1(a2);

        ArrayList array = new ArrayList();
        array.add(d2a);
        array.add(d2b);

        Delete1 d = new Delete1();
        d.setDescription("description delete1");
        d.setDelete2(array);

        System.out.println(admin.save(d));

        System.out.println(admin.obtain(d, "description = 'description delete1'"));
        System.out.println(admin.delete(d));
View Full Code Here


        admin.executeQuery("DROP TABLE Delete1");
        admin.executeQuery("DROP TABLE Delete2");
        admin.executeQuery("DROP TABLE Delete1Delete2Delete2");
        admin.executeQuery("DROP TABLE Delete2Delete1Delete1");

        Delete2 d2a2 = new Delete2();
        d2a2.setName("delete2 - prueba1");
        Delete1 d1a2 = new Delete1();
        d1a2.setDescription("delete2-delete1-desc1");
        Delete1 d1b2 = new Delete1();
        d1b2.setDescription("delete2-delete1-desc2");
        ArrayList a1 = new ArrayList();
        a1.add(d1a2);
        a1.add(d1b2);
        d2a2.setDelete1(a1);

        Delete2 d2b2 = new Delete2();
        d2b2.setName("delete2 - prueba2");
        Delete1 d1c2 = new Delete1();
        d1c2.setDescription("delete2-delete1-desc3");
        Delete1 d1d2 = new Delete1();
        d1d2.setDescription("delete2-delete1-desc4");
        ArrayList a2 = new ArrayList();
        a2.add(d1c2);
        a2.add(d1d2);
        d2b2.setDelete1(a2);

        ArrayList array2 = new ArrayList();
        array2.add(d2a2);
        array2.add(d2b2);

        Delete1 d3 = new Delete1();
        d3.setDescription("description delete1");
        d3.setDelete2(array2);

        System.out.println(admin.save(d3));

        System.out.println(admin.obtain(d3, "description = 'description delete1'"));

        ((Delete1) d3.getDelete2().get(0).getDelete1().get(0)).setDescription("new description2");
        ((Delete1) d3.getDelete2().get(1).getDelete1().get(0)).setDescription("description modify2");
        d3.getDelete2().get(0).setName("name modify2");

        Delete2 d2q = new Delete2();
        d2q.setName("delete2 - prueba - added");
        d3.getDelete2().add(d2q);

        System.out.println(admin.modify(d3));
        Delete1 d4 = new Delete1();
        System.out.println(admin.obtain(d4, "description = 'description delete1'"));
View Full Code Here

        admin.executeQuery("DROP TABLE Delete1");
        admin.executeQuery("DROP TABLE Delete2");
        admin.executeQuery("DROP TABLE Delete1Delete2Delete2");
        admin.executeQuery("DROP TABLE Delete2Delete1Delete1");

        Delete2 d2a = new Delete2();
        d2a.setName("delete2 - prueba1");
        Delete2 d2b = new Delete2();
        d2b.setName("delete2 - prueba2");

        ArrayList array = new ArrayList();
        array.add(d2a);
        array.add(d2b);
View Full Code Here

        admin.executeQuery("DROP TABLE Delete1");
        admin.executeQuery("DROP TABLE Delete2");
        admin.executeQuery("DROP TABLE Delete1Delete2Delete2");
        admin.executeQuery("DROP TABLE Delete2Delete1Delete1");
       
        Delete2 d2a = new Delete2();
        d2a.setName("delete2 - prueba1");
        Delete1 d1a = new Delete1();
        d1a.setDescription("delete2-delete1-desc1");
        Delete1 d1b = new Delete1();
        d1b.setDescription("delete2-delete1-desc2");
        ArrayList a1 = new ArrayList();
        a1.add(d1a);
        a1.add(d1b);
        d2a.setDelete1(a1);

        Delete2 d2b = new Delete2();
        d2b.setName("delete2 - prueba2");
        Delete1 d1c = new Delete1();
        d1c.setDescription("delete2-delete1-desc3");
        Delete1 d1d = new Delete1();
        d1d.setDescription("delete2-delete1-desc4");
        ArrayList a2 = new ArrayList();
        a2.add(d1c);
        a2.add(d1d);
        d2b.setDelete1(a2);

        ArrayList array = new ArrayList();
        array.add(d2a);
        array.add(d2b);
View Full Code Here

        System.out.println(admin.obtain(s, "reference1.value = 'house'"));
        System.out.println("house".equalsIgnoreCase(s.getReference1().getValue()));
    }

    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

    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);

        System.out.println(admin.save(t));

        Names t2 = new Names();
        System.out.println(admin.obtain(t2, "otro = 'mi otro nombre'"));
        System.out.println("mi otro nombre".equalsIgnoreCase(t2.getOtro()));
        System.out.println(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();
        System.out.println(admin.obtain(oo1, "name = 'diego'"));
        System.out.println(admin.obtain(oo2, "description = 'description'"));
        System.out.println(admin.obtain(oo3, "address = 'puey 600'"));

        System.out.println("diego".equalsIgnoreCase(oo1.getName()));
        System.out.println("description".equalsIgnoreCase(oo2.getDescription()));
        System.out.println("puey 600".equalsIgnoreCase(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();
        System.out.println(admin.obtain(oo1, "name = 'diego'"));
        System.out.println(admin.obtain(oo2, "description = 'description'"));
        System.out.println(admin.obtain(oo3, "address = 'puey 600'"));

        System.out.println("diego".equalsIgnoreCase(oo1.getName()));
        System.out.println("description".equalsIgnoreCase(oo2.getDescription()));
        System.out.println("puey 600".equalsIgnoreCase(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();
        System.out.println(admin.obtain(oo1, "name = 'diego'"));
        System.out.println(admin.obtain(oo2, "description = 'description'"));
        System.out.println(admin.obtain(oo3, "address = 'puey 600'"));

        System.out.println("diego".equalsIgnoreCase(oo1.getName()));
        System.out.println("description".equalsIgnoreCase(oo2.getDescription()));
        System.out.println("puey 600".equalsIgnoreCase(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();
        System.out.println(admin.obtain(oo1, "name = 'diego'"));
        System.out.println(admin.obtain(oo2, "description = 'description'"));
        System.out.println(admin.obtain(oo3, "address = 'puey 600'"));

        System.out.println("diego".equalsIgnoreCase(oo1.getName()));
        System.out.println("description".equalsIgnoreCase(oo2.getDescription()));
        System.out.println("puey 600".equalsIgnoreCase(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");
        System.out.println(1 == array1.size());
        System.out.println(1 == array2.size());

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

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

TOP

Related Classes of quickdb.date200912.model.Delete2

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.