Introduction to CreateAccountJson
Introduction to CreateAccountJson
CreateAccountJson
The CreateAccountJson
creAcc
CreaccJson
The constructor of CreateAccountJson
creAcc
CreateAccountForm
CreaccJson
public CreateAccountJson(CreateAccountForm createAccountForm)
{
creAcc = new CreaccJson(createAccountForm.getAccountType().toString(),
createAccountForm.getCustNumber(),
createAccountForm.getOverdraftLimit(),
createAccountForm.getInterestRate());
}
Methods
The CreateAccountJson
-
: This method retrieves thegetCreAcc
field, allowing access to the account details.creAcc
-
: This method formats the account details into a readable string, making it easier to display or log the information.toPrettyString
-
: This method provides a string representation of thetoString
object, which can be useful for debugging or logging purposes.CreateAccountJson
Usage in WebController
WebController
The CreateAccountJson
WebController
showCreateAccForm
processCreateAcc
CreateAccountJson
The showCreateAccForm
WebController
@GetMapping("/createacc")
public String showCreateAccForm(CreateAccountForm createAccForm,
Model model)
{
model.addAttribute(ACCOUNT_TYPES, AccountType.values());
return CREATE_ACCOUNT_FORM;
}
The processCreateAcc
WebController
CreateAccountJson
@PostMapping("/createacc")
public String processCreateAcc(@Valid CreateAccountForm createAccForm,
BindingResult bindingResult, Model model)
This is an auto-generated document by Swimm 🌊 and has not yet been verified by a human