001// --------------------------------------------------------------------------------
002// Copyright 2002-2024 Echo Three, LLC
003//
004// Licensed under the Apache License, Version 2.0 (the "License");
005// you may not use this file except in compliance with the License.
006// You may obtain a copy of the License at
007//
008//     http://www.apache.org/licenses/LICENSE-2.0
009//
010// Unless required by applicable law or agreed to in writing, software
011// distributed under the License is distributed on an "AS IS" BASIS,
012// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013// See the License for the specific language governing permissions and
014// limitations under the License.
015// --------------------------------------------------------------------------------
016
017package com.echothree.model.control.wishlist.server.transfer;
018
019import com.echothree.model.control.wishlist.server.control.WishlistControl;
020import com.echothree.model.data.user.server.entity.UserVisit;
021import com.echothree.util.server.transfer.BaseTransferCaches;
022
023public class WishlistTransferCaches
024        extends BaseTransferCaches {
025    
026    protected WishlistControl wishlistControl;
027    
028    protected WishlistTypeTransferCache wishlistTypeTransferCache;
029    protected WishlistTypeDescriptionTransferCache wishlistTypeDescriptionTransferCache;
030    protected WishlistPriorityTransferCache wishlistPriorityTransferCache;
031    protected WishlistPriorityDescriptionTransferCache wishlistPriorityDescriptionTransferCache;
032    protected WishlistTransferCache wishlistTransferCache;
033    protected WishlistLineTransferCache wishlistLineTransferCache;
034    
035    /** Creates a new instance of WishlistTransferCaches */
036    public WishlistTransferCaches(UserVisit userVisit, WishlistControl wishlistControl) {
037        super(userVisit);
038        
039        this.wishlistControl = wishlistControl;
040    }
041    
042    public WishlistTypeTransferCache getWishlistTypeTransferCache() {
043        if(wishlistTypeTransferCache == null)
044            wishlistTypeTransferCache = new WishlistTypeTransferCache(userVisit, wishlistControl);
045        
046        return wishlistTypeTransferCache;
047    }
048    
049    public WishlistTypeDescriptionTransferCache getWishlistTypeDescriptionTransferCache() {
050        if(wishlistTypeDescriptionTransferCache == null)
051            wishlistTypeDescriptionTransferCache = new WishlistTypeDescriptionTransferCache(userVisit, wishlistControl);
052        
053        return wishlistTypeDescriptionTransferCache;
054    }
055    
056    public WishlistPriorityTransferCache getWishlistPriorityTransferCache() {
057        if(wishlistPriorityTransferCache == null)
058            wishlistPriorityTransferCache = new WishlistPriorityTransferCache(userVisit, wishlistControl);
059        
060        return wishlistPriorityTransferCache;
061    }
062    
063    public WishlistPriorityDescriptionTransferCache getWishlistPriorityDescriptionTransferCache() {
064        if(wishlistPriorityDescriptionTransferCache == null)
065            wishlistPriorityDescriptionTransferCache = new WishlistPriorityDescriptionTransferCache(userVisit, wishlistControl);
066        
067        return wishlistPriorityDescriptionTransferCache;
068    }
069    
070    public WishlistTransferCache getWishlistTransferCache() {
071        if(wishlistTransferCache == null)
072            wishlistTransferCache = new WishlistTransferCache(userVisit, wishlistControl);
073        
074        return wishlistTransferCache;
075    }
076    
077    public WishlistLineTransferCache getWishlistLineTransferCache() {
078        if(wishlistLineTransferCache == null)
079            wishlistLineTransferCache = new WishlistLineTransferCache(userVisit, wishlistControl);
080        
081        return wishlistLineTransferCache;
082    }
083    
084}