30
30
* @author Alexei
31
31
*/
32
32
public class Account {
33
- private long accountId = - 1 ;
33
+ private String accountId = "" ;
34
34
private String accountName = null ;
35
35
private double balance = -1 ;
36
36
@@ -47,18 +47,18 @@ public static Account getAccount(long account) throws SQLException {
47
47
return DBUtil .getAccount (account );
48
48
}
49
49
50
- public Account (long accountId , String accountName , double balance ) {
50
+ public Account (String accountId , String accountName , double balance ) {
51
51
this .accountId = accountId ;
52
52
this .accountName = accountName ;
53
53
this .balance = balance ;
54
54
}
55
55
56
- public long getAccountId () {
56
+ public String getAccountId () {
57
57
return accountId ;
58
58
}
59
59
60
60
public void setAccountId (int accountId ) {
61
- this .accountId = accountId ;
61
+ this .accountId = Integer . toString ( accountId ) ;
62
62
}
63
63
64
64
public double getBalance () {
@@ -103,7 +103,7 @@ public static Account[] fromBase64List (String b64accounts){
103
103
}
104
104
105
105
public static Account makeAccount (String id ) {
106
- return new Account (Long . parseLong ( id ) , "Hello World" , 0 );
106
+ return new Account (id , "Hello World" , 0 );
107
107
}
108
108
109
109
public static String toBase64List (Account [] accounts ){
0 commit comments