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.batch.server.transfer;
018
019import com.echothree.model.control.batch.server.control.BatchControl;
020import com.echothree.model.data.user.server.entity.UserVisit;
021import com.echothree.util.server.transfer.BaseTransferCaches;
022
023public class BatchTransferCaches
024        extends BaseTransferCaches {
025    
026    protected BatchControl batchControl;
027    
028    protected BatchTypeTransferCache batchTypeTransferCache;
029    protected BatchTypeDescriptionTransferCache batchTypeDescriptionTransferCache;
030    protected BatchTypeEntityTypeTransferCache batchTypeEntityTypeTransferCache;
031    protected BatchAliasTypeTransferCache batchAliasTypeTransferCache;
032    protected BatchAliasTypeDescriptionTransferCache batchAliasTypeDescriptionTransferCache;
033    protected BatchTransferCache batchTransferCache;
034    protected BatchAliasTransferCache batchAliasTransferCache;
035    protected BatchEntityTransferCache batchEntityTransferCache;
036    
037    /** Creates a new instance of BatchTransferCaches */
038    public BatchTransferCaches(UserVisit userVisit, BatchControl batchControl) {
039        super(userVisit);
040        
041        this.batchControl = batchControl;
042    }
043    
044    public BatchTypeTransferCache getBatchTypeTransferCache() {
045        if(batchTypeTransferCache == null)
046            batchTypeTransferCache = new BatchTypeTransferCache(userVisit, batchControl);
047        
048        return batchTypeTransferCache;
049    }
050    
051    public BatchTypeDescriptionTransferCache getBatchTypeDescriptionTransferCache() {
052        if(batchTypeDescriptionTransferCache == null)
053            batchTypeDescriptionTransferCache = new BatchTypeDescriptionTransferCache(userVisit, batchControl);
054
055        return batchTypeDescriptionTransferCache;
056    }
057
058    public BatchTypeEntityTypeTransferCache getBatchTypeEntityTypeTransferCache() {
059        if(batchTypeEntityTypeTransferCache == null)
060            batchTypeEntityTypeTransferCache = new BatchTypeEntityTypeTransferCache(userVisit, batchControl);
061
062        return batchTypeEntityTypeTransferCache;
063    }
064
065    public BatchAliasTypeTransferCache getBatchAliasTypeTransferCache() {
066        if(batchAliasTypeTransferCache == null)
067            batchAliasTypeTransferCache = new BatchAliasTypeTransferCache(userVisit, batchControl);
068        
069        return batchAliasTypeTransferCache;
070    }
071    
072    public BatchAliasTypeDescriptionTransferCache getBatchAliasTypeDescriptionTransferCache() {
073        if(batchAliasTypeDescriptionTransferCache == null)
074            batchAliasTypeDescriptionTransferCache = new BatchAliasTypeDescriptionTransferCache(userVisit, batchControl);
075        
076        return batchAliasTypeDescriptionTransferCache;
077    }
078    
079    public BatchTransferCache getBatchTransferCache() {
080        if(batchTransferCache == null)
081            batchTransferCache = new BatchTransferCache(userVisit, batchControl);
082        
083        return batchTransferCache;
084    }
085    
086    public BatchAliasTransferCache getBatchAliasTransferCache() {
087        if(batchAliasTransferCache == null)
088            batchAliasTransferCache = new BatchAliasTransferCache(userVisit, batchControl);
089
090        return batchAliasTransferCache;
091    }
092
093    public BatchEntityTransferCache getBatchEntityTransferCache() {
094        if(batchEntityTransferCache == null)
095            batchEntityTransferCache = new BatchEntityTransferCache(userVisit, batchControl);
096
097        return batchEntityTransferCache;
098    }
099
100}