Skip to content

Commit 9934963

Browse files
committed
change account id type
1 parent 2782fcb commit 9934963

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/com/ibm/security/appscan/altoromutual/model/Account.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* @author Alexei
3131
*/
3232
public class Account {
33-
private long accountId = -1;
33+
private String accountId = "";
3434
private String accountName = null;
3535
private double balance = -1;
3636

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

50-
public Account(long accountId, String accountName, double balance) {
50+
public Account(String accountId, String accountName, double balance) {
5151
this.accountId = accountId;
5252
this.accountName = accountName;
5353
this.balance = balance;
5454
}
5555

56-
public long getAccountId() {
56+
public String getAccountId() {
5757
return accountId;
5858
}
5959

6060
public void setAccountId(int accountId) {
61-
this.accountId = accountId;
61+
this.accountId = Integer.toString(accountId);
6262
}
6363

6464
public double getBalance() {
@@ -103,7 +103,7 @@ public static Account[] fromBase64List (String b64accounts){
103103
}
104104

105105
public static Account makeAccount(String id) {
106-
return new Account(Long.parseLong(id), "Hello World", 0);
106+
return new Account(id, "Hello World", 0);
107107
}
108108

109109
public static String toBase64List(Account[] accounts){

0 commit comments

Comments
 (0)