|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bankframe.ejb.Validator
public abstract class Validator
Constructor Summary | |
---|---|
Validator()
|
Method Summary | |
---|---|
void |
validate(Double data,
int errorNumber)
This method validates a Double for null. |
void |
validate(Integer data,
int errorNumber)
This method validates an Integer for null. |
void |
validate(String data,
int errorNumber,
int maxDataSize)
This method validates a piece of data for null and greater than a max length. |
void |
validateCharacters(String data,
int errorNumber)
This method checks if the data contains all characters (A-Z, a-z, and 0-9 ) and is not null. |
void |
validateDateString(String data,
int errorNumber)
This methog validates a String that represents a date. |
void |
validateDigits(String data,
int errorNumber)
This method checks if the data contains all digits and is not null. |
void |
validateExactLength(String data,
int errorNumber,
int exactSize)
This method validates if the data is the exact length specified. |
void |
validateForNull(Object data,
int errorNumber)
This method validates that the object is not null. |
void |
validatePastDateString(String data,
int errorNumber)
This method validates that a date string represents a date in the past with respect to the current system date. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Validator()
Method Detail |
---|
public void validate(Double data, int errorNumber) throws ValidationException
data
- Double Data to be validatederrorNumber
- errorNumber to be used by ValidationException (if it is thrown)
ValidationException
- if the object is nullpublic void validate(Integer data, int errorNumber) throws ValidationException
data
- integer data to be validatederrorNumber
- the errorNumber to be used by ValidationException ( if it is thrown )
ValidationException
- if the object is nullpublic void validate(String data, int errorNumber, int maxDataSize) throws ValidationException
data
- the data to be validatederrorNumber
- the errorNumber to be used by ValidationException (if it is thrown)maxDataSize
- the maximum size of the data
ValidationException
- if the object is null or greater than the max lengthpublic void validateCharacters(String data, int errorNumber) throws ValidationException
data
- String Data to be validatederrorNumber
- errorNumber to be used by ValidationException ( if it is thrown )
ValidationException
- if the object is null or is not all characterspublic void validateDateString(String data, int errorNumber) throws ValidationException
data
- String Data to be validatederrorNumber
- errorNumber to be used by ValidationException ( if it is thrown )
ValidationException
- Thrown if the object is null or does not have the correct formatpublic void validateDigits(String data, int errorNumber) throws ValidationException
data
- the data to be validatederrorNumber
- the errorNumber to be used by ValidationException (if it is thrown)
ValidationException
- if the object is null or does not contain all digitspublic void validateExactLength(String data, int errorNumber, int exactSize) throws ValidationException
data
- the data to be validatederrorNumber
- the errorNumber to be used by ValidationException (if it is thrown)exactSize
- the required length of the String
ValidationException
- if the object is null or is not the correct lengthpublic void validateForNull(Object data, int errorNumber) throws ValidationException
data
- the object to be validatederrorNumber
- the errorNumber to be used by ValidationException (if it is thrown)
ValidationException
- if the object is nullpublic void validatePastDateString(String data, int errorNumber) throws ValidationException
data
- the string to be validatederrorNumber
- the errorNumber to be used by ValidationException (if it is thrown)
ValidationException
- if the object is null or the date is not a past date
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |