Package org.apache.openjpa.conf
Class DetachOptions
- java.lang.Object
-
- org.apache.openjpa.conf.DetachOptions
-
- All Implemented Interfaces:
DetachState
- Direct Known Subclasses:
DetachOptions.All
,DetachOptions.FetchGroups
,DetachOptions.Loaded
public abstract class DetachOptions extends java.lang.Object implements DetachState
Detach options.- Author:
- Abe White
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DetachOptions.All
Public to allow reflection.static class
DetachOptions.FetchGroups
Public to allow reflection.static class
DetachOptions.Loaded
Detach loaded state.
-
Field Summary
-
Fields inherited from interface org.apache.openjpa.kernel.DetachState
DETACH_ALL, DETACH_FETCH_GROUPS, DETACH_FGS, DETACH_LOADED
-
-
Constructor Summary
Constructors Constructor Description DetachOptions()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
getAccessUnloaded()
Whether to allow access to unloaded detached fields.boolean
getDetachedStateField()
Whether to add a detached state field to enhanced classes.boolean
getDetachedStateManager()
Whether to use a detached state manager on types that allow it.boolean
getDetachProxyFields()
Whether to detach proxy fields.abstract int
getDetachState()
TheDetachState
constant.boolean
getLiteAutoDetach()
Whether to use lite detachment when auto detaching.boolean
isDetachedStateTransient()
Whether to use transient detached state.void
setAccessUnloaded(boolean val)
Whether to allow access to unloaded detached fields.void
setDetachedStateField(boolean val)
Whether to add a detached state field to enhanced classes.void
setDetachedStateField(java.lang.String val)
For auto-configuration of the detached state field.void
setDetachedStateManager(boolean val)
Whether to use a detached state manager on types that allow it.void
setDetachedStateTransient(boolean val)
Whether to use transient detached state.void
setDetachProxyFields(boolean b)
Whether to detach proxy fields.void
setLiteAutoDetach(boolean b)
Whether to use lite detachment when auto detaching.
-
-
-
Method Detail
-
getDetachState
public abstract int getDetachState()
TheDetachState
constant.
-
getDetachedStateField
public boolean getDetachedStateField()
Whether to add a detached state field to enhanced classes.
-
setDetachedStateField
public void setDetachedStateField(boolean val)
Whether to add a detached state field to enhanced classes.
-
setDetachedStateField
public void setDetachedStateField(java.lang.String val)
For auto-configuration of the detached state field. Accepts values "true", "false", or "transient".
-
isDetachedStateTransient
public boolean isDetachedStateTransient()
Whether to use transient detached state.
-
setDetachedStateTransient
public void setDetachedStateTransient(boolean val)
Whether to use transient detached state.
-
getDetachedStateManager
public boolean getDetachedStateManager()
Whether to use a detached state manager on types that allow it. Types that do not use detached state or that declare a custom detached state field to maintain serialization compatibility will never use a detached state manager. Defaults to true.
-
setDetachedStateManager
public void setDetachedStateManager(boolean val)
Whether to use a detached state manager on types that allow it. Types that do not use detached state or that declare a custom detached state field to maintain serialization compatibility will never use a detached state manager. Defaults to true.
-
getAccessUnloaded
public boolean getAccessUnloaded()
Whether to allow access to unloaded detached fields. This setting only applies to instances with detached state managers.
-
setAccessUnloaded
public void setAccessUnloaded(boolean val)
Whether to allow access to unloaded detached fields. This setting only applies to instances with detached state managers.
-
setLiteAutoDetach
public void setLiteAutoDetach(boolean b)
Whether to use lite detachment when auto detaching. This setting only applies when DetachState is set to loaded.
-
getLiteAutoDetach
public boolean getLiteAutoDetach()
Whether to use lite detachment when auto detaching. This setting only applies when DetachState is set to loaded.
-
setDetachProxyFields
public void setDetachProxyFields(boolean b)
Whether to detach proxy fields.
-
getDetachProxyFields
public boolean getDetachProxyFields()
Whether to detach proxy fields.
-
-