com.clra.web
Class ValidateMemberAccountName

java.lang.Object
com.clra.web.ValidateMember
com.clra.web.ValidateMemberAccountName
- class ValidateMemberAccountName
- extends ValidateMember
Checks whether a member's account name is valid and unique.
- Version:
- $Id: ValidateMemberAccountName.java,v 1.3 2003/02/26 03:38:46 rphall Exp $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PROPERTY_ACCOUNTNAME
public static final java.lang.String PROPERTY_ACCOUNTNAME
- See Also:
- Constant Field Values
form
protected final MemberInfoForm form
- The form that is being validated
ValidateMemberAccountName
ValidateMemberAccountName(MemberInfoForm f)
validate
void validate(org.apache.struts.action.ActionErrors errors)
- Checks whether a member's account name is valid and unique.
- Specified by:
validate in class ValidateMember
validateRestrictedAscii
protected final void validateRestrictedAscii(java.lang.String PROPERTY,
java.lang.String messageKey,
java.lang.String value,
org.apache.struts.action.ActionErrors errors)
isAccountNameAvailable
private static boolean isAccountNameAvailable(java.lang.String accountName,
int intMemberId)
throws java.sql.SQLException
- Checks whether any member uses the given account name. If no
such member is found, returns true.
Implementation note: Unlike MemberDBRead.findMemberByAccountName(String),
this method does not throw an exception when a match is not found.
Throwing and then catching an exception is inefficient, and should
be used only when exceptions are NOT expected. Here, no-match exceptions
are expected, which is why the MemberDBRead method is not used.
isAccountNameAvailable
private static boolean isAccountNameAvailable(java.lang.String accountName)
throws java.sql.SQLException
isAccountNameAvailable
private static boolean isAccountNameAvailable(java.sql.PreparedStatement stmt)
throws java.sql.SQLException
validateRequiredValue
protected final void validateRequiredValue(java.lang.String PROPERTY,
java.lang.String messageKey,
java.lang.String value,
org.apache.struts.action.ActionErrors errors)