added customer-command-side

This commit is contained in:
dartpopikyardo
2016-02-03 23:04:15 +03:00
parent cbee50658e
commit e0691a61a2
13 changed files with 245 additions and 55 deletions

View File

@@ -7,40 +7,20 @@ import net.chrisrichardson.eventstore.Event;
*/
public class CustomerCreatedEvent implements Event {
private String ssn;
private String phoneNumber;
private Address address;
private CustomerInfo customerInfo;
public CustomerCreatedEvent() {
}
public CustomerCreatedEvent(String ssn, String phoneNumber, Address address) {
this.ssn = ssn;
this.phoneNumber = phoneNumber;
this.address = address;
public CustomerCreatedEvent(CustomerInfo customerInfo) {
this.customerInfo = customerInfo;
}
public String getSsn() {
return ssn;
public CustomerInfo getCustomerInfo() {
return customerInfo;
}
public void setSsn(String ssn) {
this.ssn = ssn;
}
public String getPhoneNumber() {
return phoneNumber;
}
public void setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
}
public Address getAddress() {
return address;
}
public void setAddress(Address address) {
this.address = address;
public void setCustomerInfo(CustomerInfo customerInfo) {
this.customerInfo = customerInfo;
}
}

View File

@@ -0,0 +1,53 @@
package net.chrisrichardson.eventstore.javaexamples.banking.backend.common.customers;
/**
* Created by popikyardo on 03.02.16.
*/
public class CustomerInfo {
private String email;
private String ssn;
private String phoneNumber;
private Address address;
public CustomerInfo() {
}
public CustomerInfo(String email, String ssn, String phoneNumber, Address address) {
this.email = email;
this.ssn = ssn;
this.phoneNumber = phoneNumber;
this.address = address;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getSsn() {
return ssn;
}
public void setSsn(String ssn) {
this.ssn = ssn;
}
public String getPhoneNumber() {
return phoneNumber;
}
public void setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
}
public Address getAddress() {
return address;
}
public void setAddress(Address address) {
this.address = address;
}
}