Class AbstractCompositeCache_1S<KM extends Serializable,TM extends Serializable,K1 extends Serializable,T1 extends Serializable>
java.lang.Object
name.matthewgreet.strutscommons.util.AbstractCompositeCache<KM,TM>
name.matthewgreet.strutscommons.util.AbstractCompositeCache_1S<KM,TM,K1,T1>
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AbstractCompositeCache_2S
public abstract class AbstractCompositeCache_1S<KM extends Serializable,TM extends Serializable,K1 extends Serializable,T1 extends Serializable>
extends AbstractCompositeCache<KM,TM>
Template for web level, session-based caching a master, record list with one slave list for editing in various web pages. Subclasses of this, as well as defining the record types, typically set list finders and other Strategies for record list relationships and pagination that clients don't set themselves, depending on web page workflow. Instances are typically created as Singletons.
- KM
- Type primary key of master records
- TM
- Type of master records
- K1
- Type primary key of slave list 1 records
- T1
- Type of slave list 1 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 1 slave list.AbstractCompositeCache_1S
(AbstractCompositeCache_1S<KM, TM, K1, T1> abstractCompositeCache) -
Method Summary
Modifier and TypeMethodDescriptionReturns cache of slave list 1.protected abstract ListCache.ListCacheConfig
<TM, K1, T1> Overridden by concrete implementations to configure slave list cache 1.protected void
notifySlaveListCache1Changed
(ListCache<?, ?, T1> listCache) Notification that the slave list cache 1 has changed.Methods inherited from class name.matthewgreet.strutscommons.util.AbstractCompositeCache
getMasterListCache, getMasterListCacheConfig, notifyMasterListCacheChanged
-
Constructor Details
-
Method Details
-
getSlaveListCache1Config
Overridden by concrete implementations to configure slave list cache 1. -
notifySlaveListCache1Changed
Notification that the slave list cache 1 has changed. -
getSlaveListCache1
Returns cache of slave list 1.
-