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 Object implements DetachState
Detach options.
Author:
Abe White
  • Constructor Details

    • DetachOptions

      public DetachOptions()
  • Method Details

    • getDetachState

      public abstract int getDetachState()
      The DetachState 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(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.