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
FieldsModifier and TypeFieldDescriptionstatic final intThe name of a database is limited by the internal data type of thepg_databasetable. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(Database.Name other) booleangetDto()inthashCode()intern()Interns this name much in the same fashion asString.intern().toString()static ValidationResultValidates 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_databasetable. The type isnamewhich 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:
compareToin interfaceComparable<Database.Name>
-
toString
-
intern
Interns this name much in the same fashion asString.intern().- Specified by:
internin interfaceInternable<Database.Name>- See Also:
-
getDto
- Specified by:
getDtoin interfaceDtoFactory<PostgresDatabaseName>
-
