163 if (getClass() != obj.getClass()) {
166 final CentralRepoAccount other = (CentralRepoAccount) obj;
167 if (this.accountId != other.
getId()) {
170 if (!Objects.equals(
this.typeSpecificIdentifier, other.
getIdentifier())) {
255 +
" WHERE LOWER(accounts.account_unique_identifier) = LOWER(?)";
257 List<Object> params =
new ArrayList<>();
258 params.add(normalizedAccountIdentifier);
263 return queryCallback.getAccountsList();
297 if (StringUtils.isEmpty(accountIdentifier)) {
298 throw new InvalidAccountIDException(
"Account id is null or empty.");
301 String normalizedAccountIdentifier;
308 normalizedAccountIdentifier = accountIdentifier.toLowerCase().trim();
311 throw new InvalidAccountIDException(
"Failed to normalize the account idenitier " + accountIdentifier, ex);
313 return normalizedAccountIdentifier;
327 if (StringUtils.isBlank(accountIdentifier)) {
328 throw new InvalidAccountIDException(
"Account identifier is null or empty.");
331 String normalizedAccountIdentifier;
333 if (crAccountType.getAcctType().equals(Account.Type.PHONE)) {
335 }
else if (crAccountType.getAcctType().equals(Account.Type.EMAIL)) {
339 normalizedAccountIdentifier = accountIdentifier.toLowerCase();
342 throw new InvalidAccountIDException(String.format(
"Account id normaization failed, invalid account identifier %s", accountIdentifier), ex);
345 return normalizedAccountIdentifier;