wt.fc.collections
Class RefreshSpec

java.lang.Object
  extended by wt.fc.collections.RefreshSpec
All Implemented Interfaces:
Externalizable, Serializable

public class RefreshSpec
extends Object
implements Externalizable

Encapsulates the parameters that can be passed to the CollectionsManager refresh APIs.

Supported API: true

Extendable: false

See Also:
CollectionsManager.refresh(WTCollection), Serialized Form

Field Summary
static RefreshSpec DEFAULT
          A default, unmodfiable, reusable refresh spec.
static RefreshSpec LOCK_AND_REFRESH
          An unmodifiable, reusable RefreshSpec with the same configuration as the DEFAULT spec, exception that lock is true.
static int REFRESH_BOTH_ROLES
          One of the spec's possible linkActions.
static int REFRESH_LINK_ONLY
          One of the spec's possible linkActions.
static int REFRESH_ROLEA
          One of the spec's possible linkActions.
static int REFRESH_ROLEB
          One of the spec's possible linkActions.
static int REFRESH_STALE
          One of the spec's possible staleActions.
static int REMOVE_DELETE
          One of the spec's possible deleteActions.
static int RETAIN_DELETE
          One of the spec's possible deleteActions.
static int VALIDATE_DELETE
          One of the spec's possible deleteActions.
static int VALIDATE_STALE
          One of the spec's possible staleActions.
static int VALIDATE_STALE_IMMEDIATELY
          One of the spec's possible staleActions.
 
Constructor Summary
RefreshSpec()
          

Supported API: true
 
Method Summary
 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.
 int getLinkAction()
          Gets the value of the attribute: linkAction; Determines how the refresh will handle a Link object's roles.
 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.
 boolean isDisableAccess()
          Gets the value of the attribute: disableAccess; When true, the refresh is performed with access control disabled.
 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.
 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.
 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.
 void setDeleteAction(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.
 void setDisableAccess(boolean a_DisableAccess)
          Sets the value of the attribute: disableAccess; When true, the refresh is performed with access control disabled.
 void setForceRefresh(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.
 void setLinkAction(int a_LinkAction)
          Sets the value of the attribute: linkAction; Determines how the refresh will handle a Link object's roles.
 void setLock(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.
 void setStaleAction(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.
 void setUseReadOnly(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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT

public static final RefreshSpec DEFAULT
A default, unmodfiable, reusable refresh spec. The default spec has the following state:
deleteActionVALIDATE_DELETE
disableAccessfalse
lockfalse
staleActionUPDATE_STALE


Supported API: true


LOCK_AND_REFRESH

public static final RefreshSpec 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_DELETE
One of the spec's possible deleteActions.

Supported API: true

See Also:
setDeleteAction(int), Constant Field Values

RETAIN_DELETE

public static final int RETAIN_DELETE
One of the spec's possible deleteActions.

Supported API: true

See Also:
setDeleteAction(int), Constant Field Values

VALIDATE_DELETE

public static final int VALIDATE_DELETE
One of the spec's possible deleteActions.

Supported API: true

See Also:
setDeleteAction(int), Constant Field Values

REFRESH_STALE

public static final int REFRESH_STALE
One of the spec's possible staleActions.

Supported API: true

See Also:
setStaleAction(int), Constant Field Values

VALIDATE_STALE

public static final int VALIDATE_STALE
One of the spec's possible staleActions.

Supported API: true

See Also:
setStaleAction(int), Constant Field Values

REFRESH_BOTH_ROLES

public static final int REFRESH_BOTH_ROLES
One of the spec's possible linkActions.

Supported API: true

See Also:
setLinkAction(int), Constant Field Values

REFRESH_ROLEA

public static final int REFRESH_ROLEA
One of the spec's possible linkActions.

Supported API: true

See Also:
setLinkAction(int), Constant Field Values

REFRESH_ROLEB

public static final int REFRESH_ROLEB
One of the spec's possible linkActions.

Supported API: true

See Also:
setLinkAction(int), Constant Field Values

REFRESH_LINK_ONLY

public static final int REFRESH_LINK_ONLY
One of the spec's possible linkActions.

Supported API: true

See Also:
setLinkAction(int), Constant Field Values

VALIDATE_STALE_IMMEDIATELY

public static final int VALIDATE_STALE_IMMEDIATELY
One of the spec's possible staleActions.

Supported API: true

See Also:
setStaleAction(int), Constant Field Values
Constructor Detail

RefreshSpec

public RefreshSpec()


Supported API: true

Method Detail

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:

Supported API: true

Returns:
int

setDeleteAction

public void setDeleteAction(int a_DeleteAction)
                     throws WTPropertyVetoException
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:

Supported API: true

Parameters:
a_DeleteAction -
Throws:
WTPropertyVetoException

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

public void setDisableAccess(boolean a_DisableAccess)
                      throws WTPropertyVetoException
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

public void setForceRefresh(boolean a_ForceRefresh)
                     throws WTPropertyVetoException
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:

Supported API: true

Returns:
int
See Also:
BinaryLink

setLinkAction

public void setLinkAction(int a_LinkAction)
                   throws WTPropertyVetoException
Sets the value of the attribute: linkAction; Determines how the refresh will handle a Link object's roles. The options are:

Supported API: true

Parameters:
a_LinkAction -
Throws:
WTPropertyVetoException
See Also:
BinaryLink

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

public void setLock(boolean a_Lock)
             throws WTPropertyVetoException
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:

Supported API: true

Returns:
int

setStaleAction

public void setStaleAction(int a_StaleAction)
                    throws WTPropertyVetoException
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:

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 from CachedObjectReference

Supported API: true

Returns:
boolean
See Also:
ReferenceCache

setUseReadOnly

public void setUseReadOnly(boolean a_UseReadOnly)
                    throws WTPropertyVetoException
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 from CachedObjectReference

Supported API: true

Parameters:
a_UseReadOnly -
Throws:
WTPropertyVetoException
See Also:
ReferenceCache