isTrackChangesByType()
Whether memory usage is reduced during this transaction at the expense
of tracking changes at the type level instead of the instance level,
resulting in more aggressive cache invalidation.

setPopulateDataCache(boolean cache)
Whether to populate the store cache with objects used by this
transaction.

void

setTrackChangesByType(boolean largeTransaction)
If a large number of objects will be created, modified, or deleted
during this transaction setting this option to true will reduce memory
usage if you perform periodic flushes by tracking changes at the type
level instead of the instance level, resulting in more aggressive cache
invalidation.

getFetchConfiguration

pushFetchConfiguration

Pushes a new fetch configuration that inherits from the current
fetch configuration onto a stack, and makes the new configuration
the active one.

Returns:

the new fetch configuration

Since:

1.1.0

popFetchConfiguration

void popFetchConfiguration()

Pops the fetch configuration from the top of the stack, making the
next one down the active one. This returns void to avoid confusion,
since fetch configurations tend to be used in method-chaining
patterns often.

find

Find the persistence object with the given oid. If
validate is true, the broker will check the store
for the object, and return null if it does not exist. If
validate is false, this method never returns null. The
broker will either return its cached instance, attempt to create a
hollow instance, or throw an ObjectNotFoundException if
unable to return a hollow instance.

Parameters:

validate - if true, validate that the instance exists in the
store and load fetch group fields, otherwise return
any cached or hollow instance

find

Return the object with the given oid. If present, the
cached instance will be returned. Otherwise, the instance will be
initialized through the store as usual; however, in this case
the store will be passed the given execution data, and the
system will load the object according to the given fetch configuratiion
(or the context's configuration, if the given one is null).
Fields can optionally be excluded from required loading using the
exclude mask. By default this method does not find new
unflushed instances, validates, and does not throw an exception
if a cached instance has been deleted concurrently. These options
are controllable through the given OID_XXX flags.

retrieve

Immediately load the given object's persistent fields. One might
use this action to make sure that an instance's fields are loaded
before transitioning it to transient. Note that this action is not
recursive. Any related objects that are loaded will not necessarily
have their fields loaded. Unmanaged target is ignored.

Parameters:

fgOnly - indicator as to whether to retrieve only fields
in the current fetch groups, or all fields

setDetachState

getPopulateDataCache

Whether objects accessed during this transaction will be added to the
store cache. Defaults to true.

Since:

0.3.4

setPopulateDataCache

void setPopulateDataCache(boolean cache)

Whether to populate the store cache with objects used by this
transaction. Defaults to true.

Since:

0.3.4

isTrackChangesByType

boolean isTrackChangesByType()

Whether memory usage is reduced during this transaction at the expense
of tracking changes at the type level instead of the instance level,
resulting in more aggressive cache invalidation.

Since:

1.0.0

setTrackChangesByType

void setTrackChangesByType(boolean largeTransaction)

If a large number of objects will be created, modified, or deleted
during this transaction setting this option to true will reduce memory
usage if you perform periodic flushes by tracking changes at the type
level instead of the instance level, resulting in more aggressive cache
invalidation. Upon transaction commit the data cache will have to
more aggressively flush objects. The store cache will have to flush
instances of objects for each class of object modified during the
transaction. A side benefit of large transaction mode is that smaller
update messages can be used for
RemoteCommitEvents. Defaults to false.

Since:

1.0.0

isManaged

boolean isManaged()

Whether this context is using managed transactions.

isActive

boolean isActive()

Whether a logical transaction is active.

isStoreActive

boolean isStoreActive()

Whether a data store transaction is active.

beginStore

void beginStore()

Begin a data store transaction.

hasConnection

boolean hasConnection()

Whether the broker has a dedicated connection based on the configured
connection retain mode and transaction status.