Class PartitionSettings

java.lang.Object
ca.uhn.fhir.jpa.model.config.PartitionSettings

public class PartitionSettings extends Object
Since:
5.0.0
  • Constructor Details

  • Method Details

    • isPartitionIdsInPrimaryKeys

      public boolean isPartitionIdsInPrimaryKeys()
      This flag activates partition IDs in PKs mode, which is newly introduced in HAPI FHIR 8.0.0. This mode causes partition IDs to be included in all primary keys, joins, and emitted SQL. It also affects the generated schema and migrations. This setting should not be changed after the database has been initialized, unless you have performed an appropriate migration.
      Since:
      8.0.0
    • setPartitionIdsInPrimaryKeys

      public void setPartitionIdsInPrimaryKeys(boolean thePartitionIdsInPrimaryKeys)
      This flag activates partition IDs in PKs mode, which is newly introduced in HAPI FHIR 8.0.0. This mode causes partition IDs to be included in all primary keys, joins, and emitted SQL. It also affects the generated schema and migrations. This setting should not be changed after the database has been initialized, unless you have performed an appropriate migration.
      Since:
      8.0.0
    • isAlwaysOpenNewTransactionForDifferentPartition

      Should we always open a new database transaction if the partition context changes
      Since:
      6.6.0
    • setAlwaysOpenNewTransactionForDifferentPartition

      public void setAlwaysOpenNewTransactionForDifferentPartition(boolean theAlwaysOpenNewTransactionForDifferentPartition)
      Should we always open a new database transaction if the partition context changes
      Since:
      6.6.0
    • isIncludePartitionInSearchHashes

      If set to true (default is false) the PARTITION_ID value will be factored into the hash values used in the HFJ_SPIDX_xxx tables, removing the need to explicitly add a selector on this column in queries. If set to false, an additional selector is used instead, which may perform better when using native database partitioning features.

      This setting has no effect if partitioning is not enabled via isPartitioningEnabled().

      If StorageSettings.isIndexStorageOptimized() is enabled this setting should be set to false.

    • setIncludePartitionInSearchHashes

      public PartitionSettings setIncludePartitionInSearchHashes(boolean theIncludePartitionInSearchHashes)
      If set to true (default is false) the PARTITION_ID value will be factored into the hash values used in the HFJ_SPIDX_xxx tables, removing the need to explicitly add a selector on this column in queries. If set to false, an additional selector is used instead, which may perform better when using native database partitioning features.

      This setting has no effect if partitioning is not enabled via isPartitioningEnabled().

      If StorageSettings.isIndexStorageOptimized() is enabled this setting should be set to false.

    • isPartitioningEnabled

      public boolean isPartitioningEnabled()
      If enabled (default is false) the JPA server will support data partitioning
      Since:
      5.0.0
    • setPartitioningEnabled

      public void setPartitioningEnabled(boolean theMultiTenancyEnabled)
      If enabled (default is false) the JPA server will support data partitioning
      Since:
      5.0.0
    • getAllowReferencesAcrossPartitions

      Should resources references be permitted to cross partition boundaries. Default is PartitionSettings.CrossPartitionReferenceMode.NOT_ALLOWED.
      Since:
      5.0.0
    • setAllowReferencesAcrossPartitions

      Should resources references be permitted to cross partition boundaries. Default is PartitionSettings.CrossPartitionReferenceMode.NOT_ALLOWED.
      Since:
      5.0.0
    • isUnnamedPartitionMode

      public boolean isUnnamedPartitionMode()
      If set to true (default is false), partitions will be unnamed and all IDs from Integer.MIN_VALUE through Integer.MAX_VALUE will be allowed without needing to be created ahead of time.
      Since:
      5.5.0
    • setUnnamedPartitionMode

      public void setUnnamedPartitionMode(boolean theUnnamedPartitionMode)
      If set to true (default is false), partitions will be unnamed and all IDs from Integer.MIN_VALUE through Integer.MAX_VALUE will be allowed without needing to be created ahead of time.
      Since:
      5.5.0
    • getDefaultPartitionId

      If set, the given ID will be used for the default partition. The default is null which will result in the use of a null value for default partition items.
      Since:
      5.5.0
    • setDefaultPartitionId

      public void setDefaultPartitionId(Integer theDefaultPartitionId)
      If set, the given ID will be used for the default partition. The default is null which will result in the use of a null value for default partition items.
      Since:
      5.5.0
    • isAllowUnqualifiedCrossPartitionReference

      If enabled the JPA server will allow unqualified cross partition reference
    • isConditionalCreateDuplicateIdentifiersEnabled

    • setConditionalCreateDuplicateIdentifiersEnabled

      public void setConditionalCreateDuplicateIdentifiersEnabled(boolean theConditionalCreateDuplicateIdentifiersEnabled)