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.communication.server.transfer;
018
019import com.echothree.model.control.communication.server.control.CommunicationControl;
020import com.echothree.model.data.user.server.entity.UserVisit;
021import com.echothree.util.server.transfer.BaseTransferCaches;
022
023public class CommunicationTransferCaches
024        extends BaseTransferCaches {
025    
026    protected CommunicationControl communicationControl;
027    
028    protected CommunicationEventRoleTypeTransferCache communicationEventRoleTypeTransferCache;
029    protected CommunicationEventTypeTransferCache communicationEventTypeTransferCache;
030    protected CommunicationEventPurposeTransferCache communicationEventPurposeTransferCache;
031    protected CommunicationEventPurposeDescriptionTransferCache communicationEventPurposeDescriptionTransferCache;
032    protected CommunicationEventTransferCache communicationEventTransferCache;
033    protected CommunicationEventRoleTransferCache communicationEventRoleTransferCache;
034    protected CommunicationSourceTypeTransferCache communicationSourceTypeTransferCache;
035    protected CommunicationSourceTransferCache communicationSourceTransferCache;
036    protected CommunicationSourceDescriptionTransferCache communicationSourceDescriptionTransferCache;
037    protected CommunicationEmailSourceTransferCache communicationEmailSourceTransferCache;
038    
039    /** Creates a new instance of CommunicationTransferCaches */
040    public CommunicationTransferCaches(UserVisit userVisit, CommunicationControl communicationControl) {
041        super(userVisit);
042        
043        this.communicationControl = communicationControl;
044    }
045    
046    public CommunicationEventRoleTypeTransferCache getCommunicationEventRoleTypeTransferCache() {
047        if(communicationEventRoleTypeTransferCache == null)
048            communicationEventRoleTypeTransferCache = new CommunicationEventRoleTypeTransferCache(userVisit, communicationControl);
049        
050        return communicationEventRoleTypeTransferCache;
051    }
052    
053    public CommunicationEventTypeTransferCache getCommunicationEventTypeTransferCache() {
054        if(communicationEventTypeTransferCache == null)
055            communicationEventTypeTransferCache = new CommunicationEventTypeTransferCache(userVisit, communicationControl);
056        
057        return communicationEventTypeTransferCache;
058    }
059    
060    public CommunicationEventPurposeTransferCache getCommunicationEventPurposeTransferCache() {
061        if(communicationEventPurposeTransferCache == null)
062            communicationEventPurposeTransferCache = new CommunicationEventPurposeTransferCache(userVisit, communicationControl);
063        
064        return communicationEventPurposeTransferCache;
065    }
066    
067    public CommunicationEventPurposeDescriptionTransferCache getCommunicationEventPurposeDescriptionTransferCache() {
068        if(communicationEventPurposeDescriptionTransferCache == null)
069            communicationEventPurposeDescriptionTransferCache = new CommunicationEventPurposeDescriptionTransferCache(userVisit, communicationControl);
070        
071        return communicationEventPurposeDescriptionTransferCache;
072    }
073    
074    public CommunicationEventTransferCache getCommunicationEventTransferCache() {
075        if(communicationEventTransferCache == null)
076            communicationEventTransferCache = new CommunicationEventTransferCache(userVisit, communicationControl);
077        
078        return communicationEventTransferCache;
079    }
080    
081    public CommunicationEventRoleTransferCache getCommunicationEventRoleTransferCache() {
082        if(communicationEventRoleTransferCache == null)
083            communicationEventRoleTransferCache = new CommunicationEventRoleTransferCache(userVisit, communicationControl);
084        
085        return communicationEventRoleTransferCache;
086    }
087    
088    public CommunicationSourceTypeTransferCache getCommunicationSourceTypeTransferCache() {
089        if(communicationSourceTypeTransferCache == null)
090            communicationSourceTypeTransferCache = new CommunicationSourceTypeTransferCache(userVisit, communicationControl);
091        
092        return communicationSourceTypeTransferCache;
093    }
094    
095    public CommunicationSourceTransferCache getCommunicationSourceTransferCache() {
096        if(communicationSourceTransferCache == null)
097            communicationSourceTransferCache = new CommunicationSourceTransferCache(userVisit, communicationControl);
098        
099        return communicationSourceTransferCache;
100    }
101    
102    public CommunicationSourceDescriptionTransferCache getCommunicationSourceDescriptionTransferCache() {
103        if(communicationSourceDescriptionTransferCache == null)
104            communicationSourceDescriptionTransferCache = new CommunicationSourceDescriptionTransferCache(userVisit, communicationControl);
105        
106        return communicationSourceDescriptionTransferCache;
107    }
108    
109    public CommunicationEmailSourceTransferCache getCommunicationEmailSourceTransferCache() {
110        if(communicationEmailSourceTransferCache == null)
111            communicationEmailSourceTransferCache = new CommunicationEmailSourceTransferCache(userVisit, communicationControl);
112        
113        return communicationEmailSourceTransferCache;
114    }
115    
116}