com.ora.jsp.beans.userinfo
Class UserInfoBean

java.lang.Object
  |
  +--com.ora.jsp.beans.userinfo.UserInfoBean
All Implemented Interfaces:
java.io.Serializable

public class UserInfoBean
extends java.lang.Object
implements java.io.Serializable

This class contains information about a user. It's used to show how a bean can be used to validate user input and format output so it's suitable for HTML.

Version:
1.0
Author:
Hans Bergsten, Gefion software
See Also:
Serialized Form

Field Summary
private  java.lang.String birthDate
           
private  java.lang.String birthDateInput
           
private static java.lang.String DATE_FORMAT_PATTERN
           
private  java.lang.String emailAddr
           
private  java.lang.String emailAddrInput
           
private  java.lang.String[] interests
           
private  boolean isInitialized
           
private  java.lang.String luckyNumber
           
private  java.lang.String luckyNumberInput
           
private static int MAX_LUCKY_NUMBER
           
private static int MIN_LUCKY_NUMBER
           
private  java.lang.String sex
           
private static java.lang.String[] SEX_LIST
           
private  java.lang.String sexInput
           
private  java.lang.String userName
           
 
Constructor Summary
UserInfoBean()
           
 
Method Summary
 java.lang.String getBirthDate()
          Returns the birthDate property value
 java.lang.String getBirthDateFormatted()
          Returns the birthDate property value, with all HTML special characters converted to HTML character entities
 java.lang.String getEmailAddr()
          Returns the emailAddr property value
 java.lang.String getEmailAddrFormatted()
          Returns the emailAddr property value, with all HTML special characters converted to HTML character entities
 java.lang.String[] getInterests()
          Returns the interests property value
 java.lang.String[] getInterestsFormatted()
          Returns the interests property value, with all HTML special characters converted to HTML character entities
 java.lang.String getLuckyNumber()
          Returns the luckyNumber property value
 java.lang.String getLuckyNumberFormatted()
          Returns the luckyNumber property value, with all HTML special characters converted to HTML character entities
 java.lang.String getPropertyStatusMsg()
          Returns an HTML fragment with information about all invalid property values, or an empty String if all properties are valid.
 java.lang.String getSex()
          Returns the sex property value
 java.lang.String getSexFormatted()
          Returns the sex property value, with all HTML special characters converted to HTML character entities
 java.lang.String getUserName()
          Returns the userName property value
 java.lang.String getUserNameFormatted()
          Returns the userName property value, with all HTML special characters converted to HTML character entities
private  boolean isInitialized()
          Returns true if at least one property has been set
 boolean isValid()
          Returns true if all property values have valid values (they are only set if the value is valid).
 void setBirthDate(java.lang.String birthDate)
          Sets the birthDate property value, if it's valid
 void setEmailAddr(java.lang.String emailAddr)
          Sets the emailAddr property value, if it's valid
 void setInterests(java.lang.String[] interests)
          Sets the interests property value
 void setLuckyNumber(java.lang.String luckyNumber)
          Sets the luckyNumber property value, if it's valid
 void setSex(java.lang.String sex)
          Sets the sex property value, if it's valid
 void setUserName(java.lang.String userName)
          Sets the userName property value
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

DATE_FORMAT_PATTERN

private static java.lang.String DATE_FORMAT_PATTERN

SEX_LIST

private static java.lang.String[] SEX_LIST

MIN_LUCKY_NUMBER

private static int MIN_LUCKY_NUMBER

MAX_LUCKY_NUMBER

private static int MAX_LUCKY_NUMBER

birthDate

private java.lang.String birthDate

birthDateInput

private java.lang.String birthDateInput

emailAddr

private java.lang.String emailAddr

emailAddrInput

private java.lang.String emailAddrInput

interests

private java.lang.String[] interests

luckyNumber

private java.lang.String luckyNumber

luckyNumberInput

private java.lang.String luckyNumberInput

sex

private java.lang.String sex

sexInput

private java.lang.String sexInput

userName

private java.lang.String userName

isInitialized

private boolean isInitialized
Constructor Detail

UserInfoBean

public UserInfoBean()
Method Detail

getBirthDate

public java.lang.String getBirthDate()
Returns the birthDate property value

getBirthDateFormatted

public java.lang.String getBirthDateFormatted()
Returns the birthDate property value, with all HTML special characters converted to HTML character entities

setBirthDate

public void setBirthDate(java.lang.String birthDate)
Sets the birthDate property value, if it's valid

getEmailAddr

public java.lang.String getEmailAddr()
Returns the emailAddr property value

getEmailAddrFormatted

public java.lang.String getEmailAddrFormatted()
Returns the emailAddr property value, with all HTML special characters converted to HTML character entities

setEmailAddr

public void setEmailAddr(java.lang.String emailAddr)
Sets the emailAddr property value, if it's valid

getInterests

public java.lang.String[] getInterests()
Returns the interests property value

getInterestsFormatted

public java.lang.String[] getInterestsFormatted()
Returns the interests property value, with all HTML special characters converted to HTML character entities

setInterests

public void setInterests(java.lang.String[] interests)
Sets the interests property value

getLuckyNumber

public java.lang.String getLuckyNumber()
Returns the luckyNumber property value

getLuckyNumberFormatted

public java.lang.String getLuckyNumberFormatted()
Returns the luckyNumber property value, with all HTML special characters converted to HTML character entities

setLuckyNumber

public void setLuckyNumber(java.lang.String luckyNumber)
Sets the luckyNumber property value, if it's valid

getSex

public java.lang.String getSex()
Returns the sex property value

getSexFormatted

public java.lang.String getSexFormatted()
Returns the sex property value, with all HTML special characters converted to HTML character entities

setSex

public void setSex(java.lang.String sex)
Sets the sex property value, if it's valid

getUserName

public java.lang.String getUserName()
Returns the userName property value

getUserNameFormatted

public java.lang.String getUserNameFormatted()
Returns the userName property value, with all HTML special characters converted to HTML character entities

setUserName

public void setUserName(java.lang.String userName)
Sets the userName property value

getPropertyStatusMsg

public java.lang.String getPropertyStatusMsg()
Returns an HTML fragment with information about all invalid property values, or an empty String if all properties are valid.

isValid

public boolean isValid()
Returns true if all property values have valid values (they are only set if the value is valid).

isInitialized

private boolean isInitialized()
Returns true if at least one property has been set