ch7.accountLogin
Class RequestDataAccount

java.lang.Object
  extended by shared.PersistentBase
      extended by ch7.accountLogin.RequestDataAccount
All Implemented Interfaces:
java.io.Serializable

public class RequestDataAccount
extends PersistentBase
implements java.io.Serializable

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.

See Also:
Serialized Form

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

hobby

protected java.lang.String hobby
The variable to store the hobby. The variable is hidden from other classes, so it doesn't matter what name it has.


aversion

protected java.lang.String aversion
The variable to store the aversion. The variable is hidden from other classes, so it doesn't matter what name it has.


accountNumber

protected java.lang.String accountNumber
The variable to store the account number. The variable is hidden from other classes, so it doesn't matter what name it has.

Constructor Detail

RequestDataAccount

public RequestDataAccount()
Method Detail

getAccountNumber

@NotNull
@Pattern(regex="[a-zA-Z]{2}\\d{3}",
         message="must be in the format AA999.")
public java.lang.String getAccountNumber()
The accessor for the account number property.

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.

Returns:
The hobby that was entered.

setAccountNumber

public void setAccountNumber(java.lang.String accountNumber)
The mutator for the aversion property. 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.

Parameters:
accountNumber - The element data from the request

getHobby

@Pattern(regex=".*[^\\s].*",
         message="cannot be empty")
@NotNull
public java.lang.String getHobby()
/** The accessor for the hobby property. It implements required validation. If the hobby is not valid, then an error will be generated for it. Required validation is implemented with the Pattern and NotNull annotations.

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.

Returns:
The hobby that was entered.

setHobby

public void setHobby(java.lang.String hobby)
The mutator for the hobby property. 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.

Parameters:
hobby - The element data from the request

getAversion

@Pattern(regex=".*[^\\s].*",
         message="cannot be empty")
@NotNull
public java.lang.String getAversion()
The accessor for the aversion property. It implements required validation. If the aversion is not valid, then an error will be generated for it. Required validation is implemented with the Pattern and NotNull annotations.

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.

Returns:
The aversion that was entered.

setAversion

public void setAversion(java.lang.String aversion)
The mutator for the aversion property. 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.

Parameters:
aversion - The element data from the request