-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathAccount.java
More file actions
146 lines (128 loc) · 3.15 KB
/
Account.java
File metadata and controls
146 lines (128 loc) · 3.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
package com.printnode.api;
import java.io.Serializable;
/**
* Account object.
* When being used, will generally be created via the blank constructor.
* The other constructor is for CreateAccountJson,
* which requires firstname, lastname, email and password to be set.
* */
public class Account implements Serializable {
/**
* Id of this account. Not set if made from CreateAccountJson.
* */
private int id = -1;
/**
* Firstname of this account.
* */
private String firstname;
/**
* Lastname of this account.
* */
private String lastname;
/**
* Email of this account.
* */
private String email;
/**
* Password for this account.
* */
private String password;
/**
* CreatorReference of this account.
* */
private String creatorRef;
/**
* Default constructor.
* */
public Account() {
}
/**
* Constructor for CreateAccountJson. Should only be ran through there.
*
* @param newFirstname First name of account holder.
* @param newLastname lastname of account holder.
* @param newEmail email of account holder.
* @param newPassword password of account holder.
* */
public Account(final String newFirstname,
final String newLastname,
final String newEmail,
final String newPassword) {
firstname = newFirstname;
lastname = newLastname;
email = newEmail;
password = newPassword;
}
/**
* @param newId id to be set.
* */
public final void setId(final int newId) {
id = newId;
}
/**
* @param newFirstname firstname to be set.
* */
public final void setFirstname(final String newFirstname) {
firstname = newFirstname;
}
/**
* @param newLastname lastname to be set.
* */
public final void setLastname(final String newLastname) {
lastname = newLastname;
}
/**
* @param newEmail email to be set.
* */
public final void setEmail(final String newEmail) {
email = newEmail;
}
/**
* @param newPassword password to be set.
* */
public final void setPassword(final String newPassword) {
password = newPassword;
}
/**
* @param newCreatorRef creator reference to be set.
* */
public final void setCreatorRef(final String newCreatorRef) {
creatorRef = newCreatorRef;
}
/**
* @return id of account.
* */
public final int getId() {
return id;
}
/**
* @return firstname of account.
* */
public final String getFirstname() {
return firstname;
}
/**
* @return lastname of account.
* */
public final String getLastname() {
return lastname;
}
/**
* @return email of account.
* */
public final String getEmail() {
return email;
}
/**
* @return password of account.
* */
public final String getPassword() {
return password;
}
/**
* @return creatorRef of account.
* */
public final String getCreatorRef() {
return creatorRef;
}
}