Added toString

This commit is contained in:
Arjen Poutsma
2007-04-12 21:51:41 +00:00
parent 74a880e1a5
commit 1152f132c3
2 changed files with 9 additions and 3 deletions

View File

@@ -54,8 +54,7 @@ public class Passenger extends Entity {
}
public int hashCode() {
int result;
result = getFirstName().hashCode();
int result = getFirstName().hashCode();
result = 29 * result + getLastName().hashCode();
return result;
}
@@ -75,4 +74,8 @@ public class Passenger extends Entity {
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String toString() {
return firstName + " " + lastName;
}
}

View File

@@ -19,7 +19,6 @@ package org.springframework.ws.samples.airline.security;
import org.acegisecurity.GrantedAuthority;
import org.acegisecurity.GrantedAuthorityImpl;
import org.acegisecurity.userdetails.UserDetails;
import org.springframework.ws.samples.airline.domain.FrequentFlyer;
/**
@@ -70,4 +69,8 @@ public class FrequentFlyerDetails implements UserDetails {
public FrequentFlyer getFrequentFlyer() {
return frequentFlyer;
}
public String toString() {
return frequentFlyer.toString();
}
}