Class ConnectionInfos

java.lang.Object
br.net.dd.netherwingcore.database.common.ConnectionInfos

public class ConnectionInfos extends Object
The ConnectionInfos class is responsible for parsing and storing database connection information from a formatted string.

The connection information string should be formatted as follows:

    host;portOrSocket;user;password;database[;ssl]
where the SSL parameter is optional.

This class provides getter methods to access individual components of the connection information.

  • Constructor Details

    • ConnectionInfos

      public ConnectionInfos(String infoString)
      Constructs a ConnectionInfos object by parsing the provided connection information string.
      Parameters:
      infoString - the connection information string to parse
  • Method Details

    • getUser

      public String getUser()
      Returns the username for the database connection.
      Returns:
      the username
    • getPassword

      public String getPassword()
      Returns the password for the database connection.
      Returns:
      the password
    • getDatabase

      public String getDatabase()
      Returns the database name for the connection.
      Returns:
      the database name
    • getHost

      public String getHost()
      Returns the host for the database connection.
      Returns:
      the host
    • getPortOrSocket

      public String getPortOrSocket()
      Returns the port or socket for the database connection.
      Returns:
      the port or socket
    • getSsl

      public String getSsl()
      Returns the SSL configuration for the database connection, if provided.
      Returns:
      the SSL configuration, or null if not provided
    • toString

      public String toString()
      Overrides:
      toString in class Object