|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectshared.PersistentBase
ch7.accountLogin.RequestDataAccount
public class RequestDataAccount
The bean is annotated for persistence and required validation.
The Entity annotation indicates that a table will be created in the database with the name of the bean.
An account number property is added to the bean, that must be two letters followed by four digits.
| Field Summary | |
|---|---|
protected java.lang.String |
accountNumber
The variable to store the account number. |
protected java.lang.String |
aversion
The variable to store the aversion. |
protected java.lang.String |
hobby
The variable to store the hobby. |
| Fields inherited from class shared.PersistentBase |
|---|
id |
| Constructor Summary | |
|---|---|
RequestDataAccount()
|
|
| Method Summary | |
|---|---|
java.lang.String |
getAccountNumber()
The accessor for the account number property. |
java.lang.String |
getAversion()
The accessor for the aversion property. |
java.lang.String |
getHobby()
/** The accessor for the hobby property. |
void |
setAccountNumber(java.lang.String accountNumber)
The mutator for the aversion property. |
void |
setAversion(java.lang.String aversion)
The mutator for the aversion property. |
void |
setHobby(java.lang.String hobby)
The mutator for the hobby property. |
| Methods inherited from class shared.PersistentBase |
|---|
getId, setId |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String hobby
protected java.lang.String aversion
protected java.lang.String accountNumber
| Constructor Detail |
|---|
public RequestDataAccount()
| Method Detail |
|---|
@NotNull
@Pattern(regex="[a-zA-Z]{2}\\d{3}",
message="must be in the format AA999.")
public java.lang.String getAccountNumber()
It implements required validation. If the account number is not valid, then an error will be generated for it. Required validation is implemented with the Pattern annotation.
This name must agree with the name of the input element from the HTML page where the user enters data.
The name of the input element should be hobby.
public void setAccountNumber(java.lang.String accountNumber)
The name of the input element should be aversion.
accountNumber - The element data from the request
@Pattern(regex=".*[^\\s].*",
message="cannot be empty")
@NotNull
public java.lang.String getHobby()
This name must agree with the name of the input element from the HTML page where the user enters data.
The name of the input element should be hobby.
public void setHobby(java.lang.String hobby)
The name of the input element should be hobby.
hobby - The element data from the request
@Pattern(regex=".*[^\\s].*",
message="cannot be empty")
@NotNull
public java.lang.String getAversion()
This name must agree with the name of the input element from the HTML page where the user enters data.
The name of the input element should be aversion.
public void setAversion(java.lang.String aversion)
The name of the input element should be aversion.
aversion - The element data from the request
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||