Package wt.fc.collections
Class RefreshSpec
java.lang.Object
wt.fc.collections.RefreshSpec
- All Implemented Interfaces:
Externalizable,Serializable
Encapsulates the parameters that can be passed to the CollectionsManager
refresh APIs.
Supported API: true
Extendable: false
Supported API: true
Extendable: false
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final RefreshSpecA default, unmodfiable, reusable refresh spec.static final RefreshSpecAn unmodifiable, reusable RefreshSpec with the same configuration as the DEFAULT spec, exception that lock is true.static final intOne of the spec's possible linkActions.static final intOne of the spec's possible linkActions.static final intOne of the spec's possible linkActions.static final intOne of the spec's possible linkActions.static final intOne of the spec's possible staleActions.static final intOne of the spec's possible deleteActions.static final intOne of the spec's possible deleteActions.static final intOne of the spec's possible deleteActions.static final intOne of the spec's possible staleActions.static final intOne of the spec's possible staleActions. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintGets the value of the attribute: deleteAction; Determines what the refresh will do with objects that are in the collection that have been deleted.intGets the value of the attribute: linkAction; Determines how the refresh will handle a Link object's roles.intGets the value of the attribute: staleAction; Determines what the refresh will do with objects that are in the collection that are stale.booleanGets the value of the attribute: disableAccess; When true, the refresh is performed with access control disabled.booleanGets the value of the attribute: forceRefresh; When true, all objects are refreshed from the database regardless of whether or not they are stale.booleanisLock()Gets the value of the attribute: lock; When true, all the objects in the collection (stale or not) are locked for the remainder of the current transaction.booleanGets the value of the attribute: useReadOnly; This property allows server-side refreshes to use read-only instances of objects in the object reference cache.voidsetDeleteAction(int a_DeleteAction) Sets the value of the attribute: deleteAction; Determines what the refresh will do with objects that are in the collection that have been deleted.voidsetDisableAccess(boolean a_DisableAccess) Sets the value of the attribute: disableAccess; When true, the refresh is performed with access control disabled.voidsetForceRefresh(boolean a_ForceRefresh) Sets the value of the attribute: forceRefresh; When true, all objects are refreshed from the database regardless of whether or not they are stale.voidsetLinkAction(int a_LinkAction) Sets the value of the attribute: linkAction; Determines how the refresh will handle a Link object's roles.voidsetLock(boolean a_Lock) Sets the value of the attribute: lock; When true, all the objects in the collection (stale or not) are locked for the remainder of the current transaction.voidsetStaleAction(int a_StaleAction) Sets the value of the attribute: staleAction; Determines what the refresh will do with objects that are in the collection that are stale.voidsetUseReadOnly(boolean a_UseReadOnly) Sets the value of the attribute: useReadOnly; This property allows server-side refreshes to use read-only instances of objects in the object reference cache.
-
Field Details
-
DEFAULT
A default, unmodfiable, reusable refresh spec. The default spec has the following state:deleteAction VALIDATE_DELETE disableAccess false lock false staleAction UPDATE_STALE
Supported API: true -
LOCK_AND_REFRESH
An unmodifiable, reusable RefreshSpec with the same configuration as the DEFAULT spec, exception that lock is true.
Supported API: true -
REMOVE_DELETE
public static final int REMOVE_DELETEOne of the spec's possible deleteActions.
Supported API: true- See Also:
-
RETAIN_DELETE
public static final int RETAIN_DELETEOne of the spec's possible deleteActions.
Supported API: true- See Also:
-
VALIDATE_DELETE
public static final int VALIDATE_DELETEOne of the spec's possible deleteActions.
Supported API: true- See Also:
-
REFRESH_STALE
public static final int REFRESH_STALEOne of the spec's possible staleActions.
Supported API: true- See Also:
-
VALIDATE_STALE
public static final int VALIDATE_STALEOne of the spec's possible staleActions.
Supported API: true- See Also:
-
REFRESH_BOTH_ROLES
public static final int REFRESH_BOTH_ROLESOne of the spec's possible linkActions.
Supported API: true- See Also:
-
REFRESH_ROLEA
public static final int REFRESH_ROLEAOne of the spec's possible linkActions.
Supported API: true- See Also:
-
REFRESH_ROLEB
public static final int REFRESH_ROLEBOne of the spec's possible linkActions.
Supported API: true- See Also:
-
REFRESH_LINK_ONLY
public static final int REFRESH_LINK_ONLYOne of the spec's possible linkActions.
Supported API: true- See Also:
-
VALIDATE_STALE_IMMEDIATELY
public static final int VALIDATE_STALE_IMMEDIATELYOne of the spec's possible staleActions.
Supported API: true- See Also:
-
-
Constructor Details
-
RefreshSpec
public RefreshSpec()
Supported API: true
-
-
Method Details
-
getDeleteAction
public int getDeleteAction()Gets the value of the attribute: deleteAction; Determines what the refresh will do with objects that are in the collection that have been deleted. The options are:- VALIDATE_DELETE: Throw a
CollectionContainsDeleteActionif the collection contains any deleted objects (Default) - REMOVE_DELETE: Silently remove deleted objects from the collection.
- RETAIN_DELETE: Do not remove deleted objects from the collection.
Supported API: true- Returns:
- int
- VALIDATE_DELETE: Throw a
-
setDeleteAction
Sets the value of the attribute: deleteAction; Determines what the refresh will do with objects that are in the collection that have been deleted. The options are:- VALIDATE_DELETE: Throw a
CollectionContainsDeleteActionif the collection contains any deleted objects (Default) - REMOVE_DELETE: Silently remove deleted objects from the collection.
- RETAIN_DELETE: Do not remove deleted objects from the collection.
Supported API: true- Parameters:
a_DeleteAction-- Throws:
WTPropertyVetoException
- VALIDATE_DELETE: Throw a
-
isDisableAccess
public boolean isDisableAccess()Gets the value of the attribute: disableAccess; When true, the refresh is performed with access control disabled. This is a transient property that defaults to false, so it only has an effect when assigned on the server.
Supported API: true- Returns:
- boolean
-
setDisableAccess
Sets the value of the attribute: disableAccess; When true, the refresh is performed with access control disabled. This is a transient property that defaults to false, so it only has an effect when assigned on the server.
Supported API: true- Parameters:
a_DisableAccess-- Throws:
WTPropertyVetoException
-
isForceRefresh
public boolean isForceRefresh()Gets the value of the attribute: forceRefresh; When true, all objects are refreshed from the database regardless of whether or not they are stale. When false, only stale objects are refreshed, and non-stale objects are left untouched.Default: true
Supported API: true- Returns:
- boolean
-
setForceRefresh
Sets the value of the attribute: forceRefresh; When true, all objects are refreshed from the database regardless of whether or not they are stale. When false, only stale objects are refreshed, and non-stale objects are left untouched.Default: true
Supported API: true- Parameters:
a_ForceRefresh-- Throws:
WTPropertyVetoException
-
getLinkAction
public int getLinkAction()Gets the value of the attribute: linkAction; Determines how the refresh will handle a Link object's roles. The options are:- REFRESH_BOTH_ROLES: Refresh the link and both role objects (Default)
- REFRESH_ROLEA: Refresh the link and the role a object.
- REFRESH_ROLEB: Refresh the link and the role b object
- REFRESH_LINK_ONLY: Do not refresh either role; only the link object itself
Supported API: true- Returns:
- int
- See Also:
-
setLinkAction
Sets the value of the attribute: linkAction; Determines how the refresh will handle a Link object's roles. The options are:- REFRESH_BOTH_ROLES: Refresh the link and both role objects (Default)
- REFRESH_ROLEA: Refresh the link and the role a object.
- REFRESH_ROLEB: Refresh the link and the role b object
- REFRESH_LINK_ONLY: Do not refresh either role; only the link object itself
Supported API: true- Parameters:
a_LinkAction-- Throws:
WTPropertyVetoException- See Also:
-
isLock
public boolean isLock()Gets the value of the attribute: lock; When true, all the objects in the collection (stale or not) are locked for the remainder of the current transaction.
Supported API: true- Returns:
- boolean
-
setLock
Sets the value of the attribute: lock; When true, all the objects in the collection (stale or not) are locked for the remainder of the current transaction.
Supported API: true- Parameters:
a_Lock-- Throws:
WTPropertyVetoException
-
getStaleAction
public int getStaleAction()Gets the value of the attribute: staleAction; Determines what the refresh will do with objects that are in the collection that are stale. The options are:- REFRESH_STALE: Gets the latest version of the stale object. (Default)
- VALIDATE_STALE: Throw a
CollectionContainsStaleExceptionwith the identities of all stale objects in the collection - VALIDATE_STALE_IMMEDIATELY: Throw a
CollectionContainsStaleExceptionwith the identity of the first stale object encountered by the refresh. This may save some processing time if the caller does not have a need to display the stale objects to a client or log file.
Supported API: true- Returns:
- int
-
setStaleAction
Sets the value of the attribute: staleAction; Determines what the refresh will do with objects that are in the collection that are stale. The options are:- REFRESH_STALE: Gets the latest version of the stale object. (Default)
- VALIDATE_STALE: Throw a
CollectionContainsStaleExceptionwith the identities of all stale objects in the collection - VALIDATE_STALE_IMMEDIATELY: Throw a
CollectionContainsStaleExceptionwith the identity of the first stale object encountered by the refresh. This may save some processing time if the caller does not have a need to display the stale objects to a client or log file.
Supported API: true- Parameters:
a_StaleAction-- Throws:
WTPropertyVetoException
-
isUseReadOnly
public boolean isUseReadOnly()Gets the value of the attribute: useReadOnly; This property allows server-side refreshes to use read-only instances of objects in the object reference cache. By default, the refresh will clone these objects to avoid corrupting the cache. The objects stored by the reference cache are those that have reference types that descend fromCachedObjectReference
Supported API: true- Returns:
- boolean
- See Also:
-
ReferenceCache
-
setUseReadOnly
Sets the value of the attribute: useReadOnly; This property allows server-side refreshes to use read-only instances of objects in the object reference cache. By default, the refresh will clone these objects to avoid corrupting the cache. The objects stored by the reference cache are those that have reference types that descend fromCachedObjectReference
Supported API: true- Parameters:
a_UseReadOnly-- Throws:
WTPropertyVetoException- See Also:
-
ReferenceCache
-