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 int
MAX_LENGTH
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(Server.Name other)
boolean
equals(Object obj)
PostgresServerName
getDto()
int
hashCode()
Server.Name
intern()
Interns this name much in the same fashion asString.intern()
.String
toString()
static ValidationResult
validate(String name)
Validates a PostgreSQL server name.static Server.Name
valueOf(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:
compareTo
in interfaceComparable<Server.Name>
-
intern
public Server.Name intern()
Interns this name much in the same fashion asString.intern()
.- Specified by:
intern
in interfaceInternable<Server.Name>
- See Also:
String.intern()
-
getDto
public PostgresServerName getDto()
- Specified by:
getDto
in interfaceDtoFactory<PostgresServerName>
-
-