|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.fc.collections.RefreshHelper.LinkRefresh
Utility class that handles the 2-pass refresh algorithm for both a link and its roles
Nested Class Summary | |
(package private) static class |
RefreshHelper.LinkRefresh.LinkData
Utility class to collect information selected about a link and its roles |
Field Summary | |
(package private) Set |
cachedLinks
The set of links that were in the refresh cache |
(package private) Map |
linkClassesToReferences
Mapping of BinaryLink subclasses to the Set of WTReferences that refer to instances of them |
(package private) RefreshHelper.Refresh |
refresh
The refresh this LinkRefresh was constructed with. |
(package private) List |
roleReferences
The list of role references created by this refresh |
Constructor Summary | |
(package private) |
RefreshHelper.LinkRefresh(RefreshHelper.Refresh r)
|
Method Summary | |
(package private) void |
add(WTReference r)
Add the reference to linkClassesToReferences |
(package private) abstract void |
appendAdditionalCriteria(QuerySpec qs,
Class link_class,
int link_idx)
Add criteria to select the roles based on the link type and link action |
(package private) void |
appendSelectVersionRoleA(QuerySpec qs,
int link_idx,
LinkInfo info)
Utility method to add criteria for a version-based role a to the QuerySpec |
(package private) void |
appendSelectVersionRoleB(QuerySpec qs,
int link_idx,
LinkInfo info)
Utility method to add criteria for a version-based role b to the QuerySpec |
(package private) RefreshHelper.RoleReference |
createRoleAReference(WTReference ref,
RefreshHelper.LinkRefresh.LinkData data,
Persistable inflated_role)
Create a role a reference for the given data. |
(package private) RefreshHelper.RoleReference |
createRoleBReference(WTReference ref,
RefreshHelper.LinkRefresh.LinkData data,
Persistable inflated_role)
Create a role b reference for the given data. |
(package private) void |
doFirstPass()
Do the first pass of the refresh algorithm on the links and their inflated roles |
private void |
doFirstPass(Class c,
Set refs)
Adds the oids of links that need to be refreshed to the secondPassOids. |
(package private) void |
doSecondPass()
Inflate the objects in roleReferences |
(package private) abstract RefreshHelper.LinkRefresh.LinkData |
getLinkData(Object[] columns,
Class link_class)
Create a LinkData based on the given result columns and link_class |
(package private) RefreshHelper.LinkRefresh.LinkData |
getLinkDataForCachedObject(WTReference r)
|
(package private) StatementSpec |
getSpec(Class link_class,
Set refs)
Get a StatementSpec that finds the link oids and the requested roles |
(package private) void |
log()
Print debug information to the log |
(package private) void |
processLink(WTReference ref,
RefreshHelper.LinkRefresh.LinkData data)
Figure out what to do with the given link reference given its corresponding LinkData. |
(package private) void |
processRoleA(WTReference ref,
RefreshHelper.LinkRefresh.LinkData data)
Determines if a given link's role a needs to be refreshed based on the given LinkData. |
(package private) void |
processRoleB(WTReference ref,
RefreshHelper.LinkRefresh.LinkData data)
Determines if a given link's role b needs to be refreshed based on the given LinkData. |
(package private) void |
processUninflatedRoleA(WTReference ref,
RefreshHelper.LinkRefresh.LinkData data)
Called when the link does not have an inflated role a object |
(package private) void |
processUninflatedRoleB(WTReference ref,
RefreshHelper.LinkRefresh.LinkData data)
Called when the link does not have an inflated role b object |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
final RefreshHelper.Refresh refresh
Map linkClassesToReferences
Set cachedLinks
List roleReferences
Constructor Detail |
RefreshHelper.LinkRefresh(RefreshHelper.Refresh r)
Method Detail |
void add(WTReference r) throws WTException
r
-
WTException
void doFirstPass() throws WTException
WTException
RefreshHelper.LinkRefresh.LinkData getLinkDataForCachedObject(WTReference r) throws WTException
WTException
private void doFirstPass(Class c, Set refs) throws WTException
c
- refs
-
WTException
StatementSpec getSpec(Class link_class, Set refs) throws WTException
link_class
- refs
-
WTException
abstract void appendAdditionalCriteria(QuerySpec qs, Class link_class, int link_idx) throws WTException
qs
- link_class
- link_idx
-
WTException
void appendSelectVersionRoleA(QuerySpec qs, int link_idx, LinkInfo info) throws WTException
qs
- link_idx
- info
-
WTException
void appendSelectVersionRoleB(QuerySpec qs, int link_idx, LinkInfo info) throws WTException
qs
- link_idx
- info
-
WTException
abstract RefreshHelper.LinkRefresh.LinkData getLinkData(Object[] columns, Class link_class) throws WTException
columns
- link_class
-
WTException
void processLink(WTReference ref, RefreshHelper.LinkRefresh.LinkData data) throws WTException
ref
- data
-
WTException
void processUninflatedRoleA(WTReference ref, RefreshHelper.LinkRefresh.LinkData data) throws WTException
ref
- data
-
WTException
void processUninflatedRoleB(WTReference ref, RefreshHelper.LinkRefresh.LinkData data) throws WTException
ref
- data
-
WTException
void processRoleA(WTReference ref, RefreshHelper.LinkRefresh.LinkData data) throws WTException
ref
- data
-
WTException
void processRoleB(WTReference ref, RefreshHelper.LinkRefresh.LinkData data) throws WTException
ref
- data
-
WTException
RefreshHelper.RoleReference createRoleAReference(WTReference ref, RefreshHelper.LinkRefresh.LinkData data, Persistable inflated_role) throws WTException
ref
- A reference to the BinaryLink that the role is a member ofdata
- inflated_role
- If the reference had an inflated role object, it is supplied here.
Otherwise this argument is null.
WTException
RefreshHelper.RoleReference createRoleBReference(WTReference ref, RefreshHelper.LinkRefresh.LinkData data, Persistable inflated_role) throws WTException
ref
- A reference to the BinaryLink that the role is a member ofdata
- inflated_role
- If the reference had an inflated role object, it is supplied here.
Otherwise this argument is null.
WTException
void doSecondPass() throws WTException
WTException
void log()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |