public UserAccountInfoBean getAccountInfo(String userName) {
    // TODO Auto-generated method stub
    Connection con = getConnection();
    RESTMagicDoorDao dbPro = new RESTMagicDoorDao(con);

    UserAccountInfoBean bean = dbPro.selectAccountInfo(userName);

    if (bean != null) {
      commit(con);
    } else {
      rollback(con);
    }
    close(con);

    return bean;
  }
  public ArrayList<AppointmentRespDetailBean> getAppointmentsOfTheLecturerUserOnTheDate(
      QueryForAppointments query) {
    // TODO Auto-generated method stub
    Connection con = getConnection();
    RESTMagicDoorDao dbPro = new RESTMagicDoorDao(con);

    ArrayList<AppointmentRespDetailBean> bean =
        dbPro.selectAppointmentsOfTheLecturerUserOnTheDate(query);

    if (bean != null) {
      commit(con);
    } else {
      rollback(con);
    }
    close(con);
    return bean;
  }