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

change account id type #2

Open
wants to merge 1 commit into
base: AccountId
Choose a base branch
from
Open
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
10 changes: 5 additions & 5 deletions src/com/ibm/security/appscan/altoromutual/model/Account.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* @author Alexei
*/
public class Account {
private long accountId = -1;
private String accountId = "";
private String accountName = null;
private double balance = -1;

Expand All @@ -47,18 +47,18 @@ public static Account getAccount(long account) throws SQLException {
return DBUtil.getAccount(account);
}

public Account(long accountId, String accountName, double balance) {
public Account(String accountId, String accountName, double balance) {
this.accountId = accountId;
this.accountName = accountName;
this.balance = balance;
}

public long getAccountId() {
public String getAccountId() {
return accountId;
}

public void setAccountId(int accountId) {
this.accountId = accountId;
this.accountId = Integer.toString(accountId);
}

public double getBalance() {
Expand Down Expand Up @@ -103,7 +103,7 @@ public static Account[] fromBase64List (String b64accounts){
}

public static Account makeAccount(String id) {
return new Account(Long.parseLong(id), "Hello World", 0);
return new Account(id, "Hello World", 0);
}

public static String toBase64List(Account[] accounts){
Expand Down
Loading