Class JpaComplianceImpl

    • Constructor Summary

      Constructors 
      Constructor Description
      JpaComplianceImpl​(boolean listCompliance, boolean orderByMappingCompliance, boolean proxyCompliance, boolean globalGeneratorNameScopeCompliance, boolean queryCompliance, boolean transactionCompliance, boolean closedCompliance, boolean cachingCompliance, boolean loadByIdCompliance)  
    • Constructor Detail

      • JpaComplianceImpl

        public JpaComplianceImpl​(boolean listCompliance,
                                 boolean orderByMappingCompliance,
                                 boolean proxyCompliance,
                                 boolean globalGeneratorNameScopeCompliance,
                                 boolean queryCompliance,
                                 boolean transactionCompliance,
                                 boolean closedCompliance,
                                 boolean cachingCompliance,
                                 boolean loadByIdCompliance)
    • Method Detail

      • isJpaQueryComplianceEnabled

        public boolean isJpaQueryComplianceEnabled()
        Description copied from interface: JpaCompliance
        Controls whether Hibernate's handling of JPA's Query (JPQL, Criteria and native-query) should strictly follow the JPA spec. This includes parsing and translating a query as JPQL instead of HQL, as well as whether calls to the Query methods always throw the exceptions defined by the specification. Deviations result in an exception if enabled
        Specified by:
        isJpaQueryComplianceEnabled in interface JpaCompliance
        Returns:
        true indicates to behave in the spec-defined way
        See Also:
        AvailableSettings.JPA_QUERY_COMPLIANCE
      • isJpaListComplianceEnabled

        public boolean isJpaListComplianceEnabled()
        Description copied from interface: JpaCompliance
        Controls how Hibernate interprets a mapped List without no order column specified. Historically Hibernate treats this as a "bag", which is a concept JPA does not have.
        • If enabled, Hibernate will recognize this case as a list.
        • Otherwise, if disabled, Hibernate will treat it as a "bag".
        Specified by:
        isJpaListComplianceEnabled in interface JpaCompliance
        Returns:
        true indicates to behave in the spec-defined way, interpreting the mapping as a "list", rather than a "bag"
        See Also:
        AvailableSettings.JPA_LIST_COMPLIANCE
      • isJpaClosedComplianceEnabled

        public boolean isJpaClosedComplianceEnabled()
        Description copied from interface: JpaCompliance
        JPA defines specific exceptions on specific methods when called on EntityManager and EntityManagerFactory when those objects have been closed. This setting controls whether the spec defined behavior or Hibernate's behavior will be used.

        If enabled Hibernate will operate in the JPA specified way throwing exceptions when the spec says it should with regard to close checking

        Specified by:
        isJpaClosedComplianceEnabled in interface JpaCompliance
        Returns:
        true indicates to behave in the spec-defined way
        See Also:
        AvailableSettings.JPA_CLOSED_COMPLIANCE
      • isJpaProxyComplianceEnabled

        public boolean isJpaProxyComplianceEnabled()
        Description copied from interface: JpaCompliance
        JPA spec says that an EntityNotFoundException should be thrown when accessing an entity proxy which does not have an associated table row in the database.

        Traditionally, Hibernate does not initialize an entity Proxy when accessing its identifier since we already know the identifier value, hence we can save a database round trip.

        If enabled Hibernate will initialize the entity proxy even when accessing its identifier.

        Specified by:
        isJpaProxyComplianceEnabled in interface JpaCompliance
        Returns:
        true indicates to behave in the spec-defined way
        See Also:
        AvailableSettings.JPA_PROXY_COMPLIANCE