@Test public void all() { for (int i = 0 ; i<10 ; i++) { TestModel t = new TestModel(); t.title = "title"+i; t.save(); } CursorList<TestModel> result = Query.all(TestModel.class).get(); assertEquals(result.size(), 10); result.close(); }
public static <T extends Model> ManyQuery<T> all(Class<T> clazz) { return many(clazz, "SELECT * FROM " + Utils.getTableName(clazz)); }
Query { public static <T extends Model> ManyQuery<T> all(Class<T> clazz) { return many(clazz, "SELECT * FROM " + Utils.getTableName(clazz)); } }
Query { public static <T extends Model> ManyQuery<T> all(Class<T> clazz) { return many(clazz, "SELECT * FROM " + Utils.getTableName(clazz)); } private  Query(); }
Query { public static <T extends Model> ManyQuery<T> all(Class<T> clazz) { return many(clazz, "SELECT * FROM " + Utils.getTableName(clazz)); } private  Query(); static OneQuery<T> one(Class<T> clazz, String sql,
			Object... sqlArgs); static OneQuery<T> one(Class<T> clazz, int sqlResId,
                                                          Object... sqlArgs); static ManyQuery<T> many(Class<T> clazz, String sql,
			Object... sqlArgs); static ManyQuery<T> many(Class<T> clazz, int sqlResId,
                                                            Object... sqlArgs); static ManyQuery<T> all(Class<T> clazz); }
Query { public static <T extends Model> ManyQuery<T> all(Class<T> clazz) { return many(clazz, "SELECT * FROM " + Utils.getTableName(clazz)); } private  Query(); static OneQuery<T> one(Class<T> clazz, String sql,
			Object... sqlArgs); static OneQuery<T> one(Class<T> clazz, int sqlResId,
                                                          Object... sqlArgs); static ManyQuery<T> many(Class<T> clazz, String sql,
			Object... sqlArgs); static ManyQuery<T> many(Class<T> clazz, int sqlResId,
                                                            Object... sqlArgs); static ManyQuery<T> all(Class<T> clazz);  }