wt.fc.collections
Class RefreshSpec

java.lang.Object
  extended bywt.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
private static String CLASSNAME
           
static RefreshSpec DEFAULT
          A default, unmodfiable, reusable refresh spec.
private static int DEFAULT_MASK
           
private static int DELETE_ACTIONS
           
private  boolean disableAccess
           
static long EXTERNALIZATION_VERSION_UID
           
protected static int FORCE_REFRESH_FLAG
           
private static int LINK_ACTIONS
           
static RefreshSpec LOCK_AND_REFRESH
          An unmodifiable, reusable RefreshSpec with the same configuration as the DEFAULT spec, exception that lock is true.
protected static int LOCK_FLAG
           
private  int mask
           
private  boolean modifiable
           
protected static long OLD_FORMAT_VERSION_UID
           
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.
private static String RESOURCE
           
(package private) static RefreshSpec RESTORE
           
static int RETAIN_DELETE
          One of the spec's possible deleteActions.
(package private) static long serialVersionUID
           
private static int STALE_ACTIONS
           
static int UPDATE_STALE
          Deprecated. Replaced by REFRESH_STALE
private  boolean useReadOnly
           
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
private RefreshSpec(boolean modifiable, int mask)
           
 
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 readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
private  boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source, which is not the current version.
protected  boolean readVersion(RefreshSpec thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 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.
 String toString()
           
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

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

LOCK_FLAG

protected static final int LOCK_FLAG
See Also:
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

FORCE_REFRESH_FLAG

protected static final int FORCE_REFRESH_FLAG
See Also:
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

disableAccess

private transient boolean disableAccess

useReadOnly

private transient boolean useReadOnly

modifiable

private transient boolean modifiable

mask

private int mask

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
See Also:
Constant Field Values

UPDATE_STALE

public static final int UPDATE_STALE
Deprecated. Replaced by REFRESH_STALE

See Also:
REFRESH_STALE, Constant Field Values

STALE_ACTIONS

private static final int STALE_ACTIONS
See Also:
Constant Field Values

DELETE_ACTIONS

private static final int DELETE_ACTIONS
See Also:
Constant Field Values

LINK_ACTIONS

private static final int LINK_ACTIONS
See Also:
Constant Field Values

DEFAULT_MASK

private static final int DEFAULT_MASK
See Also:
Constant Field Values

RESTORE

static final RefreshSpec RESTORE
Constructor Detail

RefreshSpec

public RefreshSpec()


Supported API: true


RefreshSpec

private RefreshSpec(boolean modifiable,
                    int mask)
Parameters:
modifiable -
mask -
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(RefreshSpec thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Parameters:
thisObject -
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

readOldVersion

private boolean readOldVersion(ObjectInput input,
                               long readSerialVersionUID,
                               boolean passThrough,
                               boolean superDone)
                        throws IOException,
                               ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

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

toString

public String toString()