Package net.sf.basedb.util.listable
Class SourceItemTransformerWithCache.TransformerWithCache
java.lang.Object
net.sf.basedb.util.listable.SourceItemTransformerWithCache.TransformerWithCache
- All Implemented Interfaces:
SourceItemTransformer
- Enclosing class:
- SourceItemTransformerWithCache
static class SourceItemTransformerWithCache.TransformerWithCache
extends Object
implements SourceItemTransformer
-
Field Summary
Modifier and TypeFieldDescriptionprivate final String
private final SyncFilter.SourceItemTransform
private final SourceItemTransformer
-
Constructor Summary
ConstructorDescriptionTransformerWithCache
(SourceItemTransformer transformer, SyncFilter.SourceItemTransform transform, String cacheRegion) -
Method Summary
Modifier and TypeMethodDescriptionGet the item type of the source items.Get the item type of the target items.transform
(TransformContext context, Set<Integer> source) If a cache exists check if it has data for this transform already.
-
Field Details
-
transformer
-
transform
-
cacheRegion
-
-
Constructor Details
-
TransformerWithCache
TransformerWithCache(SourceItemTransformer transformer, SyncFilter.SourceItemTransform transform, String cacheRegion)
-
-
Method Details
-
getSourceItemType
Description copied from interface:SourceItemTransformer
Get the item type of the source items.- Specified by:
getSourceItemType
in interfaceSourceItemTransformer
-
getTargetItemType
Description copied from interface:SourceItemTransformer
Get the item type of the target items.- Specified by:
getTargetItemType
in interfaceSourceItemTransformer
-
transform
If a cache exists check if it has data for this transform already. If not, forward to the parent transformer and then cache the result for future use.- Specified by:
transform
in interfaceSourceItemTransformer
-