1 package org.springframework.samples.jpetstore.web.spring; 2 3 import org.springframework.samples.jpetstore.domain.Account; 4 5 9 public class AccountForm { 10 11 private Account account; 12 13 private boolean newAccount; 14 15 private String repeatedPassword; 16 17 public AccountForm(Account account) { 18 this.account = account; 19 this.newAccount = false; 20 } 21 22 public AccountForm() { 23 this.account = new Account(); 24 this.newAccount = true; 25 } 26 27 public Account getAccount() { 28 return account; 29 } 30 31 public boolean isNewAccount() { 32 return newAccount; 33 } 34 35 public void setRepeatedPassword(String repeatedPassword) { 36 this.repeatedPassword = repeatedPassword; 37 } 38 39 public String getRepeatedPassword() { 40 return repeatedPassword; 41 } 42 43 } 44 | Popular Tags |