Class PostgresReindexResourceDAO

  • All Implemented Interfaces:
    FHIRDbDAO, ResourceDAO

    public class PostgresReindexResourceDAO
    extends ReindexResourceDAO
    PostgreSQL specialization of the DAO used to assist the reindex custom operation
    • Constructor Detail

      • PostgresReindexResourceDAO

        public PostgresReindexResourceDAO​(java.sql.Connection connection,
                                          IDatabaseTranslator translator,
                                          ParameterDAO parameterDao,
                                          java.lang.String schemaName,
                                          FHIRDbFlavor flavor,
                                          FHIRPersistenceJDBCCache cache)
        Public constructor
        Parameters:
        connection -
        translator -
        parameterDao -
        schemaName -
        flavor -
        cache -
      • PostgresReindexResourceDAO

        public PostgresReindexResourceDAO​(java.sql.Connection connection,
                                          IDatabaseTranslator translator,
                                          ParameterDAO parameterDao,
                                          java.lang.String schemaName,
                                          FHIRDbFlavor flavor,
                                          javax.transaction.TransactionSynchronizationRegistry trxSynchRegistry,
                                          FHIRPersistenceJDBCCache cache,
                                          ParameterTransactionDataImpl ptdi)
        Public constructor for use in a JEE context
        Parameters:
        connection -
        translator -
        parameterDao -
        schemaName -
        flavor -
        trxSynchRegistry -
        cache -
    • Method Detail

      • getNextResource

        public ResourceIndexRecord getNextResource​(java.security.SecureRandom random,
                                                   java.time.Instant reindexTstamp,
                                                   java.lang.Integer resourceTypeId,
                                                   java.lang.String logicalId)
                                            throws java.lang.Exception
        Description copied from class: ReindexResourceDAO
        Pick the next resource to process, then also lock it. Specializations for different databases may use different techniques to optimize locking/concurrency control.
        Overrides:
        getNextResource in class ReindexResourceDAO
        Parameters:
        random - used to generate a random number
        reindexTstamp - only get resource with a reindex_tstamp less than this
        resourceTypeId - the resource type ID of a specific resource type, or null
        logicalId - the resource ID of a specific resource, or null
        Returns:
        the resource record, or null when there is nothing left to do
        Throws:
        java.lang.Exception
      • deleteResourceParameters

        protected void deleteResourceParameters​(java.lang.String resourceTypeName,
                                                long logicalResourceId)
                                         throws java.sql.SQLException
        Description copied from class: ReindexResourceDAO
        Delete all the parameter values for the given resourceType/logicalResourceId
        Overrides:
        deleteResourceParameters in class ReindexResourceDAO
        Throws:
        java.sql.SQLException