001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.kernel.search.filter;
016    
017    import com.liferay.portal.kernel.util.StringBundler;
018    
019    /**
020     * @author Michael C. Han
021     */
022    public abstract class BaseFilter implements Filter {
023    
024            @Override
025            public String getExecutionOption() {
026                    return _executionOption;
027            }
028    
029            @Override
030            public Boolean isCached() {
031                    return true;
032            }
033    
034            @Override
035            public void setCached(Boolean cached) {
036                    _cached = cached;
037            }
038    
039            @Override
040            public void setExecutionOption(String executionOption) {
041                    _executionOption = executionOption;
042            }
043    
044            @Override
045            public String toString() {
046                    StringBundler sb = new StringBundler(5);
047    
048                    sb.append("(cached=");
049                    sb.append(_cached);
050                    sb.append(", executionOption=");
051                    sb.append(_executionOption);
052                    sb.append(")");
053    
054                    return sb.toString();
055            }
056    
057            private Boolean _cached;
058            private String _executionOption;
059    
060    }