Package com.ubx1.pdpscanner.server.database

Examples of com.ubx1.pdpscanner.server.database.MySQLConnection.disconnect()


        String cell = rs.getString("cell");
        if (rs.wasNull())
          cell = null;
        String creationDate = rs.getDate("creation_date").toString();

        conn.disconnect();

        HttpSession userSession = getThreadLocalRequest().getSession();

        userSession.setAttribute("id", id);
        userSession.setAttribute("name", name);
View Full Code Here


        System.out.println("User session created.");

        return null;
      } else {

        conn.disconnect();

        throw new BadLoginException(username, password,
            "Incorrect password");
      }
    }
View Full Code Here

      }
    }
    // Username does not exist
    else {

      conn.disconnect();

      throw new BadLoginException(username, password,
          "Incorrect username");
    }
  }
View Full Code Here

        + ","
        + username
        + ","
        + passwordHash + "," + cell + "," + creationDate + ")");

    conn.disconnect();

    return null;
  }

  /**
 
View Full Code Here

    if (rs.next()) {

      String dbPasswordHash = rs.getString("password");

      conn.disconnect();

      if (BCrypt.checkpw(password, dbPasswordHash)) {

        return null;
      } else {
View Full Code Here

        throw new BadPasswordException(password, "Incorrect password");
      }
    } else {

      conn.disconnect();

      throw new Exception("Could not find user with ID " + userId);
    }
  }
View Full Code Here

    newPassword = "'" + BCrypt.hashpw(newPassword, BCrypt.gensalt()) + "'";

    conn.SQLUpdate("UPDATE users SET password=" + newPassword
        + " WHERE id=" + userId);

    conn.disconnect();

    return null;
  }

}
View Full Code Here

      }

      projectsList.add(p);
    }

    conn.disconnect();

    return projectsList.toArray(new Project[0]);
  }

  /**
 
View Full Code Here

            + ","
            + projectId
            + ","
            + UserRole.OWNER.code() + ")");

        conn.disconnect();
      } catch (SVNException e) {

        throw new RepositoryException(svnUrl, svnUser, svnPassword,
            "Project repository couldn't be reached (svn info)");
      }
View Full Code Here

    conn.SQLUpdate("DELETE FROM versions WHERE project = " + id);

    // Finally delete the project itself
    conn.SQLUpdate("DELETE FROM projects WHERE id = " + id);

    conn.disconnect();

    return null;
  }

  /**
 
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.