Class ResourceDAOImpl

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected boolean checkIfNoneMatch​(java.lang.Integer ifNoneMatch, int currentVersionId)
      Test for If-None-Match conditional create-on-update behavior.
      protected Resource createDTO​(java.sql.ResultSet resultSet, boolean hasResourceTypeId)
      Creates and returns a Resource DTO based on the contents of the passed ResultSet
      protected FHIRPersistenceJDBCCache getCache()
      Getter for access to the FHIRPersistenceJDBCCache from subclasses
      protected java.lang.Integer getResourceTypeId​(java.lang.String resourceType)
      Get the value of the database id for the given resourceType from the JDBCIdentityCache.
      protected java.lang.String getSearchByIdsNoDataSql​(java.lang.String resourceType)  
      protected java.lang.String getSearchByIdsSql​(java.lang.String resourceType)  
      protected ParameterTransactionDataImpl getTransactionData()
      Get the ParameterTransactionDataImpl held by this.
      java.util.List<Resource> history​(java.lang.String resourceType, java.lang.String logicalId, java.sql.Timestamp fromDateTime, int offset, int maxResults)
      Reads and returns all versions of the Resource with the passed logicalId, ordered by descending version id.
      int historyCount​(java.lang.String resourceType, java.lang.String logicalId, java.sql.Timestamp fromDateTime)
      Reads and returns the COUNT of all versions of the Resource with the passed logicalId.
      Resource read​(java.lang.String logicalId, java.lang.String resourceType)
      Reads and returns the latest version of the Resource with the passed logical id and resource type.
      java.util.Map<java.lang.String,​java.lang.Integer> readAllResourceTypeNames()
      Reads all rows in the resource_types table and returns the data as a Map
      java.lang.Long readLogicalResourceId​(int resourceTypeId, java.lang.String logicalId)
      Look up the value of the logical_resource_id from the logical_resource_ident table
      java.util.List<java.lang.Long> readLogicalResourceIdList​(java.lang.String logicalId)
      Read all the matching logical_resource_id values for the given logicalId
      java.lang.Integer readResourceTypeId​(java.lang.String resourceType)
      Reads the id associated with the name of the passed Resource type from the Resource_Types table.
      java.util.List<Resource> search​(java.lang.String sqlSelect)
      Executes the passed fully-formed SQL Select statement and returns the results If no matching resources are found, an empty collection is returned.
      java.util.List<Resource> search​(Select select)
      Executes the search contained in the passed Select, using its encapsulated search string and bind variables.
      java.util.List<Resource> searchByIds​(java.lang.String resourceType, java.util.List<java.lang.Long> resourceIds, boolean includeResourceData)
      Searches for Resources that contain one of the passed ids.
      int searchCount​(java.lang.String sqlSelectCount)
      Executes the passed fully-formed SQL Select COUNT statement and returns the integer count.
      int searchCount​(Select countQuery)
      Executes a count query based on the data contained in the passed Select statement, using its encapsulated search string and bind variables.
      java.util.List<java.lang.Long> searchForIds​(Select dataQuery)
      This method supports the execution of a specialized query designed to return Resource ids, based on the contents of the passed select statement.
      java.util.Map<java.lang.Integer,​java.util.List<java.lang.Long>> searchWholeSystem​(Select wholeSystemQuery)
      Executes the whole-system filter search contained in the passed Select, using its encapsulated search string and bind variables.
      protected void setInt​(java.sql.PreparedStatement ps, int index, java.lang.Integer value)
      Set an int parameter in the statement, handling null as required
      void setPersistenceContext​(FHIRPersistenceContext context)
      Sets the current persistence context
      protected void setString​(java.sql.PreparedStatement ps, int index, java.lang.String value)
      Set a String parameter in the statement, handling null as required
      Resource versionRead​(java.lang.String logicalId, java.lang.String resourceType, int versionId)
      Reads and returns the version of the Resource with the passed logical id, resource type, and version id.
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.linuxforhealth.fhir.persistence.jdbc.dao.api.ResourceDAO

        insert