com.liferay.portal.kernel.search.BaseQueryImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of com.liferay.portal.kernel Show documentation
Show all versions of com.liferay.portal.kernel Show documentation
Contains interfaces for the portal services. Interfaces are only loaded by the global class loader and are shared by all plugins.
/**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
package com.liferay.portal.kernel.search;
import com.liferay.portal.kernel.search.filter.BooleanFilter;
import com.liferay.portal.kernel.search.filter.Filter;
import com.liferay.portal.kernel.search.query.QueryVisitor;
/**
* @author Michael C. Han
*/
public abstract class BaseQueryImpl implements Query {
@Override
public T accept(QueryVisitor queryVisitor) {
return null;
}
@Override
public float getBoost() {
return _boost;
}
@Override
public Filter getPostFilter() {
return _postFilter;
}
@Override
public BooleanFilter getPreBooleanFilter() {
return _preFilter;
}
@Override
public QueryConfig getQueryConfig() {
if (_queryConfig == null) {
_queryConfig = new QueryConfig();
}
return _queryConfig;
}
/**
* @deprecated As of 7.0.0
*/
@Deprecated
@Override
public Object getWrappedQuery() {
return this;
}
@Override
public boolean hasChildren() {
return false;
}
@Override
public boolean isDefaultBoost() {
if (_boost == BOOST_DEFAULT) {
return true;
}
return false;
}
@Override
public void setBoost(float boost) {
_boost = boost;
}
@Override
public void setPostFilter(Filter postFilter) {
_postFilter = postFilter;
}
@Override
public void setPreBooleanFilter(BooleanFilter preFilter) {
_preFilter = preFilter;
}
@Override
public void setQueryConfig(QueryConfig queryConfig) {
_queryConfig = queryConfig;
}
private float _boost = BOOST_DEFAULT;
private Filter _postFilter;
private BooleanFilter _preFilter;
private QueryConfig _queryConfig;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy