### Question:
DBQuery extends SqlSessionFactory { public DBQuery query(Class<T> clazz) { this.targetClass = clazz; dbTable = super.origin().addTable(targetClass.getAnnotation(OriginName.class).value()) ; return this; }  DBQuery query(Class<T> clazz); DBQuery addCondition(Condition condition); List<T> all(); T first();  }### Answer:
@Test public void query(){ SqlSession.init("root","root","jdbc:mysql: List<User> all = new DBQuery<User>().query(User.class).all(); for (User user : all) { log.info(user.toString()); } }