Package com.hdfs.util

Examples of com.hdfs.util.DBUtil.closeConnection()


      }
      return logList;
    } catch (SQLException e) {
      e.printStackTrace();
    } finally {
      util.closeConnection(conn);
    }
    return null;
  }

  public boolean write(String username, String action, String filename,
View Full Code Here


      if (pstmt.executeUpdate() > 0)
        return true;
    } catch (SQLException e) {
      e.printStackTrace();
    } finally {
      util.closeConnection(conn);
    }
    return false;
  }

}
View Full Code Here

        u.setPassword(rs.getString(2));
      }
    } catch (SQLException e) {
      e.printStackTrace();
    } finally {
      util.closeConnection(conn);
    }
    return u;
  }

  public boolean register(String username, String password) {
View Full Code Here

        return false;
      }
    } catch (SQLException e) {
      e.printStackTrace();
    } finally {
      util.closeConnection(conn);
    }
    return false;
  }
  public User getinfo(String username) {
    User u = null;
View Full Code Here

        u.setPassword(rs.getString(2));
      }
    } catch (SQLException e) {
      e.printStackTrace();
    } finally {
      util.closeConnection(conn);
    }
    return u;
  }
}
View Full Code Here

        return false;
      }
    } catch (SQLException e) {
      e.printStackTrace();
    } finally {
      util.closeConnection(conn);
    }
    return false;
  }

  public ArrayList<String> get(String username) {
View Full Code Here

        paths.add(s);
      }
    } catch (SQLException e) {
      e.printStackTrace();
    } finally {
      util.closeConnection(conn);
    }
    return paths;
  }

  public boolean delete(String pathname) {
View Full Code Here

        return false;
      }
    } catch (SQLException e) {
      e.printStackTrace();
    } finally {
      util.closeConnection(conn);
    }
    return false;
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.