Class Database.Name
java.lang.Object
com.aoindustries.aoserv.client.postgresql.Database.Name
- All Implemented Interfaces:
DtoFactory<PostgresDatabaseName>
,Internable<Database.Name>
,Serializable
,Comparable<Database.Name>
- Enclosing class:
Database
public static final class Database.Name
extends Object
implements Comparable<Database.Name>, Serializable, DtoFactory<PostgresDatabaseName>, Internable<Database.Name>
Represents a name that may be used for a PostgreSQL database. Database names must:
- Be non-null
- Be non-empty
- Be between 1 and 31 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 name of a database is limited by the internal data type of thepg_database
table. -
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 PostgreSQL database name.static Database.Name
-
Field Details
-
MAX_LENGTH
public static final int MAX_LENGTHThe name of a database is limited by the internal data type of thepg_database
table. The type isname
which has a maximum length of 31 characters.- See Also:
-
-
Method Details
-
validate
Validates a PostgreSQL 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<PostgresDatabaseName>
-