Package entity
Class CustomerAccount.Builder
java.lang.Object
entity.CustomerAccount.Builder
- Enclosing class:
CustomerAccount
Builder for creating
CustomerAccount
instances.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBuilder
(int customerId, int accountNo) Constructs a builder with required fields. -
Method Summary
Modifier and TypeMethodDescriptionaccountRole
(String role) build()
Builds and returns aCustomerAccount
instance.id
(int id)
-
Field Details
-
id
private int id -
customerId
private final int customerId -
accountNo
private final int accountNo -
accountRole
-
-
Constructor Details
-
Builder
public Builder(int customerId, int accountNo) Constructs a builder with required fields.- Parameters:
customerId
- customer IDaccountNo
- account number
-
-
Method Details
-
id
-
accountRole
-
build
Builds and returns aCustomerAccount
instance.- Returns:
- a new CustomerAccount
-