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.warehouse.server.transfer;
018
019import com.echothree.model.control.warehouse.server.control.WarehouseControl;
020import com.echothree.model.data.user.server.entity.UserVisit;
021import com.echothree.util.server.transfer.BaseTransferCaches;
022
023public class WarehouseTransferCaches
024        extends BaseTransferCaches {
025    
026    protected WarehouseControl warehouseControl;
027    
028    LocationDescriptionTransferCache locationDescriptionTransferCache;
029    LocationNameElementDescriptionTransferCache locationNameElementDescriptionTransferCache;
030    LocationNameElementTransferCache locationNameElementTransferCache;
031    LocationTransferCache locationTransferCache;
032    LocationTypeDescriptionTransferCache locationTypeDescriptionTransferCache;
033    LocationTypeTransferCache locationTypeTransferCache;
034    LocationUseTypeTransferCache locationUseTypeTransferCache;
035    WarehouseTransferCache warehouseTransferCache;
036    LocationVolumeTransferCache locationVolumeTransferCache;
037    LocationCapacityTransferCache locationCapacityTransferCache;
038    WarehouseTypeTransferCache warehouseTypeTransferCache;
039    WarehouseTypeDescriptionTransferCache warehouseTypeDescriptionTransferCache;
040    
041    /** Creates a new instance of WarehouseTransferCaches */
042    public WarehouseTransferCaches(UserVisit userVisit, WarehouseControl warehouseControl) {
043        super(userVisit);
044        
045        this.warehouseControl = warehouseControl;
046    }
047    
048    public LocationDescriptionTransferCache getLocationDescriptionTransferCache() {
049        if(locationDescriptionTransferCache == null)
050            locationDescriptionTransferCache = new LocationDescriptionTransferCache(userVisit, warehouseControl);
051        
052        return locationDescriptionTransferCache;
053    }
054    
055    public LocationNameElementDescriptionTransferCache getLocationNameElementDescriptionTransferCache() {
056        if(locationNameElementDescriptionTransferCache == null)
057            locationNameElementDescriptionTransferCache = new LocationNameElementDescriptionTransferCache(userVisit, warehouseControl);
058        
059        return locationNameElementDescriptionTransferCache;
060    }
061    
062    public LocationNameElementTransferCache getLocationNameElementTransferCache() {
063        if(locationNameElementTransferCache == null)
064            locationNameElementTransferCache = new LocationNameElementTransferCache(userVisit, warehouseControl);
065        
066        return locationNameElementTransferCache;
067    }
068    
069    public LocationTransferCache getLocationTransferCache() {
070        if(locationTransferCache == null)
071            locationTransferCache = new LocationTransferCache(userVisit, warehouseControl);
072        
073        return locationTransferCache;
074    }
075    
076    public LocationTypeDescriptionTransferCache getLocationTypeDescriptionTransferCache() {
077        if(locationTypeDescriptionTransferCache == null)
078            locationTypeDescriptionTransferCache = new LocationTypeDescriptionTransferCache(userVisit, warehouseControl);
079        
080        return locationTypeDescriptionTransferCache;
081    }
082    
083    public LocationTypeTransferCache getLocationTypeTransferCache() {
084        if(locationTypeTransferCache == null)
085            locationTypeTransferCache = new LocationTypeTransferCache(userVisit, warehouseControl);
086        
087        return locationTypeTransferCache;
088    }
089    
090    public LocationUseTypeTransferCache getLocationUseTypeTransferCache() {
091        if(locationUseTypeTransferCache == null)
092            locationUseTypeTransferCache = new LocationUseTypeTransferCache(userVisit, warehouseControl);
093        
094        return locationUseTypeTransferCache;
095    }
096    
097    public WarehouseTransferCache getWarehouseTransferCache() {
098        if(warehouseTransferCache == null)
099            warehouseTransferCache = new WarehouseTransferCache(userVisit, warehouseControl);
100        
101        return warehouseTransferCache;
102    }
103    
104    public LocationVolumeTransferCache getLocationVolumeTransferCache() {
105        if(locationVolumeTransferCache == null)
106            locationVolumeTransferCache = new LocationVolumeTransferCache(userVisit, warehouseControl);
107        
108        return locationVolumeTransferCache;
109    }
110    
111    public LocationCapacityTransferCache getLocationCapacityTransferCache() {
112        if(locationCapacityTransferCache == null)
113            locationCapacityTransferCache = new LocationCapacityTransferCache(userVisit, warehouseControl);
114        
115        return locationCapacityTransferCache;
116    }
117
118    public WarehouseTypeTransferCache getWarehouseTypeTransferCache() {
119        if(warehouseTypeTransferCache == null)
120            warehouseTypeTransferCache = new WarehouseTypeTransferCache(userVisit, warehouseControl);
121
122        return warehouseTypeTransferCache;
123    }
124
125    public WarehouseTypeDescriptionTransferCache getWarehouseTypeDescriptionTransferCache() {
126        if(warehouseTypeDescriptionTransferCache == null)
127            warehouseTypeDescriptionTransferCache = new WarehouseTypeDescriptionTransferCache(userVisit, warehouseControl);
128
129        return warehouseTypeDescriptionTransferCache;
130    }
131
132}