Beispiel #1
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (getClass() != obj.getClass()) return false;
   final ICustomer other = (ICustomer) obj;
   if (getFirstname() == null) {
     if (other.getFirstname() != null) return false;
   } else if (!getFirstname().equals(other.getFirstname())) return false;
   if (getLastname() == null) {
     if (other.getLastname() != null) return false;
   } else if (!this.getLastname().equals(other.getLastname())) return false;
   return true;
 }
Beispiel #2
0
  public static ICustomer createCustomerInitializedWithNulls() {
    ICustomer customer = new Customer();
    customer.setBirthdate(null);
    customer.setContact(null);
    customer.setCustomerId((int) 0);
    customer.setFirstname(null);
    customer.setHome(null);
    customer.setLastname(null);
    customer.setGender(Gender.UNKNOWN);

    return customer;
  }
Beispiel #3
0
 public static ICustomer abelCustomer() {
   ICustomer customer = new Customer();
   customer.setCustomerId(1234);
   customer.setFirstname("Dieter");
   customer.setLastname("Abel");
   customer.setGender(Gender.MALE);
   customer.getHome().setZip((long) 97222);
   customer.getHome().setCity("Rimpar");
   customer.getContact().setPhone("09365/889933");
   return customer;
 }
Beispiel #4
0
 public void copyFrom(ICustomer source) {
   super.copyFrom(source);
   this.setCustomerId(source.getCustomerId());
 }