protected void doUpdateUser(User user) throws UsersRepositoryException {
  Connection conn=null;
  PreparedStatement updateUserStatement=null;
  try {
    conn=openConnection();
    updateUserStatement=conn.prepareStatement(m_updateUserSql);
    setUserForUpdateStatement(user,updateUserStatement);
    updateUserStatement.execute();
  }
 catch (  SQLException sqlExc) {
    sqlExc.printStackTrace();
    throw new UsersRepositoryException("Error accessing database",sqlExc);
  }
 finally {
    theJDBCUtil.closeJDBCStatement(updateUserStatement);
    theJDBCUtil.closeJDBCConnection(conn);
  }
}

protected void doUpdateUser ( User user ) throws UsersRepositoryException { Connection conn = null ; PreparedStatement updateUserStatement = null ; try { conn = openConnection ( ) ; updateUserStatement = conn . prepareStatement ( m_updateUserSql ) ; setUserForUpdateStatement ( user , updateUserStatement ) ; updateUserStatement . execute ( ) ; } catch ( SQLException sqlExc ) { sqlExc . printStackTrace ( ) ; throw new UsersRepositoryException ( "Error accessing database" , sqlExc ) ; } finally { theJDBCUtil . closeJDBCStatement ( updateUserStatement ) ; theJDBCUtil . closeJDBCConnection ( conn ) ; } }
updates a user record to match the supplied user .
