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.comment.server.transfer; 018 019import com.echothree.model.control.comment.server.control.CommentControl; 020import com.echothree.model.data.user.server.entity.UserVisit; 021import com.echothree.util.server.transfer.BaseTransferCaches; 022 023public class CommentTransferCaches 024 extends BaseTransferCaches { 025 026 protected CommentControl commentControl; 027 028 protected CommentTypeTransferCache commentTypeTransferCache; 029 protected CommentTypeDescriptionTransferCache commentTypeDescriptionTransferCache; 030 protected CommentUsageTypeTransferCache commentUsageTypeTransferCache; 031 protected CommentUsageTypeDescriptionTransferCache commentUsageTypeDescriptionTransferCache; 032 protected CommentTransferCache commentTransferCache; 033 protected CommentUsageTransferCache commentUsageTransferCache; 034 035 /** Creates a new instance of CommentTransferCaches */ 036 public CommentTransferCaches(UserVisit userVisit, CommentControl commentControl) { 037 super(userVisit); 038 039 this.commentControl = commentControl; 040 } 041 042 public CommentTypeTransferCache getCommentTypeTransferCache() { 043 if(commentTypeTransferCache == null) 044 commentTypeTransferCache = new CommentTypeTransferCache(userVisit, commentControl); 045 046 return commentTypeTransferCache; 047 } 048 049 public CommentTypeDescriptionTransferCache getCommentTypeDescriptionTransferCache() { 050 if(commentTypeDescriptionTransferCache == null) 051 commentTypeDescriptionTransferCache = new CommentTypeDescriptionTransferCache(userVisit, commentControl); 052 053 return commentTypeDescriptionTransferCache; 054 } 055 056 public CommentUsageTypeTransferCache getCommentUsageTypeTransferCache() { 057 if(commentUsageTypeTransferCache == null) 058 commentUsageTypeTransferCache = new CommentUsageTypeTransferCache(userVisit, commentControl); 059 060 return commentUsageTypeTransferCache; 061 } 062 063 public CommentUsageTypeDescriptionTransferCache getCommentUsageTypeDescriptionTransferCache() { 064 if(commentUsageTypeDescriptionTransferCache == null) 065 commentUsageTypeDescriptionTransferCache = new CommentUsageTypeDescriptionTransferCache(userVisit, commentControl); 066 067 return commentUsageTypeDescriptionTransferCache; 068 } 069 070 public CommentTransferCache getCommentTransferCache() { 071 if(commentTransferCache == null) 072 commentTransferCache = new CommentTransferCache(userVisit, commentControl); 073 074 return commentTransferCache; 075 } 076 077 public CommentUsageTransferCache getCommentUsageTransferCache() { 078 if(commentUsageTransferCache == null) 079 commentUsageTransferCache = new CommentUsageTransferCache(userVisit, commentControl); 080 081 return commentUsageTransferCache; 082 } 083 084}