Class Database.Name
java.lang.Object
com.aoindustries.aoserv.client.mysql.Database.Name
- All Implemented Interfaces:
DtoFactory<MysqlDatabaseName>
,Internable<Database.Name>
,Serializable
,Comparable<Database.Name>
- Enclosing class:
Database
public static final class Database.Name
extends Object
implements Comparable<Database.Name>, Serializable, DtoFactory<MysqlDatabaseName>, Internable<Database.Name>
Represents a name that may be used for a
Database
. Database names must:
- Be non-null
- Be non-empty
- Be between 1 and 64 characters
- Characters may contain
[a-z,A-Z,0-9,_,-,.,(space)]
- Author:
- AO Industries, Inc.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The longest name allowed for a MySQL database. -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(Database.Name other) boolean
getDto()
int
hashCode()
intern()
Interns this name much in the same fashion asString.intern()
.toString()
static ValidationResult
Validates a MySQL database name.static Database.Name
-
Field Details
-
MAX_LENGTH
public static final int MAX_LENGTHThe longest name allowed for a MySQL database.- See Also:
-
-
Method Details
-
validate
Validates a MySQL database name. -
valueOf
- Parameters:
name
- whennull
, returnsnull
- Throws:
ValidationException
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareTo
in interfaceComparable<Database.Name>
-
toString
-
intern
Interns this name much in the same fashion asString.intern()
.- Specified by:
intern
in interfaceInternable<Database.Name>
- See Also:
-
getDto
- Specified by:
getDto
in interfaceDtoFactory<MysqlDatabaseName>
-