Class AbstractCompositeCache<KM extends Serializable,TM extends Serializable>
java.lang.Object
name.matthewgreet.strutscommons.util.AbstractCompositeCache<KM,TM>
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AbstractCompositeCache_1S
public abstract class AbstractCompositeCache<KM extends Serializable,TM extends Serializable>
extends Object
implements Serializable
Template for web level, session-based caching a master, record list for editing in various web pages. Subclasses of this, as well as defining the record types, typically set list finders and other Stategies for record list relationships and pagination that clients don't set themselves, depending on web page workflow. Unlike similar versions, there are no slave lists. Instances are typically created as Singletons.
- KM
- Type primary key of master records
- TM
- Type of master records
As there are a bewildering set of configuration options and client Struts actions are expected to know their responsibilities in workflow, subclasses are a convenient Javadoc reference point for documenting this, such as below.
Slave list no | Name | Description | Viewer action | Base record | Other base record data | Page extension data | Detail data | Pagination mode | List/id/size finder | Page finder/ page extension assembler | Single item finder |
---|---|---|---|---|---|---|---|---|---|---|---|
Master | Board games | Board games in Board Game Geek database up to 2022 | ViewGameListAction |
GameDTO |
Related designers | Related artists, mechanics, and publishers | Depends on search criteria | Supplied by FindGameListByDesignerNameAction, FindGameListByFamileAction, FindGameListByNameContainsAction and FindGameListByRankAction | GamePageByIdsFinder, GamePageExtensionAssembler | GameItemFinder | |
1 | Ratings distribution | Counts of each user ratings of 0 to 10 | ViewRatingDistributionListAction |
GameRatingDTO |
Full list | GameRatingByGameIdListFinder | N/A | ||||
2 | User ratings | Individual user ratings | ViewUserRatingListAction |
UserRatingDTO | Owning username | Base record list | Supplied by FindUserRatingListByUsernameContainsAction and FindUserRatingListByRatingAction | UserRatingPageExtensionAssembler |
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Creates session-based, composite cache with a master list and no slave lists.AbstractCompositeCache
(AbstractCompositeCache<KM, TM> abstractCompositeCache) -
Method Summary
Modifier and TypeMethodDescriptionReturns cache of master list.protected abstract ListCache.ListCacheConfig
<NA, KM, TM> Overridden by concrete implementations to configure master list cache.protected void
notifyMasterListCacheChanged
(ListCache<?, ?, TM> listCache) Notification that the master list cache has changed.
-
Constructor Details
-
AbstractCompositeCache
protected AbstractCompositeCache()Creates session-based, composite cache with a master list and no slave lists. -
AbstractCompositeCache
public AbstractCompositeCache(AbstractCompositeCache<KM, TM> abstractCompositeCache) throws Exception- Throws:
Exception
-
-
Method Details
-
getMasterListCacheConfig
Overridden by concrete implementations to configure master list cache. -
notifyMasterListCacheChanged
Notification that the master list cache has changed. -
getMasterListCache
Returns cache of master list.
-