1 package org.sourceforge.vlibrary.user.valuebeans;
2 import java.sql.Timestamp;
3
4 /**
5 * Value bean representing a Library Transaction.
6 *
7 * @version $Revision$ $Date$
8 */
9 public class LibraryTransaction {
10 /** ID of reader performing transaction*/
11 private long reader = 0;
12
13 /** Id of Book */
14 private long book = 0;
15
16 /** Action code (defined in LibraryMgr statics) */
17 private long action = 0;
18
19 /** ID of transaction */
20 private long id = 0;
21
22 /** Transaction time stamp */
23 private Timestamp transTime;
24
25 /** Full name of the reader making the transaction */
26 private String readerName;
27
28 /** Title of the book */
29 private String bookTitle;
30
31 /** Description of the action */
32 private String actionString;
33
34 /** Phone number of the reader making the transaction */
35 private String readerPhone;
36
37 /** String representation of the time of the transaction */
38 private String timeString;
39
40 /** ID of the location where the transaction occurred */
41 private long location;
42
43 /** Description of the location where the transaction occurred */
44 private String locationDescription;
45
46 public LibraryTransaction() {
47 }
48
49 @Override
50 public String toString() {
51 return "<Transaction " +
52 "id=\"" + id +
53 "\" reader=\"" + reader +
54 "\" book=\"" + book +
55 "\" action=\"" + action +
56 "\" transTime=\"" + transTime +
57 "\" readerName=\"" + readerName +
58 "\" actionString=\"" + actionString +
59 "\" readerPhone=\"" + readerPhone +
60 "\" timeString=\"" + timeString +
61 "\" bookTitle=\"" + bookTitle +
62 "\" location=\"" + location +
63 "\" locationDescription=\"" + locationDescription +
64 "\" />";
65 }
66
67 /** Getter for property action.
68 * @return Value of property action.
69 */
70 public long getAction() {
71 return action;
72 }
73
74 /** Setter for property action.
75 * @param action New value of property action.
76 */
77 public void setAction(long action) {
78 this.action = action;
79 }
80
81 /** Getter for property book.
82 * @return Value of property book.
83 */
84 public long getBook() {
85 return book;
86 }
87
88 /** Setter for property book.
89 * @param book New value of property book.
90 */
91 public void setBook(long book) {
92 this.book = book;
93 }
94
95 /** Getter for property id.
96 * @return Value of property id.
97 */
98 public long getId() {
99 return id;
100 }
101
102 /** Setter for property id.
103 * @param id New value of property id.
104 */
105 public void setId(long id) {
106 this.id = id;
107 }
108
109 /** Getter for property reader.
110 * @return Value of property reader.
111 */
112 public long getReader() {
113 return reader;
114 }
115
116 /** Setter for property reader.
117 * @param reader New value of property reader.
118 */
119 public void setReader(long reader) {
120 this.reader = reader;
121 }
122
123 /** Getter for property transTime.
124 * @return Value of property transTime.
125 */
126 public Timestamp getTransTime() {
127 return transTime;
128 }
129
130 /** Setter for property transTime.
131 * @param transTime New value of property transTime.
132 */
133 public void setTransTime(Timestamp transTime) {
134 this.transTime = transTime;
135 }
136
137 /** Getter for property readerName.
138 * @return Value of property readerName.
139 */
140 public String getReaderName() {
141 return readerName;
142 }
143
144 /** Setter for property readerName.
145 * @param readerName New value of property readerName.
146 */
147 public void setReaderName(String readerName) {
148 this.readerName = readerName;
149 }
150
151 /** Getter for property bookTitle.
152 * @return Value of property bookTitle.
153 */
154 public String getBookTitle() {
155 return bookTitle;
156 }
157
158 /** Setter for property bookTitle.
159 * @param bookTitle New value of property bookTitle.
160 */
161 public void setBookTitle(java.lang.String bookTitle) {
162 this.bookTitle = bookTitle;
163 }
164
165 /** Getter for property readerPhone.
166 * @return Value of property readerPhone.
167 */
168 public String getReaderPhone() {
169 return readerPhone;
170 }
171
172 /** Setter for property readerPhone.
173 * @param readerPhone New value of property readerPhone.
174 */
175 public void setReaderPhone(String readerPhone) {
176 this.readerPhone = readerPhone;
177 }
178
179 /** Getter for property actionString.
180 * @return Value of property actionString.
181 */
182 public String getActionString() {
183 return actionString;
184 }
185
186 /** Setter for property actionString.
187 * @param actionString New value of property actionString.
188 */
189 public void setActionString(String actionString) {
190 this.actionString = actionString;
191 }
192
193 /** Getter for property timeString.
194 * @return Value of property timeString.
195 */
196 public String getTimeString() {
197 return timeString;
198 }
199
200 /** Setter for property timeString.
201 * @param timeString New value of property timeString.
202 */
203 public void setTimeString(String timeString) {
204 this.timeString = timeString;
205 }
206
207 /**
208 * @return the location
209 */
210 public long getLocation() {
211 return location;
212 }
213
214 /**
215 * @param location the location to set
216 */
217 public void setLocation(long location) {
218 this.location = location;
219 }
220
221 /**
222 * @return the locationDescription
223 */
224 public String getLocationDescription() {
225 return locationDescription;
226 }
227
228 /**
229 * @param locationDescription the locationDescription to set
230 */
231 public void setLocationDescription(String locationDescription) {
232 this.locationDescription = locationDescription;
233 }
234
235 }