Rda { public static <T> Be<T> at(Class<T> clazz) { return new Be<T>(clazz); }  static void to(DataSource ds); static void to(String url, String un, String pw); static Be<T> at(Class<T> clazz); static RdaBuilder build(String sql, Object... params);  }
@Test public void count() { System.out.println(Rda.at(Rdo.class).count()); }
@Test public void countMatch() { System.out.println(Rda.at(Rdo.class).count(new Rdo("hehe"))); }
@Test public void exists() { System.out.println(Rda.at(Rdo.class).exists(1L)); }
@Test public void init() { IntStream.range(1, 10).forEach(i -> { Rdo rdo = new Rdo(); rdo.setId(new Long(i)); rdo.setName("rda-" + i); Rda.at(Rdo.class).save(rdo); }); }
@Test public void save() { Rdo rdo = new Rdo(); rdo.setId(17L); rdo.setName("hah"); Rda.at(Rdo.class).save(rdo); }
@Test public void modify() { Rdo rdo = Rda.at(Rdo.class).findOne(2L); rdo.setName("modify"); Rda.at(Rdo.class).modify(rdo); }
@Test public void findOne() { Long id = 630005L; Rdo rdo = Rda.at(Rdo.class).findOne(id); Assert.isTrue(id.equals(rdo.getId())); }
@Test public void findAll() { for (Rdo rdo : Rda.at(Rdo.class).findAll()) { System.out.println(rdo.getId() + " + " + rdo.getName()); } }
@Test public void findMatch() { System.out.println(Rda.at(Rdo.class).limit(2).find(new Rdo("hah"))); }
@Test public void delete() { Rda.at(Rdo.class).delete(1L); }
@Test public void deleteAll() { Rda.at(Rdo.class).deleteAll(); }