ch5.persistentData
Class RequestDataPersistent

java.lang.Object
  extended by shared.PersistentBase
      extended by ch5.persistentData.RequestDataPersistent
All Implemented Interfaces:
java.io.Serializable

public class RequestDataPersistent
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.

See Also:
Serialized Form

Field Summary
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
RequestDataPersistent()
          There must be a default constructor in order for Hibernate to retrieve the data from the database.
 
Method Summary
 java.lang.String getAversion()
          The accessor for the aversion property.
 java.lang.String getHobby()
          The accessor for the hobby 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 varible 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 varible is hidden from other classes, so it doesn't matter what name it has.

Constructor Detail

RequestDataPersistent

public RequestDataPersistent()
There must be a default constructor in order for Hibernate to retrieve the data from the database.

Method Detail

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 hooby from the request data.

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 aversion from the request data.