public class Compatibility extends Object
Modifier and Type | Field and Description |
---|---|
static int |
JPQL_EXTENDED
Allow non-compliant extensions of JPQL.
|
static int |
JPQL_STRICT
If a JPQL statement is not compliant with the JPA specification,
fail to parse it.
|
static int |
JPQL_WARN
If a JPQL statement is not compliant with the JPA specification,
warn the first time that statement is parsed.
|
Constructor and Description |
---|
Compatibility() |
Modifier and Type | Method and Description |
---|---|
boolean |
getAutoOff()
Whether to turn collection/map tracing off in case of more number of modifications.
|
boolean |
getCacheNonDefaultFetchPlanQueries()
Whether the SQL generated for queries executed with a modified fetch plan are cached.
|
boolean |
getCascadeWithDetach()
Whether openjpa will always cascade on detach, regardless of the
cascade setting.
|
boolean |
getCheckDatabaseForCascadePersistToDetachedEntity()
Whether OpenJPA will check the database for an Entity when cascading a persist to another Entity.
|
boolean |
getCloseOnManagedCommit()
Whether to close the broker when the managed transaction commits.
|
boolean |
getConvertPositionalParametersToNamed() |
boolean |
getCopyObjectIds()
Whether to copy identity objects before returning them to client code.
|
boolean |
getCopyOnDetach()
Affirms if detached entities are copy of the managed instances.
|
boolean |
getFilterPCRegistryClasses()
Whether the metadata processor should filter classes dispatched by the PCRegistry listener system.
|
boolean |
getFlushBeforeDetach()
Whether OpenJPA should flush changes before detaching or serializing an
entity.
|
boolean |
getIgnoreDetachedStateFieldForProxySerialization()
Whether OpenJPA should ignore the DetachedStateField value when
determining if our Proxy classes should be removed during serialization.
|
int |
getJPQL()
Whether or not JPQL extensions are allowed.
|
boolean |
getMetaFactoriesAreStrict()
Whether the MetaDataFactory and MappingFactory should be set to strict mode.
|
boolean |
getNonOptimisticVersionCheck()
Whether or not to perform a version check on instances being updated
in a datastore transaction.
|
boolean |
getOverrideContextClassloader()
Whether to temporally override the thread's Context Classloader when processing
ORM XML documents to avoid deadlock potential with certain Classloader hierarchy
configurations.
|
boolean |
getParseAnnotationsForQueryMode()
Whether OpenJPA will scan every persistent class in an XML mapping file for annotations prior to executing a
query.
|
boolean |
getPrivatePersistentProperties()
Whether OpenJPA allows private, non-transient properties to be
persistent.
|
boolean |
getQuotedNumbersInQueries()
Whether to interpret quoted numbers in query strings as numbers.
|
boolean |
getReloadOnDetach()
Whether OpenJPA should attempt to load fields when the DetachState
option is set to loaded.
|
boolean |
getResetFlushFlagForCascadePersist()
Whether OpenJPA should reset the internal state (flush flag) when cascading a persist to another
Entity.
|
boolean |
getReturnNullOnEmptyAggregateResult()
This property is used to specify whether the aggregate query functions
SUM, AVG, MAX, and MIN return null if there is no query result.
|
boolean |
getStoreMapCollectionInEntityAsBlob()
Whether if map and collection in entity are stored as blob.
|
boolean |
getStrictIdentityValues()
Whether to require exact identity value types when creating object
ids from a class and value.
|
boolean |
getSuperclassDiscriminatorStrategyByDefault()
Whether to add class criteria for super class discreminator strategy.
|
boolean |
getUseJPA2DefaultOrderColumnName()
Whether OpenJPA should use the new default order column name defined
by JPA 2.0: name; "_"; "ORDER" or the pre-JPA 2.0 default name "ordr".
|
boolean |
getUseListAttributeForArrays()
This property can be used to allow OpenJPA to use ListAttributes for all types of Arrays, not just those with the
@ PersistentCollection annotation.
|
boolean |
getValidateFalseReturnsHollow()
Whether to return hollow instances to broker lookups with a
validate parameter of false. |
boolean |
getValidateTrueChecksStore()
Whether to check the datastore for the existence of a nontransactional
cached object in broker lookups with a
validate parameter
of true. |
boolean |
isAbstractMappingUniDirectional()
Whether OpenJPA allows bi-directional relationship in the MappedSuperclass.
|
boolean |
isNonDefaultMappingAllowed()
Whether OpenJPA allows non-default entity relationship mapping.
|
boolean |
isSingletonLifecycleEventManager()
Returns true if life cycle event manager is a singleton configuration.
|
void |
setAbstractMappingUniDirectional(boolean isAbstractMappingUniDirectional)
Whether OpenJPA allows bi-directional relationship in the MappedSuperclass.
|
void |
setAutoOff(boolean autoOff)
Whether to turn collection/map tracing off in case of more number of modifications.
|
void |
setCacheNonDefaultFetchPlanQueries(boolean bool)
Whether the SQL generated for queries executed with a modified fetch plan are cached.
|
void |
setCascadeWithDetach(boolean cascadeWithDetach)
Whether openjpa should always cascade on detach, regardless of the
cascade setting.
|
void |
setCheckDatabaseForCascadePersistToDetachedEntity(boolean b)
Whether OpenJPA will check the database for an Entity when cascading a persist to another Entity.
|
void |
setCloseOnManagedCommit(boolean close)
Whether to close the broker when the managed transaction commits.
|
void |
setConvertPositionalParametersToNamed(boolean c) |
void |
setCopyObjectIds(boolean copy)
Whether to copy identity objects before returning them to client code.
|
void |
setCopyOnDetach(boolean copyOnDetach)
Sets if detached entities are copy of the managed instances.
|
void |
setFilterPCRegistryClasses(boolean bool)
Whether the metadata processor should filter classes dispatched by the PCRegistry listener system.
|
void |
setFlushBeforeDetach(boolean beforeDetach)
Whether OpenJPA should flush changes before detaching or serializing an
entity.
|
void |
setIgnoreDetachedStateFieldForProxySerialization(boolean ignoreDSF)
Whether OpenJPA should ignore the DetachedStateField value when
determining if our Proxy classes should be removed during serialization.
|
void |
setJPQL(String jpql)
Whether or not JPQL extensions are allowed.
|
void |
setMetaFactoriesAreStrict(boolean metaFactoriesAreStrict)
Set whether MetaDataFactories and MappingFactories will be strictly separate.
|
void |
setNonDefaultMappingAllowed(boolean isNonDefaultMappingAllowed)
Whether OpenJPA allows non-default entity relationship mapping.
|
void |
setNonOptimisticVersionCheck(boolean nonOptimisticVersionCheck)
Whether or not to perform a version check on instances being updated
in a datastore transaction.
|
void |
setOverrideContextClassloader(boolean overrideContextClassloader)
Whether to temporally override the thread's Context Classloader when processing
ORM XML documents to avoid deadlock potential with certain Classloader hierarchy
configurations.
|
void |
setParseAnnotationsForQueryMode(boolean parseAnnotationsForQueryMode)
Whether OpenJPA will scan every persistent class in an XML mapping file for annotations prior to executing a
query.
|
void |
setPrivatePersistentProperties(boolean privateProps)
Whether OpenJPA allows private, non-transient properties to be
persistent.
|
void |
setQuotedNumbersInQueries(boolean quotedNumbers)
Whether to interpret quoted numbers in query strings as numbers.
|
void |
setReloadOnDetach(boolean reloadOnDetach)
Whether OpenJPA should attempt to load fields when the DetachState
option is set to loaded.
|
void |
setResetFlushFlagForCascadePersist(boolean b)
Whether OpenJPA should reset the internal state (flush flag) when cascading a persist to another
Entity.
|
void |
setReturnNullOnAggregateResult(boolean returnNullOnEmptyAggregateResult)
This property is used to specify whether the aggregate query functions
SUM, AVG, MAX, and MIN return null if there is no query result.
|
void |
setSingletonLifecycleEventManager(boolean singleton)
This property set whether each EntityManager has its own life cycle event manager.
|
void |
setStoreMapCollectionInEntityAsBlob(boolean storeAsBlob)
Whether if map and collection in entity are stored as blob.
|
void |
setStrictIdentityValues(boolean strictVals)
Whether to require exact identity value types when creating object
ids from a class and value.
|
void |
setSuperclassDiscriminatorStrategyByDefault(boolean superclassDiscriminatorStrategyByDefault)
Whether to add class criteria for super class discreminator strategy.
|
void |
setUseJPA2DefaultOrderColumnName(boolean useJPA2Name)
Whether OpenJPA should use the new default order column name defined
by JPA 2.0: name; "_"; "ORDER" or the pre-JPA 2.0 default name "ordr".
|
void |
setUseListAttributeForArrays(boolean useListAttribute)
This property can be used to allow OpenJPA to use ListAttributes for all types of Arrays, not just those with the
@PersistentCollection annotation.
|
void |
setValidateFalseReturnsHollow(boolean hollow)
Whether to return hollow instances to broker lookups with a
validate parameter of false. |
void |
setValidateTrueChecksStore(boolean check)
Whether to check the datastore for the existence of a nontransactional
cached object in broker lookups with a
validate parameter
of true. |
public static final int JPQL_STRICT
public static final int JPQL_WARN
public static final int JPQL_EXTENDED
public boolean getStrictIdentityValues()
public void setStrictIdentityValues(boolean strictVals)
public boolean getAutoOff()
public void setAutoOff(boolean autoOff)
public boolean getSuperclassDiscriminatorStrategyByDefault()
public void setSuperclassDiscriminatorStrategyByDefault(boolean superclassDiscriminatorStrategyByDefault)
public boolean getQuotedNumbersInQueries()
public void setQuotedNumbersInQueries(boolean quotedNumbers)
public boolean getValidateFalseReturnsHollow()
validate
parameter of false. OpenJPA versions prior to
0.4.0 did not return hollow instances without special configuration
(the ObjectLookupMode
). Beginning with 0.4.0, hollow
objects are the default.public void setValidateFalseReturnsHollow(boolean hollow)
validate
parameter of false. OpenJPA versions prior to
0.4.0 did not return hollow instances without special configuration
(the ObjectLookupMode
). Beginning with 0.4.0, hollow
objects are the default.public boolean getValidateTrueChecksStore()
validate
parameter
of true. OpenJPA versions prior to 0.4.0 checked the datastore.public void setValidateTrueChecksStore(boolean check)
validate
parameter
of true. OpenJPA versions prior to 0.4.0 checked the datastore.public boolean getCopyObjectIds()
public void setCopyObjectIds(boolean copy)
public boolean getCloseOnManagedCommit()
public void setCloseOnManagedCommit(boolean close)
public void setNonOptimisticVersionCheck(boolean nonOptimisticVersionCheck)
public boolean getNonOptimisticVersionCheck()
public int getJPQL()
JPQL_STRICT
.JPQL_WARN
,
JPQL_STRICT
,
JPQL_EXTENDED
public void setJPQL(String jpql)
JPQL_WARN
,
JPQL_STRICT
,
JPQL_EXTENDED
public boolean getStoreMapCollectionInEntityAsBlob()
false
.public void setStoreMapCollectionInEntityAsBlob(boolean storeAsBlob)
false
.public boolean getFlushBeforeDetach()
Prior to version 1.0.3 and 1.2.0 changes were always flushed.
public void setIgnoreDetachedStateFieldForProxySerialization(boolean ignoreDSF)
Starting with version 2.0.0, when the DetachedStateFiled==true, the build time $proxy classes will not be removed.
Prior to version 2.0.0, the DetachedStateFiled was not used and the $proxy classes were not being removed during serialization after the Persistence context was cleared.
ignoreDSF
- if true the old Proxy serialization behavior will be used.public boolean getIgnoreDetachedStateFieldForProxySerialization()
Starting with version 2.0.0, when the DetachedStateFiled==true, the build time $proxy classes will not be removed.
Prior to version 2.0.0, the DetachedStateFiled was not used and the $proxy classes were not being removed during serialization after the Persistence context was cleared.
public boolean getConvertPositionalParametersToNamed()
public void setConvertPositionalParametersToNamed(boolean c)
public void setFlushBeforeDetach(boolean beforeDetach)
Prior to version 1.0.3 and 1.2.0 changes were always flushed.
beforeDetach
- if true changes will be flushed before detaching or
serializing an entity.public boolean getCopyOnDetach()
public void setCopyOnDetach(boolean copyOnDetach)
public boolean getCascadeWithDetach()
public void setCascadeWithDetach(boolean cascadeWithDetach)
cascadeWithDetach
- true if cascade should always occur, false if
it should only occur if specified in metadatapublic boolean getUseJPA2DefaultOrderColumnName()
public void setUseJPA2DefaultOrderColumnName(boolean useJPA2Name)
useJPA2
- true if the JPA 2.0 default name should be used. false if
the 1.x name should be used.public boolean getPrivatePersistentProperties()
public void setPrivatePersistentProperties(boolean privateProps)
privateProps
- true if non-transient private properties
should be persistentpublic void setAbstractMappingUniDirectional(boolean isAbstractMappingUniDirectional)
isAbstractMappingUniDirectional
- true if relationship defined in the
MappedSuperclass must be uni-directionalpublic boolean isAbstractMappingUniDirectional()
public void setNonDefaultMappingAllowed(boolean isNonDefaultMappingAllowed)
public boolean isNonDefaultMappingAllowed()
public boolean getReloadOnDetach()
public void setReloadOnDetach(boolean reloadOnDetach)
reloadOnDetach
- the _reloadOnDetach to setpublic boolean getCheckDatabaseForCascadePersistToDetachedEntity()
public void setCheckDatabaseForCascadePersistToDetachedEntity(boolean b)
public boolean getOverrideContextClassloader()
public void setOverrideContextClassloader(boolean overrideContextClassloader)
public boolean getParseAnnotationsForQueryMode()
public void setParseAnnotationsForQueryMode(boolean parseAnnotationsForQueryMode)
public boolean getUseListAttributeForArrays()
public void setUseListAttributeForArrays(boolean useListAttribute)
useListAttribute
- whether OpenJPA will use ListAttributes for all arrays.public boolean getMetaFactoriesAreStrict()
public void setMetaFactoriesAreStrict(boolean metaFactoriesAreStrict)
metaFactoriesAreStrict
- True if the MetaDataFactory should only process metadata, and the MappingFactory should only process
mappings.public boolean getResetFlushFlagForCascadePersist()
public void setResetFlushFlagForCascadePersist(boolean b)
public boolean isSingletonLifecycleEventManager()
public void setSingletonLifecycleEventManager(boolean singleton)
public boolean getFilterPCRegistryClasses()
public void setFilterPCRegistryClasses(boolean bool)
public boolean getReturnNullOnEmptyAggregateResult()
public void setReturnNullOnAggregateResult(boolean returnNullOnEmptyAggregateResult)
returnNullOnAggregate
- whether OpenJPA will return null for aggregate
expressions when the query result is empty.public boolean getCacheNonDefaultFetchPlanQueries()
public void setCacheNonDefaultFetchPlanQueries(boolean bool)
Copyright © 2006–2022 Apache Software Foundation. All rights reserved.