Class Server.Name
- java.lang.Object
-
- com.aoindustries.aoserv.client.postgresql.Server.Name
-
- All Implemented Interfaces:
DtoFactory<PostgresServerName>,Internable<Server.Name>,Serializable,Comparable<Server.Name>
- Enclosing class:
- Server
public static final class Server.Name extends Object implements Comparable<Server.Name>, Serializable, DtoFactory<PostgresServerName>, Internable<Server.Name>
Represents a name that may be used for a PostgreSQL installation. Names must:- Be non-null
- Be non-empty
- Be between 1 and 31 characters
- Must start with
[a-z,0-9] - The rest of the characters may contain [a-z], [0-9], period (.), hyphen (-), and underscore (_)
- Author:
- AO Industries, Inc.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static intMAX_LENGTH
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Server.Name other)booleanequals(Object O)PostgresServerNamegetDto()inthashCode()Server.Nameintern()Interns this name much in the same fashion asString.intern().StringtoString()static ValidationResultvalidate(String name)Validates a PostgreSQL server name.static Server.NamevalueOf(String name)
-
-
-
Field Detail
-
MAX_LENGTH
public static final int MAX_LENGTH
- See Also:
- Constant Field Values
-
-
Method Detail
-
validate
public static ValidationResult validate(String name)
Validates a PostgreSQL server name.
-
valueOf
public static Server.Name valueOf(String name) throws ValidationException
- Parameters:
name- whennull, returnsnull- Throws:
ValidationException
-
compareTo
public int compareTo(Server.Name other)
- Specified by:
compareToin interfaceComparable<Server.Name>
-
intern
public Server.Name intern()
Interns this name much in the same fashion asString.intern().- Specified by:
internin interfaceInternable<Server.Name>- See Also:
String.intern()
-
getDto
public PostgresServerName getDto()
- Specified by:
getDtoin interfaceDtoFactory<PostgresServerName>
-
-