Top Inners Fields Constructors Methods
org.hibernate.jpa.internal

public Class JpaComplianceImpl

extends Object
implements JpaCompliance
Class Inheritance
All Implemented Interfaces
org.hibernate.jpa.spi.JpaCompliance
Imports
org.hibernate.jpa.spi.JpaCompliance

Author
Andrea Boriero

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
private boolean
private boolean
private boolean
private boolean
private boolean
private boolean
private boolean

Constructor Summary

AccessConstructor and Description
private
JpaComplianceImpl(boolean queryCompliance, boolean transactionCompliance, boolean listCompliance, boolean closedCompliance, boolean proxyCompliance, boolean cachingCompliance, boolean globalGeneratorNameScopeCompliance)

Method Summary

Modifier and TypeMethod and Description
public boolean
public boolean
isJpaCacheComplianceEnabled()

Implements org.hibernate.jpa.spi.JpaCompliance.isJpaCacheComplianceEnabled.

Should Hibernate comply with all aspects of caching as defined by JPA?
public boolean
isJpaClosedComplianceEnabled()

Implements org.hibernate.jpa.spi.JpaCompliance.isJpaClosedComplianceEnabled.

JPA defines specific exceptions on specific methods when called on javax.persistence.EntityManager and javax.persistence.EntityManagerFactory when those objects have been closed.
public boolean
isJpaListComplianceEnabled()

Implements org.hibernate.jpa.spi.JpaCompliance.isJpaListComplianceEnabled.

Controls how Hibernate interprets a mapped List without an "order columns" specified.
public boolean
isJpaProxyComplianceEnabled()

Implements org.hibernate.jpa.spi.JpaCompliance.isJpaProxyComplianceEnabled.

JPA spec says that an javax.persistence.EntityNotFoundException should be thrown when accessing an entity Proxy which does not have an associated table row in the database.
public boolean
isJpaQueryComplianceEnabled()

Implements org.hibernate.jpa.spi.JpaCompliance.isJpaQueryComplianceEnabled.

Controls whether Hibernate's handling of JPA's javax.persistence.Query (JPQL, Criteria and native-query) should strictly follow the JPA spec.
public boolean
isJpaTransactionComplianceEnabled()

Implements org.hibernate.jpa.spi.JpaCompliance.isJpaTransactionComplianceEnabled.

Indicates that Hibernate's Transaction should behave as defined by the spec for JPA's javax.persistence.EntityTransaction since it extends the JPA one.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cachingComplianceback to summary
private boolean cachingCompliance
closedComplianceback to summary
private boolean closedCompliance
globalGeneratorNameScopeComplianceback to summary
private boolean globalGeneratorNameScopeCompliance
listComplianceback to summary
private boolean listCompliance
proxyComplianceback to summary
private boolean proxyCompliance
queryComplianceback to summary
private boolean queryCompliance
transactionComplianceback to summary
private boolean transactionCompliance

Constructor Detail

JpaComplianceImplback to summary
private JpaComplianceImpl(boolean queryCompliance, boolean transactionCompliance, boolean listCompliance, boolean closedCompliance, boolean proxyCompliance, boolean cachingCompliance, boolean globalGeneratorNameScopeCompliance)

Method Detail

isGlobalGeneratorScopeEnabledback to summary
public boolean isGlobalGeneratorScopeEnabled()

Implements org.hibernate.jpa.spi.JpaCompliance.isGlobalGeneratorScopeEnabled.

Doc from org.hibernate.jpa.spi.JpaCompliance.isGlobalGeneratorScopeEnabled.

Should the the scope of javax.persistence.TableGenerator#name() and javax.persistence.SequenceGenerator#name() be considered globally or locally defined?

Returns:boolean

true indicates the generator name scope is considered global.

Annotations
@Override
isJpaCacheComplianceEnabledback to summary
public boolean isJpaCacheComplianceEnabled()

Implements org.hibernate.jpa.spi.JpaCompliance.isJpaCacheComplianceEnabled.

Doc from org.hibernate.jpa.spi.JpaCompliance.isJpaCacheComplianceEnabled.

Should Hibernate comply with all aspects of caching as defined by JPA? Or can it deviate to perform things it believes will be "better"?

Returns:boolean

true says to act the spec-defined way.

Annotations
@Override
isJpaClosedComplianceEnabledback to summary
public boolean isJpaClosedComplianceEnabled()

Implements org.hibernate.jpa.spi.JpaCompliance.isJpaClosedComplianceEnabled.

Doc from org.hibernate.jpa.spi.JpaCompliance.isJpaClosedComplianceEnabled.

JPA defines specific exceptions on specific methods when called on javax.persistence.EntityManager and javax.persistence.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

Returns:boolean

true indicates to behave in the spec-defined way

Annotations
@Override
isJpaListComplianceEnabledback to summary
public boolean isJpaListComplianceEnabled()

Implements org.hibernate.jpa.spi.JpaCompliance.isJpaListComplianceEnabled.

Doc from org.hibernate.jpa.spi.JpaCompliance.isJpaListComplianceEnabled.

Controls how Hibernate interprets a mapped List without an "order columns" specified. Historically Hibernate defines this as a "bag", which is a concept JPA does not have. If enabled, Hibernate will recognize this condition as defining a org.hibernate.collection.internal.PersistentList, otherwise Hibernate will treat is as a org.hibernate.collection.internal.PersistentBag

Returns:boolean

true indicates to behave in the spec-defined way, interpreting the mapping as a "list", rather than a "bag"

Annotations
@Override
isJpaProxyComplianceEnabledback to summary
public boolean isJpaProxyComplianceEnabled()

Implements org.hibernate.jpa.spi.JpaCompliance.isJpaProxyComplianceEnabled.

Doc from org.hibernate.jpa.spi.JpaCompliance.isJpaProxyComplianceEnabled.

JPA spec says that an javax.persistence.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 roundtrip. If enabled Hibernate will initialize the entity Proxy even when accessing its identifier.

Returns:boolean

true indicates to behave in the spec-defined way

Annotations
@Override
isJpaQueryComplianceEnabledback to summary
public boolean isJpaQueryComplianceEnabled()

Implements org.hibernate.jpa.spi.JpaCompliance.isJpaQueryComplianceEnabled.

Doc from org.hibernate.jpa.spi.JpaCompliance.isJpaQueryComplianceEnabled.

Controls whether Hibernate's handling of JPA's javax.persistence.Query (JPQL, Criteria and native-query) should strictly follow the JPA spec. This includes both in terms of parsing or translating a query as well as calls to the javax.persistence.Query methods throwing spec defined exceptions where as Hibernate might not. Deviations result in an exception if enabled

Returns:boolean

true indicates to behave in the spec-defined way

Annotations
@Override
isJpaTransactionComplianceEnabledback to summary
public boolean isJpaTransactionComplianceEnabled()

Implements org.hibernate.jpa.spi.JpaCompliance.isJpaTransactionComplianceEnabled.

Doc from org.hibernate.jpa.spi.JpaCompliance.isJpaTransactionComplianceEnabled.

Indicates that Hibernate's Transaction should behave as defined by the spec for JPA's javax.persistence.EntityTransaction since it extends the JPA one.

Returns:boolean

true indicates to behave in the spec-defined way

Annotations
@Override
org.hibernate.jpa.internal back to summary

public Class JpaComplianceImpl.JpaComplianceBuilder

extends Object
Class Inheritance
  • java.lang.Object
  • org.hibernate.jpa.internal.JpaComplianceImpl.JpaComplianceBuilder

Field Summary

Modifier and TypeField and Description
private boolean
private boolean
private boolean
private boolean
private boolean
private boolean
private boolean

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
pack-priv JpaCompliance
public JpaComplianceImpl.JpaComplianceBuilder
setCachingCompliance(boolean cachingCompliance)

public JpaComplianceImpl.JpaComplianceBuilder
setClosedCompliance(boolean closedCompliance)

public JpaComplianceImpl.JpaComplianceBuilder
setGlobalGeneratorNameCompliance(boolean globalGeneratorNameCompliance)

public JpaComplianceImpl.JpaComplianceBuilder
setListCompliance(boolean listCompliance)

public JpaComplianceImpl.JpaComplianceBuilder
setProxyCompliance(boolean proxyCompliance)

public JpaComplianceImpl.JpaComplianceBuilder
setQueryCompliance(boolean queryCompliance)

public JpaComplianceImpl.JpaComplianceBuilder
setTransactionCompliance(boolean transactionCompliance)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cachingComplianceback to summary
private boolean cachingCompliance
closedComplianceback to summary
private boolean closedCompliance
globalGeneratorNameScopeComplianceback to summary
private boolean globalGeneratorNameScopeCompliance
listComplianceback to summary
private boolean listCompliance
proxyComplianceback to summary
private boolean proxyCompliance
queryComplianceback to summary
private boolean queryCompliance
transactionComplianceback to summary
private boolean transactionCompliance

Constructor Detail

JpaComplianceBuilderback to summary
public JpaComplianceBuilder()

Method Detail

createJpaComplianceback to summary
pack-priv JpaCompliance createJpaCompliance()
setCachingComplianceback to summary
public JpaComplianceImpl.JpaComplianceBuilder setCachingCompliance(boolean cachingCompliance)
setClosedComplianceback to summary
public JpaComplianceImpl.JpaComplianceBuilder setClosedCompliance(boolean closedCompliance)
setGlobalGeneratorNameComplianceback to summary
public JpaComplianceImpl.JpaComplianceBuilder setGlobalGeneratorNameCompliance(boolean globalGeneratorNameCompliance)
setListComplianceback to summary
public JpaComplianceImpl.JpaComplianceBuilder setListCompliance(boolean listCompliance)
setProxyComplianceback to summary
public JpaComplianceImpl.JpaComplianceBuilder setProxyCompliance(boolean proxyCompliance)
setQueryComplianceback to summary
public JpaComplianceImpl.JpaComplianceBuilder setQueryCompliance(boolean queryCompliance)
setTransactionComplianceback to summary
public JpaComplianceImpl.JpaComplianceBuilder setTransactionCompliance(boolean transactionCompliance)