Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.clra.web
Class ValidateMemberAccountName  view ValidateMemberAccountName download ValidateMemberAccountName.java

java.lang.Object
  extended bycom.clra.web.ValidateMember
      extended bycom.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 $

Field Summary
protected  MemberInfoForm form
          The form that is being validated
static java.lang.String PROPERTY_ACCOUNTNAME
           
 
Constructor Summary
(package private) ValidateMemberAccountName(MemberInfoForm f)
           
 
Method Summary
private static boolean isAccountNameAvailable(java.sql.PreparedStatement stmt)
           
private static boolean isAccountNameAvailable(java.lang.String accountName)
           
private static boolean isAccountNameAvailable(java.lang.String accountName, int intMemberId)
          Checks whether any member uses the given account name.
(package private)  void validate(org.apache.struts.action.ActionErrors errors)
          Checks whether a member's account name is valid and unique.
protected  void validateRequiredValue(java.lang.String PROPERTY, java.lang.String messageKey, java.lang.String value, org.apache.struts.action.ActionErrors errors)
           
protected  void validateRestrictedAscii(java.lang.String PROPERTY, java.lang.String messageKey, java.lang.String value, org.apache.struts.action.ActionErrors errors)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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

Constructor Detail

ValidateMemberAccountName

ValidateMemberAccountName(MemberInfoForm f)
Method Detail

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)