Class FHIRDbHelper
- java.lang.Object
-
- org.linuxforhealth.fhir.persistence.jdbc.connection.FHIRDbHelper
-
public class FHIRDbHelper extends java.lang.Object
Helper functions used for managing FHIR database interactions
-
-
Constructor Summary
Constructors Constructor Description FHIRDbHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static FHIRPersistenceDataAccessException
buildExceptionWithIssue(java.lang.String msg, IssueType issueType)
static FHIRPersistenceDBConnectException
buildFHIRPersistenceDBConnectException(java.lang.String msg, IssueType issueType)
static <XT extends FHIRPersistenceException>
XTsevere(java.util.logging.Logger logger, XT fx, java.lang.String errorMessage, java.lang.Throwable cause)
Log the exception message here along with the cause stack.static <XT extends FHIRPersistenceException>
XTsevere(java.util.logging.Logger logger, XT fx, java.lang.Throwable cause)
Convenience function to log the cause of an exception about to be thrown.
-
-
-
Method Detail
-
severe
public static <XT extends FHIRPersistenceException> XT severe(java.util.logging.Logger logger, XT fx, java.lang.Throwable cause)
Convenience function to log the cause of an exception about to be thrown. This is useful when avoiding chaining the cause with the persistence exception, which could inadvertently leak sensitive information (details of the schema, for example)- Parameters:
logger
-fx
-cause
-- Returns:
-
severe
public static <XT extends FHIRPersistenceException> XT severe(java.util.logging.Logger logger, XT fx, java.lang.String errorMessage, java.lang.Throwable cause)
Log the exception message here along with the cause stack. Return the exception fx to the caller so that it can be thrown easily.- Parameters:
logger
-fx
-errorMessage
-cause
-- Returns:
-
buildExceptionWithIssue
public static FHIRPersistenceDataAccessException buildExceptionWithIssue(java.lang.String msg, IssueType issueType) throws FHIRPersistenceDataAccessException
-
buildFHIRPersistenceDBConnectException
public static FHIRPersistenceDBConnectException buildFHIRPersistenceDBConnectException(java.lang.String msg, IssueType issueType) throws FHIRPersistenceDBConnectException
-
-