Class RDBAccess

  • All Implemented Interfaces:
    Access

    public class RDBAccess
    extends Object
    implements Access
    This class represents the access to a relational database.
    • Constructor Detail

      • RDBAccess

        public RDBAccess​(String dsn,
                         DatabaseType databaseType,
                         String username,
                         String password,
                         String query,
                         String contentType)
        This constructor takes as arguments the dsn, database, username, password, query, and content type.
        Parameters:
        dsn - the data source name.
        databaseType - the database type.
        username - the username of the user that executes the query.
        password - the password of the above user.
        query - the SQL query to use.
        contentType - the content type of the results.
    • Method Detail

      • getDataTypes

        public Map<String,​String> getDataTypes()
        This method returns the datatypes used for the columns in the accessed database.
        Specified by:
        getDataTypes in interface Access
        Returns:
        a map of column names and their datatypes.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getDSN

        public String getDSN()
        This method returns the DNS.
        Returns:
        the DNS.
      • getDatabaseType

        public DatabaseType getDatabaseType()
        This method returns the database type.
        Returns:
        the database type.
      • getUsername

        public String getUsername()
        This method returns the username.
        Returns:
        the username.
      • getPassword

        public String getPassword()
        This method returns the password.
        Returns:
        the password.
      • getQuery

        public String getQuery()
        This method returns the SQL query.
        Returns:
        the SQL query.
      • getContentType

        public String getContentType()
        This method returns the content type.
        Returns:
        the content type.