1 package org.sourceforge.vlibrary.user.domain;
2
3
4
5
6
7
8
9
10
11
12 public class Author {
13 private long id = 0;
14 private String lastName = null;
15 private String firstName = null;
16
17 public Author() {
18 }
19
20 public Author(String first, String last) {
21 this.firstName = first;
22 this.lastName = last;
23 }
24
25 public Author(String first, String last, long id) {
26 this.firstName = first;
27 this.lastName = last;
28 this.id = id;
29 }
30
31 public String getFirstName() {
32 return firstName;
33 }
34
35 public long getId() {
36 return id;
37 }
38
39 public String getLastName() {
40 return lastName;
41 }
42
43 public void setFirstName(String firstName) {
44 this.firstName = firstName;
45 }
46
47 public void setId(long id) {
48 this.id = id;
49 }
50
51 public void setId(Long id) {
52 if (id != null){
53 this.id = id.longValue();
54 }
55 }
56
57 public void setLastName(String lastName) {
58 this.lastName = lastName;
59 }
60
61 public String toString() {
62 return "<Author id=\"" + id + "\" Firstname=\"" + firstName + "\" Lastname=\"" + lastName + "\" />";
63 }
64 }