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.index.server.transfer; 018 019import com.echothree.model.control.index.server.control.IndexControl; 020import com.echothree.model.data.user.server.entity.UserVisit; 021import com.echothree.util.server.transfer.BaseTransferCaches; 022 023public class IndexTransferCaches 024 extends BaseTransferCaches { 025 026 protected IndexControl indexControl; 027 028 protected IndexTypeTransferCache indexTypeTransferCache; 029 protected IndexTypeDescriptionTransferCache indexTypeDescriptionTransferCache; 030 protected IndexFieldTransferCache indexFieldTransferCache; 031 protected IndexFieldDescriptionTransferCache indexFieldDescriptionTransferCache; 032 protected IndexTransferCache indexTransferCache; 033 protected IndexDescriptionTransferCache indexDescriptionTransferCache; 034 035 /** Creates a new instance of IndexTransferCaches */ 036 public IndexTransferCaches(UserVisit userVisit, IndexControl indexControl) { 037 super(userVisit); 038 039 this.indexControl = indexControl; 040 } 041 042 public IndexTypeTransferCache getIndexTypeTransferCache() { 043 if(indexTypeTransferCache == null) { 044 indexTypeTransferCache = new IndexTypeTransferCache(userVisit, indexControl); 045 } 046 047 return indexTypeTransferCache; 048 } 049 050 public IndexTypeDescriptionTransferCache getIndexTypeDescriptionTransferCache() { 051 if(indexTypeDescriptionTransferCache == null) { 052 indexTypeDescriptionTransferCache = new IndexTypeDescriptionTransferCache(userVisit, indexControl); 053 } 054 055 return indexTypeDescriptionTransferCache; 056 } 057 058 public IndexFieldTransferCache getIndexFieldTransferCache() { 059 if(indexFieldTransferCache == null) { 060 indexFieldTransferCache = new IndexFieldTransferCache(userVisit, indexControl); 061 } 062 063 return indexFieldTransferCache; 064 } 065 066 public IndexFieldDescriptionTransferCache getIndexFieldDescriptionTransferCache() { 067 if(indexFieldDescriptionTransferCache == null) { 068 indexFieldDescriptionTransferCache = new IndexFieldDescriptionTransferCache(userVisit, indexControl); 069 } 070 071 return indexFieldDescriptionTransferCache; 072 } 073 074 public IndexTransferCache getIndexTransferCache() { 075 if(indexTransferCache == null) { 076 indexTransferCache = new IndexTransferCache(userVisit, indexControl); 077 } 078 079 return indexTransferCache; 080 } 081 082 public IndexDescriptionTransferCache getIndexDescriptionTransferCache() { 083 if(indexDescriptionTransferCache == null) { 084 indexDescriptionTransferCache = new IndexDescriptionTransferCache(userVisit, indexControl); 085 } 086 087 return indexDescriptionTransferCache; 088 } 089 090}