001/**
002 *
003 * Copyright (c) 2014, the Railo Company Ltd. All rights reserved.
004 *
005 * This library is free software; you can redistribute it and/or
006 * modify it under the terms of the GNU Lesser General Public
007 * License as published by the Free Software Foundation; either 
008 * version 2.1 of the License, or (at your option) any later version.
009 * 
010 * This library is distributed in the hope that it will be useful,
011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
013 * Lesser General Public License for more details.
014 * 
015 * You should have received a copy of the GNU Lesser General Public 
016 * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
017 * 
018 **/
019package lucee.runtime.search;
020
021
022public final class IndexResultImpl implements IndexResult {
023        
024        private int countDeleted;
025        private int countInserted;
026        private int countUpdated;
027        
028        public static IndexResult EMPTY=new IndexResultImpl(0,0,0);
029
030        public IndexResultImpl(int countDeleted,int countInserted,int countUpdated) {
031                this.countDeleted=countDeleted;
032                this.countInserted=countInserted;
033                this.countUpdated=countUpdated;
034        }
035        public IndexResultImpl() {
036        }
037
038        @Override
039        public int getCountDeleted() {
040                return countDeleted;
041        }
042
043        @Override
044        public int getCountInserted() {
045                return countInserted;
046        }
047
048        @Override
049        public int getCountUpdated() {
050                return countUpdated;
051        }
052
053        /**
054         * @param countDeleted the countDeleted to set
055         */
056        public void setCountDeleted(int countDeleted) {
057                this.countDeleted = countDeleted;
058        }
059
060        /**
061         * @param countInserted the countInserted to set
062         */
063        public void setCountInserted(int countInserted) {
064                this.countInserted = countInserted;
065        }
066
067        /**
068         * @param countUpdated the countUpdated to set
069         */
070        public void setCountUpdated(int countUpdated) {
071                this.countUpdated = countUpdated;
072        }
073        /**
074         * @param countDeleted the countDeleted to set
075         */
076        public void incCountDeleted() {
077                this.countDeleted++;
078        }
079
080        /**
081         * @param countInserted the countInserted to set
082         */
083        public void incCountInserted() {
084                this.countInserted++;
085        }
086
087        /**
088         * @param countUpdated the countUpdated to set
089         */
090        public void incCountUpdated() {
091                this.countUpdated++;
092        }
093        
094}