Package org.nutz.dao.test.meta

Examples of org.nutz.dao.test.meta.Country


    assertEquals(1, dao.count("dao_country"));

    sql = Sqls.create("UPDATE dao_country SET detail=@detail WHERE name=@name");
    sql.params().set("name", "ABC").set("detail", null);
    dao.execute(sql);
    Country c = dao.fetch(Country.class, "ABC");
    assertNull(c.getDetail());
  }
View Full Code Here


    b.setLevel(45);
    b.getCountry().setName("ABC");
    dao.updateLinks(b, "country");
    b = dao.fetch(Base.class, "red");
    assertEquals(lv, b.getLevel());
    Country c = dao.fetch(Country.class, b.getCountryId());
    assertEquals("ABC", c.getName());
  }
View Full Code Here

    b.setLevel(6);
    b.getCountry().setName("ABC");
    dao.updateWith(b, "country");
    b = dao.fetch(Base.class, b.getName());
    assertEquals(6, b.getLevel());
    Country c = dao.fetch(Country.class, b.getCountryId());
    assertEquals("ABC", c.getName());
  }
View Full Code Here

        assertEquals(1, dao.count("dao_country"));

        sql = Sqls.create("UPDATE dao_country SET detail=@detail WHERE name=@name");
        sql.params().set("name", "ABC").set("detail", null);
        dao.execute(sql);
        Country c = dao.fetch(Country.class, "ABC");
        assertNull(c.getDetail());
    }
View Full Code Here

        b.setLevel(45);
        b.getCountry().setName("ABC");
        dao.updateLinks(b, "country");
        b = dao.fetch(Base.class, "red");
        assertEquals(lv, b.getLevel());
        Country c = dao.fetch(Country.class, b.getCountryId());
        assertEquals("ABC", c.getName());
    }
View Full Code Here

        b.get(0).setLevel(45);
        b.get(0).getCountry().setName("ABC");
        dao.updateLinks(b, "country");
        b = Lang.list(dao.fetch(Base.class, "red"));
        assertEquals(lv, b.get(0).getLevel());
        Country c = dao.fetch(Country.class, b.get(0).getCountryId());
        assertEquals("ABC", c.getName());
    }
View Full Code Here

        b.setLevel(6);
        b.getCountry().setName("ABC");
        dao.updateWith(b, "country");
        b = dao.fetch(Base.class, b.getName());
        assertEquals(6, b.getLevel());
        Country c = dao.fetch(Country.class, b.getCountryId());
        assertEquals("ABC", c.getName());
    }
View Full Code Here

        b.get(0).setLevel(45);
        b.get(0).getCountry().setName("ABC");
        dao.updateWith(b, "country");
        b = Lang.list(dao.fetch(Base.class, b.get(0).getName()));
        assertEquals(45, b.get(0).getLevel());
        Country c = dao.fetch(Country.class, b.get(0).getCountryId());
        assertEquals("ABC", c.getName());
    }
View Full Code Here

TOP

Related Classes of org.nutz.dao.test.meta.Country

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.