001    package railo.runtime.search;
002    
003    import java.util.HashMap;
004    import java.util.Map;
005    // FUTURE diese klasse entfernen, dient nur daszu die suggestion durchzuschleusen
006    public class SearchDataImpl implements SearchData  {
007    
008            private Map suggestion=null;
009            private int suggestionMax;
010            private String suggestionQuery;
011            private int recordsSearched;
012    
013            public SearchDataImpl(int suggestionMax) {
014                    this(new HashMap(), suggestionMax);
015            }
016            public SearchDataImpl(Map suggestion, int suggestionMax) {
017                    this.suggestion=suggestion;
018                    this.suggestionMax=suggestionMax;
019            }
020    
021            public Map getSuggestion() {
022                    return suggestion;
023            }
024            public int getSuggestionMax() {
025                    return suggestionMax;
026            }
027            public void setSuggestionQuery(String suggestionQuery) {
028                    this.suggestionQuery=suggestionQuery;
029            }
030            /**
031             * @return the suggestionQuery
032             */
033            public String getSuggestionQuery() {
034                    return suggestionQuery;
035            }
036            
037            /**
038             * @see railo.runtime.search.SearchData#addRecordsSearched(int)
039             */
040            public int addRecordsSearched(int count) {
041                    recordsSearched+=count;
042                    return recordsSearched;
043            }
044            
045            /**
046             * @see railo.runtime.search.SearchData#getRecordsSearched()
047             */
048            public int getRecordsSearched() {
049                    return recordsSearched;
050            }
051            
052    }