@Override
 public RestaurantLanguageDTO toDTO() {
   RestaurantLanguageDTO dto =
       new RestaurantLanguageDTO(
           id == null ? null : id.toString(),
           name,
           address,
           introduce,
           languageCode == null ? null : languageCode.toString(),
           restaurantId == null ? null : restaurantId.toString());
   return dto;
 }
예제 #2
0
파일: User.java 프로젝트: alex955/swt15w10
 /**
  * Instantiates a new user.
  *
  * @param id the id
  * @param userAccount the user account
  * @param lastName the last name
  * @param firstName the first name
  * @param country the country
  * @param email the email
  * @param city the city
  * @param zip the zip
  * @param streetName the street name
  * @param addressAddition the address addition
  * @param language1 the language1
  * @param language2 the language2
  * @param language3 the language3
  */
 public User(
     long id,
     UserAccount userAccount,
     String lastName,
     String firstName,
     String country,
     String email,
     String city,
     String zip,
     String streetName,
     String addressAddition,
     String language1,
     String language2,
     String language3) {
   this.userAccount = userAccount;
   this.username = userAccount.getUsername();
   this.lastName = lastName;
   this.firstName = firstName;
   this.country = country;
   this.email = email;
   this.city = city;
   this.zip = zip;
   this.streetName = streetName;
   this.addressAddition = addressAddition;
   this.language1 = language1;
   this.language2 = language2;
   this.language3 = language3;
   this.validated = false;
   this.hashcode = (lastName + firstName + Long.toString(id)).hashCode();
   this.usernameLowercase = username.toLowerCase();
 }
예제 #3
0
 public String toString() {
   return id != null ? id.toString() : "-1";
 }
예제 #4
0
 @Override
 public String getIdentifier() {
   return Long.toString(this.id);
 }