001// --------------------------------------------------------------------------------
002// Copyright 2002-2026 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.selector.server.evaluator;
018
019import com.echothree.model.data.selector.server.entity.Selector;
020import com.echothree.model.data.selector.server.entity.SelectorTime;
021
022public class CachedSelectorWithTime
023        extends CachedSelector {
024    
025    SelectorTime selectorTime;
026    
027    /** Create a new instance of CachedSelectorWithTime */
028    public CachedSelectorWithTime(Selector selector) {
029        super(selector);
030        
031        selectorTime = selectorControl.getSelectorTimeForUpdate(selector);
032        if(selectorTime == null) {
033            selectorControl.createSelectorTime(selector);
034            selectorTime = selectorControl.getSelectorTimeForUpdate(selector);
035        }
036    }
037    
038    public Long getLastEvaluationTime() {
039        return selectorTime.getLastEvaluationTime();
040    }
041    
042    public void setLastEvaluationTime(Long lastEvaluationTime) {
043        selectorTime.setLastEvaluationTime(lastEvaluationTime);
044    }
045    
046    public Long getMaxEntityCreatedTime() {
047        return selectorTime.getMaxEntityCreatedTime();
048    }
049    
050    public void setMaxEntityCreatedTime(Long maxEntityCreatedTime) {
051        selectorTime.setMaxEntityCreatedTime(maxEntityCreatedTime);
052    }
053    
054    public Long getMaxEntityModifiedTime() {
055        return selectorTime.getMaxEntityModifiedTime();
056    }
057    
058    public void setMaxEntityModifiedTime(Long maxEntityModifiedTime) {
059        selectorTime.setMaxEntityModifiedTime(maxEntityModifiedTime);
060    }
061    
062    public Long getMaxEntityDeletedTime() {
063        return selectorTime.getMaxEntityDeletedTime();
064    }
065    
066    public void setMaxEntityDeletedTime(Long maxEntityDeletedTime) {
067        selectorTime.setMaxEntityDeletedTime(maxEntityDeletedTime);
068    }
069    
070}