Enum DatabaseType

    • Method Detail

      • values

        public static DatabaseType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (DatabaseType c : DatabaseType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static DatabaseType valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • fromDialect

        public static DatabaseType fromDialect​(@NotNull
                                               @NotNull String hibernateDialect)
      • getKey

        public String getKey()
      • getI18nKey

        public String getI18nKey()
        Since:
        6.3
      • getProtocol

        public String getProtocol()
      • getDriverClassName

        public String getDriverClassName()
      • getDefaultPort

        public int getDefaultPort()
      • isEmbedded

        public boolean isEmbedded()
        Since:
        6.3
      • generateUrl

        @NotNull
        public @NotNull String generateUrl​(@NotNull
                                           @NotNull String hostName,
                                           @NotNull
                                           @NotNull String database)
        Produces a JDBC URL incorporating the given host name, database name and default port.
        Parameters:
        hostName - the host name of the machine on which the database is running
        database - the name of the database, or alternatively its service identifier
        Returns:
        a new string that can be used as a JDBC URL when accessing databases of this type
      • generateUrl

        @NotNull
        public abstract @NotNull String generateUrl​(@NotNull
                                                    @NotNull String hostName,
                                                    @NotNull
                                                    @NotNull String database,
                                                    int port)
        Produces a JDBC URL incorporating the given host name, database name and port.
        Parameters:
        hostName - the host name of the machine on which the database is running
        database - the name of the database, or alternatively its service identifier
        port - the port on which the database can be accessed at the hostName
        Returns:
        a new string that can be used as a JDBC URL when accessing databases of this type