@Override
    public User getUserByID(String id) {
        Connection conn = null;
        PreparedStatement stmt = null;
        User user = null;
        ResultSet rs = null;
        try {
            conn = dataSource.getConnection();
            stmt = conn.prepareStatement("SELECT USER_ID,USER_PASSWORD,USER_DATE FROM \"USER\" WHERE USER_ID=?");
            stmt.setString(1, id);
            rs = stmt.executeQuery();
            while (rs.next()) {//必須要有游標next才取的到值
                user = new User(rs.getString("USER_ID"), rs.getString("USER_PASSWORD"), rs.getTimestamp("USER_DATE"));
            }
        } catch (SQLException ex1) {
            throw new RuntimeException(ex1);
        } finally {
            if (rs != null) {
                try {
                    rs.close();
                } catch (SQLException ex) {
                    Logger.getLogger(BookDAO.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
            if (stmt != null) {
                try {
                    stmt.close();
                } catch (SQLException ex) {
                    Logger.getLogger(BookDAO.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
            if (conn != null) {
                try {
                    conn.close();
                } catch (SQLException ex1) {
                    Logger.getLogger(BookDAO.class.getName()).log(Level.SEVERE, null, ex1);
                }
            }

        }
        return user;
    }