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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(Account.Name other) boolean
getDto()
long
int
hashCode()
intern()
Interns this name much in the same fashion asString.intern()
.void
toString()
Gets the upper-case form of the code.static ValidationResult
Validates a name.static Account.Name
void
-
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:
compareTo
in 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:
intern
in interfaceInternable<Account.Name>
- See Also:
-
getDto
- Specified by:
getDto
in interfaceDtoFactory<AccountName>
-
getSerialVersionUID
public long getSerialVersionUID()- Specified by:
getSerialVersionUID
in interfaceFastExternalizable
-
writeExternal
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
readExternal
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-