Class PostgresResourceDAO

  • All Implemented Interfaces:
    FHIRDbDAO, ResourceDAO

    public class PostgresResourceDAO
    extends ResourceDAOImpl
    Data access object for writing FHIR resources to an postgresql database using the stored procedure (or function, in this case)
    • Method Detail

      • deleteFromParameterTable

        protected void deleteFromParameterTable​(java.sql.Connection conn,
                                                java.lang.String tableName,
                                                long logicalResourceId)
                                         throws java.sql.SQLException
        Delete all parameters for the given resourceId from the parameters table
        Overrides:
        deleteFromParameterTable in class ResourceDAOImpl
        Parameters:
        conn -
        tableName -
        logicalResourceId -
        Throws:
        java.sql.SQLException
      • getResourceTypeId

        protected java.lang.Integer getResourceTypeId​(java.lang.String resourceTypeName,
                                                      java.sql.Connection conn)
                                               throws java.sql.SQLException
        Read the id for the named type
        Parameters:
        resourceTypeName -
        conn -
        Returns:
        the database id, or null if the named record is not found
        Throws:
        java.sql.SQLException
      • getOrCreateResourceType

        public int getOrCreateResourceType​(java.lang.String resourceTypeName,
                                           java.sql.Connection conn)
                                    throws java.sql.SQLException
        stored-procedure-less implementation for managing the resource_types table
        Parameters:
        resourceTypeName -
        conn -
        Throws:
        java.sql.SQLException