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.term.server.transfer; 018 019import com.echothree.model.control.term.server.control.TermControl; 020import com.echothree.model.data.user.server.entity.UserVisit; 021import com.echothree.util.server.transfer.BaseTransferCaches; 022 023public class TermTransferCaches 024 extends BaseTransferCaches { 025 026 protected TermControl termControl; 027 028 protected TermTypeTransferCache termTypeTransferCache; 029 protected TermTransferCache termTransferCache; 030 protected TermDescriptionTransferCache termDescriptionTransferCache; 031 protected PartyTermTransferCache partyTermTransferCache; 032 protected CustomerTypeCreditLimitTransferCache customerTypeCreditLimitTransferCache; 033 protected PartyCreditLimitTransferCache partyCreditLimitTransferCache; 034 035 /** Creates a new instance of TermTransferCaches */ 036 public TermTransferCaches(UserVisit userVisit, TermControl termControl) { 037 super(userVisit); 038 039 this.termControl = termControl; 040 } 041 042 public TermTypeTransferCache getTermTypeTransferCache() { 043 if(termTypeTransferCache == null) 044 termTypeTransferCache = new TermTypeTransferCache(userVisit, termControl); 045 046 return termTypeTransferCache; 047 } 048 049 public TermTransferCache getTermTransferCache() { 050 if(termTransferCache == null) 051 termTransferCache = new TermTransferCache(userVisit, termControl); 052 053 return termTransferCache; 054 } 055 056 public TermDescriptionTransferCache getTermDescriptionTransferCache() { 057 if(termDescriptionTransferCache == null) 058 termDescriptionTransferCache = new TermDescriptionTransferCache(userVisit, termControl); 059 060 return termDescriptionTransferCache; 061 } 062 063 public PartyTermTransferCache getPartyTermTransferCache() { 064 if(partyTermTransferCache == null) 065 partyTermTransferCache = new PartyTermTransferCache(userVisit, termControl); 066 067 return partyTermTransferCache; 068 } 069 070 public CustomerTypeCreditLimitTransferCache getCustomerTypeCreditLimitTransferCache() { 071 if(customerTypeCreditLimitTransferCache == null) 072 customerTypeCreditLimitTransferCache = new CustomerTypeCreditLimitTransferCache(userVisit, termControl); 073 074 return customerTypeCreditLimitTransferCache; 075 } 076 077 public PartyCreditLimitTransferCache getPartyCreditLimitTransferCache() { 078 if(partyCreditLimitTransferCache == null) 079 partyCreditLimitTransferCache = new PartyCreditLimitTransferCache(userVisit, termControl); 080 081 return partyCreditLimitTransferCache; 082 } 083 084}