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.scale.server.transfer; 018 019import com.echothree.model.control.scale.server.control.ScaleControl; 020import com.echothree.model.data.user.server.entity.UserVisit; 021import com.echothree.util.server.transfer.BaseTransferCaches; 022 023public class ScaleTransferCaches 024 extends BaseTransferCaches { 025 026 protected ScaleControl scaleControl; 027 028 protected ScaleTypeTransferCache scaleTypeTransferCache; 029 protected ScaleTypeDescriptionTransferCache scaleTypeDescriptionTransferCache; 030 protected ScaleTransferCache scaleTransferCache; 031 protected ScaleDescriptionTransferCache scaleDescriptionTransferCache; 032 protected ScaleUseTypeTransferCache scaleUseTypeTransferCache; 033 protected ScaleUseTypeDescriptionTransferCache scaleUseTypeDescriptionTransferCache; 034 protected PartyScaleUseTransferCache partyScaleUseTransferCache; 035 036 /** Creates a new instance of ScaleTransferCaches */ 037 public ScaleTransferCaches(UserVisit userVisit, ScaleControl scaleControl) { 038 super(userVisit); 039 040 this.scaleControl = scaleControl; 041 } 042 043 public ScaleTypeTransferCache getScaleTypeTransferCache() { 044 if(scaleTypeTransferCache == null) 045 scaleTypeTransferCache = new ScaleTypeTransferCache(userVisit, scaleControl); 046 047 return scaleTypeTransferCache; 048 } 049 050 public ScaleTypeDescriptionTransferCache getScaleTypeDescriptionTransferCache() { 051 if(scaleTypeDescriptionTransferCache == null) 052 scaleTypeDescriptionTransferCache = new ScaleTypeDescriptionTransferCache(userVisit, scaleControl); 053 054 return scaleTypeDescriptionTransferCache; 055 } 056 057 public ScaleTransferCache getScaleTransferCache() { 058 if(scaleTransferCache == null) 059 scaleTransferCache = new ScaleTransferCache(userVisit, scaleControl); 060 061 return scaleTransferCache; 062 } 063 064 public ScaleDescriptionTransferCache getScaleDescriptionTransferCache() { 065 if(scaleDescriptionTransferCache == null) 066 scaleDescriptionTransferCache = new ScaleDescriptionTransferCache(userVisit, scaleControl); 067 068 return scaleDescriptionTransferCache; 069 } 070 071 public ScaleUseTypeTransferCache getScaleUseTypeTransferCache() { 072 if(scaleUseTypeTransferCache == null) 073 scaleUseTypeTransferCache = new ScaleUseTypeTransferCache(userVisit, scaleControl); 074 075 return scaleUseTypeTransferCache; 076 } 077 078 public ScaleUseTypeDescriptionTransferCache getScaleUseTypeDescriptionTransferCache() { 079 if(scaleUseTypeDescriptionTransferCache == null) 080 scaleUseTypeDescriptionTransferCache = new ScaleUseTypeDescriptionTransferCache(userVisit, scaleControl); 081 082 return scaleUseTypeDescriptionTransferCache; 083 } 084 085 public PartyScaleUseTransferCache getPartyScaleUseTransferCache() { 086 if(partyScaleUseTransferCache == null) 087 partyScaleUseTransferCache = new PartyScaleUseTransferCache(userVisit, scaleControl); 088 089 return partyScaleUseTransferCache; 090 } 091 092}