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.vendor.server.transfer; 018 019import com.echothree.model.control.vendor.server.control.VendorControl; 020import com.echothree.model.data.user.server.entity.UserVisit; 021import com.echothree.util.server.transfer.BaseTransferCaches; 022 023public class VendorTransferCaches 024 extends BaseTransferCaches { 025 026 protected VendorControl vendorControl; 027 028 protected VendorTypeTransferCache vendorTypeTransferCache; 029 protected VendorTypeDescriptionTransferCache vendorTypeDescriptionTransferCache; 030 protected VendorTransferCache vendorTransferCache; 031 protected VendorItemTransferCache vendorItemTransferCache; 032 protected VendorItemCostTransferCache vendorItemCostTransferCache; 033 protected ItemPurchasingCategoryDescriptionTransferCache itemPurchasingCategoryDescriptionTransferCache; 034 protected ItemPurchasingCategoryTransferCache itemPurchasingCategoryTransferCache; 035 036 /** Creates a new instance of VendorTransferCaches */ 037 public VendorTransferCaches(UserVisit userVisit, VendorControl vendorControl) { 038 super(userVisit); 039 040 this.vendorControl = vendorControl; 041 } 042 043 public VendorTypeTransferCache getVendorTypeTransferCache() { 044 if(vendorTypeTransferCache == null) 045 vendorTypeTransferCache = new VendorTypeTransferCache(userVisit, vendorControl); 046 047 return vendorTypeTransferCache; 048 } 049 050 public VendorTypeDescriptionTransferCache getVendorTypeDescriptionTransferCache() { 051 if(vendorTypeDescriptionTransferCache == null) 052 vendorTypeDescriptionTransferCache = new VendorTypeDescriptionTransferCache(userVisit, vendorControl); 053 054 return vendorTypeDescriptionTransferCache; 055 } 056 057 public VendorTransferCache getVendorTransferCache() { 058 if(vendorTransferCache == null) 059 vendorTransferCache = new VendorTransferCache(userVisit, vendorControl); 060 061 return vendorTransferCache; 062 } 063 064 public VendorItemTransferCache getVendorItemTransferCache() { 065 if(vendorItemTransferCache == null) 066 vendorItemTransferCache = new VendorItemTransferCache(userVisit, vendorControl); 067 068 return vendorItemTransferCache; 069 } 070 071 public VendorItemCostTransferCache getVendorItemCostTransferCache() { 072 if(vendorItemCostTransferCache == null) 073 vendorItemCostTransferCache = new VendorItemCostTransferCache(userVisit, vendorControl); 074 075 return vendorItemCostTransferCache; 076 } 077 078 public ItemPurchasingCategoryDescriptionTransferCache getItemPurchasingCategoryDescriptionTransferCache() { 079 if(itemPurchasingCategoryDescriptionTransferCache == null) 080 itemPurchasingCategoryDescriptionTransferCache = new ItemPurchasingCategoryDescriptionTransferCache(userVisit, vendorControl); 081 082 return itemPurchasingCategoryDescriptionTransferCache; 083 } 084 085 public ItemPurchasingCategoryTransferCache getItemPurchasingCategoryTransferCache() { 086 if(itemPurchasingCategoryTransferCache == null) 087 itemPurchasingCategoryTransferCache = new ItemPurchasingCategoryTransferCache(userVisit, vendorControl); 088 089 return itemPurchasingCategoryTransferCache; 090 } 091 092}