public class MutableJpaComplianceImpl extends Object implements MutableJpaCompliance
| Constructor and Description |
|---|
MutableJpaComplianceImpl(Map configurationSettings,
boolean jpaByDefault) |
| Modifier and Type | Method and Description |
|---|---|
JpaCompliance |
immutableCopy() |
boolean |
isGlobalGeneratorScopeEnabled()
Should the the scope of
TableGenerator.name() and SequenceGenerator.name() be
considered globally or locally defined? |
boolean |
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"?
|
boolean |
isJpaClosedComplianceEnabled()
JPA defines specific exceptions on specific methods when called on
EntityManager and EntityManagerFactory
when those objects have been closed. |
boolean |
isJpaListComplianceEnabled()
Controls how Hibernate interprets a mapped List without an "order columns"
specified.
|
boolean |
isJpaProxyComplianceEnabled()
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. |
boolean |
isJpaQueryComplianceEnabled()
Controls whether Hibernate's handling of JPA's
Query (JPQL, Criteria and native-query) should
strictly follow the JPA spec. |
boolean |
isJpaTransactionComplianceEnabled()
Indicates that Hibernate's
Transaction should behave as
defined by the spec for JPA's EntityTransaction
since it extends the JPA one. |
void |
setCachingCompliance(boolean cachingCompliance) |
void |
setClosedCompliance(boolean closedCompliance) |
void |
setListCompliance(boolean listCompliance) |
void |
setProxyCompliance(boolean proxyCompliance) |
void |
setQueryCompliance(boolean queryCompliance) |
void |
setTransactionCompliance(boolean transactionCompliance) |
public MutableJpaComplianceImpl(Map configurationSettings, boolean jpaByDefault)
public boolean isJpaQueryComplianceEnabled()
JpaComplianceQuery (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 Query
methods throwing spec defined exceptions where as Hibernate might not.
Deviations result in an exception if enabledisJpaQueryComplianceEnabled in interface JpaCompliancetrue indicates to behave in the spec-defined waypublic boolean isJpaTransactionComplianceEnabled()
JpaComplianceTransaction should behave as
defined by the spec for JPA's EntityTransaction
since it extends the JPA one.isJpaTransactionComplianceEnabled in interface JpaCompliancetrue indicates to behave in the spec-defined waypublic boolean isJpaListComplianceEnabled()
JpaCompliancePersistentList, otherwise
Hibernate will treat is as a PersistentBagisJpaListComplianceEnabled in interface JpaCompliancetrue indicates to behave in the spec-defined way, interpreting the
mapping as a "list", rather than a "bag"public boolean isJpaClosedComplianceEnabled()
JpaComplianceEntityManager 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 checkingisJpaClosedComplianceEnabled in interface JpaCompliancetrue indicates to behave in the spec-defined waypublic boolean isJpaProxyComplianceEnabled()
JpaComplianceEntityNotFoundException
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.isJpaProxyComplianceEnabled in interface JpaCompliancetrue indicates to behave in the spec-defined waypublic boolean isJpaCacheComplianceEnabled()
JpaComplianceisJpaCacheComplianceEnabled in interface JpaCompliancetrue says to act the spec-defined way.public boolean isGlobalGeneratorScopeEnabled()
JpaComplianceTableGenerator.name() and SequenceGenerator.name() be
considered globally or locally defined?isGlobalGeneratorScopeEnabled in interface JpaCompliancetrue indicates the generator name scope is considered global.public void setQueryCompliance(boolean queryCompliance)
setQueryCompliance in interface MutableJpaCompliancepublic void setTransactionCompliance(boolean transactionCompliance)
setTransactionCompliance in interface MutableJpaCompliancepublic void setListCompliance(boolean listCompliance)
setListCompliance in interface MutableJpaCompliancepublic void setClosedCompliance(boolean closedCompliance)
setClosedCompliance in interface MutableJpaCompliancepublic void setProxyCompliance(boolean proxyCompliance)
setProxyCompliance in interface MutableJpaCompliancepublic void setCachingCompliance(boolean cachingCompliance)
setCachingCompliance in interface MutableJpaCompliancepublic JpaCompliance immutableCopy()
immutableCopy in interface MutableJpaComplianceCopyright © 2019 JBoss by Red Hat. All rights reserved.