package com.arms.egovframework.javaservice.esframework.esquery.filter;

import com.arms.egovframework.javaservice.esframework.esquery.bool.EsBoolQuery;
import org.opensearch.index.query.AbstractQueryBuilder;
import org.opensearch.index.query.BoolQueryBuilder;

public abstract class Filter<T extends AbstractQueryBuilder<T>> extends EsBoolQuery {

	public abstract  AbstractQueryBuilder<T> abstractQueryBuilder();

	@Override
	public void boolQueryBuilder(BoolQueryBuilder boolQueryBuilder){
		if(abstractQueryBuilder()!=null){
			boolQueryBuilder.filter(abstractQueryBuilder());
		}
	}


}
