Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#11878] Remove ref by email and institute #13044

Merged
merged 1 commit into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions src/main/java/teammates/sqllogic/api/Logic.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,6 @@ public AccountRequest getAccountRequest(UUID id) {
return accountRequestLogic.getAccountRequest(id);
}

/**
* Gets the account request with the given email and institute.
*
* @return account request with the given email and institute.
*/
public AccountRequest getAccountRequest(String email, String institute) {
return accountRequestLogic.getAccountRequest(email, institute);
}

/**
* Gets the account request with the given {@code id}.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,6 @@ public AccountRequest getAccountRequest(UUID id) {
return accountRequestDb.getAccountRequest(id);
}

/**
* Gets account request associated with the {@code email} and {@code institute}.
*/
public AccountRequest getAccountRequest(String email, String institute) {

return accountRequestDb.getAccountRequest(email, institute);
}

/**
* Gets the account request associated with the {@code id}.
*/
Expand Down
14 changes: 0 additions & 14 deletions src/main/java/teammates/storage/sqlapi/AccountRequestsDb.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,6 @@ public AccountRequest getAccountRequest(UUID id) {
return HibernateUtil.get(AccountRequest.class, id);
}

/**
* Get AccountRequest by {@code email} and {@code institute} from database.
*/
public AccountRequest getAccountRequest(String email, String institute) {
CriteriaBuilder cb = HibernateUtil.getCriteriaBuilder();
CriteriaQuery<AccountRequest> cr = cb.createQuery(AccountRequest.class);
Root<AccountRequest> root = cr.from(AccountRequest.class);
cr.select(root).where(cb.and(cb.equal(
root.get("email"), email), cb.equal(root.get("institute"), institute)));

TypedQuery<AccountRequest> query = HibernateUtil.createQuery(cr);
return query.getResultStream().findFirst().orElse(null);
}

/**
* Get all Account Requests with {@code status} of 'pending'.
*/
Expand Down
Loading