wt.fc.collections
Class RefreshHelper

java.lang.Object
  extended bywt.fc.collections.RefreshHelper

final class RefreshHelper
extends Object

Package-private utility class that implements the collections-based refresh

Supported API: false

Extendable: false


Nested Class Summary
(package private) static class RefreshHelper.BothRoleRefresh
          Concrete LinkRefresh used when both roles are to be refreshed
(package private) static class RefreshHelper.LinkRefresh
          Utility class that handles the 2-pass refresh algorithm for both a link and its roles
(package private) static class RefreshHelper.LockRefresh
          Implements a refresh in which a 1st pass is done per table, since the objects need to be locked
(package private) static class RefreshHelper.Refresh
          Base class for both lock and non-locking refreshes.
(package private) static class RefreshHelper.RefreshData
          Tracks the oids and branch ids for the first and second pass queries
(package private) static class RefreshHelper.RoleAObjectReference
           
(package private) static class RefreshHelper.RoleARefresh
          Concrete LinkRefresh used when only Role A is to be refreshed
(package private) static class RefreshHelper.RoleAVersionReference
           
(package private) static class RefreshHelper.RoleBObjectReference
           
(package private) static class RefreshHelper.RoleBRefresh
          Concrete LinkRefresh used when only Role B is to be refreshed
(package private) static class RefreshHelper.RoleBVersionReference
           
(package private) static class RefreshHelper.RoleObjectReference
           
(package private) static interface RefreshHelper.RoleReference
          Allows a BinaryLink's role object to be refreshed using the normal refresh process, and ensures that the inflated object is set on the link itself
(package private) static class RefreshHelper.RoleVersionReference
           
(package private) static class RefreshHelper.UnionRefresh
          Implements a refresh in which the 1st pass is UNIONed, since locking isn't necessary
 
Field Summary
private static String BRANCH_ID
           
private static String CLASSNAME
           
private static boolean DEBUG
           
private static DebugWriter LOG
           
private static Long PLACEHOLDER_BRANCHID
           
private static String RESOURCE
           
 
Constructor Summary
(package private) RefreshHelper()
           
 
Method Summary
(package private) static void appendWhereBranchIDIn(Collection branch_ids, Class query_class, QuerySpec qs)
          Add a search condition selecting the latest iterations of the objects with the given branch ids.
(package private) static void appendWhereOidIn(Collection oids, Class query_class, QuerySpec qs)
          Add a search condition selecting the objects with the given oids.
(package private) static boolean isStale(Persistable p, int update_count)
           
(package private) static void refresh(WTCollection collection, RefreshSpec spec)
          Refreshes the collection using the given spec
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASSNAME

private static final String CLASSNAME

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

DEBUG

private static final boolean DEBUG

LOG

private static final DebugWriter LOG

PLACEHOLDER_BRANCHID

private static final Long PLACEHOLDER_BRANCHID

BRANCH_ID

private static final String BRANCH_ID
See Also:
Constant Field Values
Constructor Detail

RefreshHelper

RefreshHelper()
Method Detail

refresh

static void refresh(WTCollection collection,
                    RefreshSpec spec)
             throws WTException
Refreshes the collection using the given spec

Parameters:
collection -
spec -
Throws:
WTException

isStale

static final boolean isStale(Persistable p,
                             int update_count)

appendWhereBranchIDIn

static void appendWhereBranchIDIn(Collection branch_ids,
                                  Class query_class,
                                  QuerySpec qs)
                           throws WTException
Add a search condition selecting the latest iterations of the objects with the given branch ids.

Parameters:
branch_ids -
query_class -
qs -
Throws:
WTException

appendWhereOidIn

static void appendWhereOidIn(Collection oids,
                             Class query_class,
                             QuerySpec qs)
                      throws WTException
Add a search condition selecting the objects with the given oids.

Parameters:
oids -
query_class -
qs -
Throws:
WTException