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.associate.server.transfer; 018 019import com.echothree.model.control.associate.server.control.AssociateControl; 020import com.echothree.model.data.user.server.entity.UserVisit; 021import com.echothree.util.server.transfer.BaseTransferCaches; 022 023public class AssociateTransferCaches 024 extends BaseTransferCaches { 025 026 protected AssociateControl associateControl; 027 028 protected AssociateProgramTransferCache associateProgramTransferCache; 029 protected AssociateProgramDescriptionTransferCache associateProgramDescriptionTransferCache; 030 protected AssociateTransferCache associateTransferCache; 031 protected AssociatePartyContactMechanismTransferCache associatePartyContactMechanismTransferCache; 032 protected AssociateReferralTransferCache associateReferralTransferCache; 033 034 /** Creates a new instance of AssociateTransferCaches */ 035 public AssociateTransferCaches(UserVisit userVisit, AssociateControl associateControl) { 036 super(userVisit); 037 038 this.associateControl = associateControl; 039 } 040 041 public AssociateProgramTransferCache getAssociateProgramTransferCache() { 042 if(associateProgramTransferCache == null) 043 associateProgramTransferCache = new AssociateProgramTransferCache(userVisit, associateControl); 044 045 return associateProgramTransferCache; 046 } 047 048 public AssociateProgramDescriptionTransferCache getAssociateProgramDescriptionTransferCache() { 049 if(associateProgramDescriptionTransferCache == null) 050 associateProgramDescriptionTransferCache = new AssociateProgramDescriptionTransferCache(userVisit, associateControl); 051 052 return associateProgramDescriptionTransferCache; 053 } 054 055 public AssociateTransferCache getAssociateTransferCache() { 056 if(associateTransferCache == null) 057 associateTransferCache = new AssociateTransferCache(userVisit, associateControl); 058 059 return associateTransferCache; 060 } 061 062 public AssociatePartyContactMechanismTransferCache getAssociatePartyContactMechanismTransferCache() { 063 if(associatePartyContactMechanismTransferCache == null) 064 associatePartyContactMechanismTransferCache = new AssociatePartyContactMechanismTransferCache(userVisit, associateControl); 065 066 return associatePartyContactMechanismTransferCache; 067 } 068 069 public AssociateReferralTransferCache getAssociateReferralTransferCache() { 070 if(associateReferralTransferCache == null) 071 associateReferralTransferCache = new AssociateReferralTransferCache(userVisit, associateControl); 072 073 return associateReferralTransferCache; 074 } 075 076}