001/*
002 * The contents of this file are subject to the terms of the Common Development and
003 * Distribution License (the License). You may not use this file except in compliance with the License.
004 *
005 * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
006 * specific language governing permission and limitations under the License.
007 *
008 * When distributing Covered Software, include this CDDL Header Notice in each file and include
009 * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
010 * Header, with the fields enclosed by brackets [] replaced by your own identifying
011 * information: "Portions copyright [year] [name of copyright owner]".
012 *
013 * Copyright 2015 ForgeRock AS.
014 */
015
016package org.forgerock.util.query;
017
018import java.util.List;
019
020/**
021 * A base implementation of {@link org.forgerock.util.query.QueryFilterVisitor} where
022 * all methods throw an {@link java.lang.UnsupportedOperationException} by default -
023 * override just the methods you need.
024 * @see org.forgerock.util.query.QueryFilterVisitor
025 */
026public abstract class BaseQueryFilterVisitor<R, P, F> implements QueryFilterVisitor<R, P, F> {
027    @Override
028    public R visitAndFilter(P p, List<QueryFilter<F>> subFilters) {
029        throw new UnsupportedOperationException();
030    }
031
032    @Override
033    public R visitBooleanLiteralFilter(P p, boolean value) {
034        throw new UnsupportedOperationException();
035    }
036
037    @Override
038    public R visitContainsFilter(P p, F field, Object valueAssertion) {
039        throw new UnsupportedOperationException();
040    }
041
042    @Override
043    public R visitEqualsFilter(P p, F field, Object valueAssertion) {
044        throw new UnsupportedOperationException();
045    }
046
047    @Override
048    public R visitExtendedMatchFilter(P p, F field, String operator, Object valueAssertion) {
049        throw new UnsupportedOperationException();
050    }
051
052    @Override
053    public R visitGreaterThanFilter(P p, F field, Object valueAssertion) {
054        throw new UnsupportedOperationException();
055    }
056
057    @Override
058    public R visitGreaterThanOrEqualToFilter(P p, F field, Object valueAssertion) {
059        throw new UnsupportedOperationException();
060    }
061
062    @Override
063    public R visitLessThanFilter(P p, F field, Object valueAssertion) {
064        throw new UnsupportedOperationException();
065    }
066
067    @Override
068    public R visitLessThanOrEqualToFilter(P p, F field, Object valueAssertion) {
069        throw new UnsupportedOperationException();
070    }
071
072    @Override
073    public R visitNotFilter(P p, QueryFilter<F> subFilter) {
074        throw new UnsupportedOperationException();
075    }
076
077    @Override
078    public R visitOrFilter(P p, List<QueryFilter<F>> subFilters) {
079        throw new UnsupportedOperationException();
080    }
081
082    @Override
083    public R visitPresentFilter(P p, F field) {
084        throw new UnsupportedOperationException();
085    }
086
087    @Override
088    public R visitStartsWithFilter(P p, F field, Object valueAssertion) {
089        throw new UnsupportedOperationException();
090    }
091}