Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions src/main/java/springapp/command/ClientCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import springapp.domain.Client;

/**
* This command class is used to pass information back and force between the client and the server
* This command class is used to pass information back and force between the client and the server ---------
*
*/
public class ClientCommand {
Expand All @@ -12,6 +12,7 @@ public class ClientCommand {
private String name;
private String address;
private String phoneNumber;
private String email;

/**
* Creates a command object that has the initial values the same as the client passed in
Expand All @@ -23,6 +24,7 @@ public ClientCommand(Client client) {
this.name = client.getName();
this.address = client.getAddress();
this.phoneNumber = client.getPhoneNumber();
this.email = client.getEmail();
}
}

Expand Down Expand Up @@ -57,6 +59,14 @@ public void setAddress(String address) {
public void setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
}

/**
* Set the email of the client
* @param email the email
*/
public void setEmail(String email) {
this.email = email;
}

/**
* @return the client id, returns null if this client is new and not persisted to the database yet
Expand Down Expand Up @@ -85,5 +95,15 @@ public String getAddress() {
public String getPhoneNumber() {
return phoneNumber;
}


/**
* @return the client email
*/
public String getEmail() {
return email;
}




}