Class Account.Name
java.lang.Object
com.aoindustries.aoserv.client.account.Account.Name
- All Implemented Interfaces:
DtoFactory<AccountName>,FastExternalizable,Internable<Account.Name>,Externalizable,Serializable,Comparable<Account.Name>
- Enclosing class:
Account
public static final class Account.Name
extends Object
implements Comparable<Account.Name>, FastExternalizable, DtoFactory<AccountName>, Internable<Account.Name>
The unique, case-insensitive identifier for an
Account. Account names must:
- Be non-null
- Be non-empty
- Be between 2 and 32 characters
- Must start with
[a-z,A-Z] - Must end with
[a-z,A-Z,0-9] - Must contain only
[a-z,A-Z,0-9,_] - May not have consecutive underscores
- Author:
- AO Industries, Inc.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(Account.Name other) booleangetDto()longinthashCode()intern()Interns this name much in the same fashion asString.intern().voidtoString()Gets the upper-case form of the code.static ValidationResultValidates a name.static Account.Namevoid
-
Field Details
-
MIN_LENGTH
public static final int MIN_LENGTH- See Also:
-
MAX_LENGTH
public static final int MAX_LENGTH- See Also:
-
-
Constructor Details
-
Name
Deprecated.Only required for implementation, do not use directly.- See Also:
-
-
Method Details
-
validate
Validates a name. -
valueOf
- Parameters:
name- whennull, returnsnull- Throws:
ValidationException
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareToin interfaceComparable<Account.Name>
-
toString
-
toUpperCase
Gets the upper-case form of the code. If two different names are interned and their toUpperCase is the same String instance, then they are equal in case-insensitive manner. -
intern
Interns this name much in the same fashion asString.intern().- Specified by:
internin interfaceInternable<Account.Name>- See Also:
-
getDto
- Specified by:
getDtoin interfaceDtoFactory<AccountName>
-
getSerialVersionUID
public long getSerialVersionUID()- Specified by:
getSerialVersionUIDin interfaceFastExternalizable
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
