Interface BlazePersistenceInstanceConfiguration


public interface BlazePersistenceInstanceConfiguration
Since:
1.6.0
Author:
Moritz Becker
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    apply(CriteriaBuilderConfiguration criteriaBuilderConfiguration)
     
    default void
    apply(com.blazebit.persistence.view.spi.EntityViewConfiguration entityViewConfiguration)
     
    boolean
    A boolean flag that allows to specify if empty flat views should be created by default if not specified via EmptyFlatViewCreation.
    int
    An integer value that defines the default batch size for entity view attributes.
    A mode specifying if correlation value, view root or embedded view batching is expected.
    The fully qualified expression cache implementation class name.
    boolean
    If set to true, the CTE queries are inlined by default.
    default boolean
     
    boolean
    A boolean flag to make it possible to disable the managed type validation.
    The packages in which the entity views and entity view listeners assigned to this Blaze-Persistence instance are located.
    The name of the persistence unit which this instance of Blaze-Persistence uses.
    boolean
    If set to true, the query plans are cached and reused.
    boolean
    A boolean flag to make it possible to prepare all view template caches on startup.
    boolean
    A boolean flag to make it possible to disable the strict validation that disallows the use of an updatable entity view type for owned relationships.
    boolean
    A boolean flag to make it possible to prepare the entity view updater cache on startup.
    boolean
    A boolean flag that allows to switch from warnings to boot time validation errors when invalid plural attribute setters are encountered while the strict cascading check is enabled.
    boolean
    A boolean flag to make it possible to disable the strict cascading check that disallows setting updatable or creatable entity views on non-cascading attributes before being associated with a cascading attribute.
  • Method Details

    • persistenceUnit

      Optional<String> persistenceUnit()
      The name of the persistence unit which this instance of Blaze-Persistence uses.

      If undefined, it will use the default persistence unit.

    • packages

      Optional<Set<String>> packages()
      The packages in which the entity views and entity view listeners assigned to this Blaze-Persistence instance are located.
    • templateEagerLoading

      @WithDefault("false") boolean templateEagerLoading()
      A boolean flag to make it possible to prepare all view template caches on startup. By default the eager loading of the view templates is disabled to have a better startup performance. Valid values for this property are true or false.
    • managedTypeValidationDisabled

      @WithDefault("false") boolean managedTypeValidationDisabled()
      A boolean flag to make it possible to disable the managed type validation. By default the managed type validation is enabled, but since the validation is not bullet proof, it can be disabled. Valid values for this property are true or false.
    • defaultBatchSize

      @WithDefault("1") int defaultBatchSize()
      An integer value that defines the default batch size for entity view attributes. By default the value is 1 and can be overridden either via BatchFetch.size() or by setting this property via EntityViewSetting.setProperty(java.lang.String, java.lang.Object).
    • expectBatchMode

      @WithDefault("values") String expectBatchMode()
      A mode specifying if correlation value, view root or embedded view batching is expected. By default the value is values and can be overridden by setting this property via EntityViewSetting.setProperty(java.lang.String, java.lang.Object). Valid values are
      • values
      • view_roots
      • embedding_views
    • updaterEagerLoading

      @WithName("updater.eager-loading") @WithDefault("false") boolean updaterEagerLoading()
      A boolean flag to make it possible to prepare the entity view updater cache on startup. By default the eager loading of entity view updates is disabled to have a better startup performance. Valid values for this property are true or false.
    • updaterDisallowOwnedUpdatableSubview

      @WithName("updater.disallow-owned-updatable-subview") @WithDefault("true") boolean updaterDisallowOwnedUpdatableSubview()
      A boolean flag to make it possible to disable the strict validation that disallows the use of an updatable entity view type for owned relationships. By default the use is disallowed i.e. the default value is true, but since there might be strange models out there, it possible to allow this. Valid values for this property are true or false.
    • updaterStrictCascadingCheck

      @WithName("updater.strict-cascading-check") @WithDefault("true") boolean updaterStrictCascadingCheck()
      A boolean flag to make it possible to disable the strict cascading check that disallows setting updatable or creatable entity views on non-cascading attributes before being associated with a cascading attribute. When disabled, it is possible, like in JPA, that the changes done to an updatable entity view are not flushed when it is not associated with an attribute that cascades updates. By default the use is enabled i.e. the default value is true. Valid values for this property are true or false.
    • updaterErrorOnInvalidPluralSetter

      @WithName("updater.error-on-invalid-plural-setter") @WithDefault("false") boolean updaterErrorOnInvalidPluralSetter()
      A boolean flag that allows to switch from warnings to boot time validation errors when invalid plural attribute setters are encountered while the strict cascading check is enabled. When true, a boot time validation error is thrown when encountering an invalid setter, otherwise just a warning. This configuration has no effect when the strict cascading check is disabled. By default the use is disabled i.e. the default value is false. Valid values for this property are true or false.
    • createEmptyFlatViews

      @WithDefault("true") boolean createEmptyFlatViews()
      A boolean flag that allows to specify if empty flat views should be created by default if not specified via EmptyFlatViewCreation. By default the creation of empty flat views is enabled i.e. the default value is true. Valid values for this property are true or false.
    • expressionCacheClass

      @WithDefault("com.blazebit.persistence.parser.expression.ConcurrentHashMapExpressionCache") String expressionCacheClass()
      The fully qualified expression cache implementation class name.
    • inlineCtes

      @WithDefault("true") boolean inlineCtes()
      If set to true, the CTE queries are inlined by default. Valid values for this property are true, false or auto. Default is true which will always inline non-recursive CTEs. The auto configuration will only make use of inlining if the JPA provider and DBMS dialect support/require it. The property can be changed for a criteria builder before constructing a query.
      See Also:
    • queryPlanCacheEnabled

      @WithDefault("true") boolean queryPlanCacheEnabled()
      If set to true, the query plans are cached and reused. Valid values for this property are true and false. Default is true. This configuration option currently only takes effect when Hibernate is used as JPA provider. The property can be changed for a criteria builder before constructing a query.
    • apply

      default void apply(CriteriaBuilderConfiguration criteriaBuilderConfiguration)
    • apply

      default void apply(com.blazebit.persistence.view.spi.EntityViewConfiguration entityViewConfiguration)
    • isAnyPropertySet

      default boolean isAnyPropertySet()