Introduction to CreateAccountJson
Introduction to CreateAccountJson
CreateAccountJsonThe CreateAccountJsoncreAccCreaccJson
The constructor of CreateAccountJsoncreAccCreateAccountFormCreaccJson
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
WebControllerThe CreateAccountJsonWebControllershowCreateAccFormprocessCreateAccCreateAccountJson
The showCreateAccFormWebController
@GetMapping("/createacc")
public String showCreateAccForm(CreateAccountForm createAccForm,
Model model)
{
model.addAttribute(ACCOUNT_TYPES, AccountType.values());
return CREATE_ACCOUNT_FORM;
}
The processCreateAccWebControllerCreateAccountJson
@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