ch5.requiredValidation
Class RequestDataRequired

java.lang.Object
  extended by ch5.requiredValidation.RequestDataRequired

public class RequestDataRequired
extends java.lang.Object

This bean will use Hibernate annotations to implement validation.


Field Summary
protected  java.lang.String aversion
          Stores the value of the aversion element.
protected  java.lang.String hobby
          Stores the value of the hobby element.
 
Constructor Summary
RequestDataRequired()
           
 
Method Summary
 java.lang.String getAversion()
          Accessor for the aversion element.
 java.lang.String getHobby()
          Accessor for the hobby element.
 void setAversion(java.lang.String aversion)
          Mutator for the aversion element.
 void setHobby(java.lang.String hobby)
          Mutator for the hobby element.
 
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
Stores the value of the hobby element.


aversion

protected java.lang.String aversion
Stores the value of the aversion element.

Constructor Detail

RequestDataRequired

public RequestDataRequired()
Method Detail

setHobby

public void setHobby(java.lang.String hobby)
Mutator for the hobby element.

Parameters:
hobby - The new value to store in the hobby.

getHobby

@Pattern(regex=".*\\S.*",
         message="cannot be empty")
@NotNull
public java.lang.String getHobby()
Accessor for the hobby element. The accessor is preceded by Hibernate annotations, which define the validation for this property.

Returns:
The current value of the hobby.

setAversion

public void setAversion(java.lang.String aversion)
Mutator for the aversion element.

Parameters:
aversion - The new value to store in the aversion.

getAversion

@Pattern(regex=".*\\S.*",
         message="cannot be empty")
@NotNull
public java.lang.String getAversion()
Accessor for the aversion element. The accessor is preceded by Hibernate annotations, which define the validation for this property.

Returns:
The current value of the aversion.