This project has retired. For details please refer to its
Attic page.
EvaluatorBase xref
1/*2 * Licensed to the Apache Software Foundation (ASF) under one3 * or more contributor license agreements. See the NOTICE file4 * distributed with this work for additional information5 * regarding copyright ownership. The ASF licenses this file6 * to you under the Apache License, Version 2.0 (the7 * "License"); you may not use this file except in compliance8 * with the License. You may obtain a copy of the License at9 *10 * http://www.apache.org/licenses/LICENSE-2.011 *12 * Unless required by applicable law or agreed to in writing,13 * software distributed under the License is distributed on an14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY15 * KIND, either express or implied. See the License for the16 * specific language governing permissions and limitations17 * under the License.18 */1920package org.apache.chemistry.opencmis.jcr.query;
2122import org.apache.chemistry.opencmis.commons.exceptions.CmisNotSupportedException;
2324import java.util.GregorianCalendar;
25import java.util.List;
2627/**28 * This abstract base class implements all methods of the {@link Evaluator} interface29 * by throwing a {@link CmisNotSupportedException}.30 */31publicabstractclass EvaluatorBase<T> implements Evaluator<T> {
32public Evaluator<T> op() {
33thrownew CmisNotSupportedException();
34 }
3536public T not(T op) {
37thrownew CmisNotSupportedException("Not supported in query: not");
38 }
3940public T and(T op1, T op2) {
41thrownew CmisNotSupportedException("Not supported in query: and");
42 }
4344public T or(T op1, T op2) {
45thrownew CmisNotSupportedException("Not supported in query: or");
46 }
4748public T eq(T op1, T op2) {
49thrownew CmisNotSupportedException("Not supported in query: =");
50 }
5152public T neq(T op1, T op2) {
53thrownew CmisNotSupportedException("Not supported in query: !=");
54 }
5556public T gt(T op1, T op2) {
57thrownew CmisNotSupportedException("Not supported in query: >");
58 }
5960public T gteq(T op1, T op2) {
61thrownew CmisNotSupportedException("Not supported in query: >=");
62 }
6364public T lt(T op1, T op2) {
65thrownew CmisNotSupportedException("Not supported in query: <");
66 }
6768public T lteq(T op1, T op2) {
69thrownew CmisNotSupportedException("Not supported in query: <=");
70 }
7172public T in(T op1, T op2) {
73thrownew CmisNotSupportedException("Not supported in query: in");
74 }
7576public T notIn(T op1, T op2) {
77thrownew CmisNotSupportedException("Not supported in query: not in");
78 }
7980public T inAny(T op1, T op2) {
81thrownew CmisNotSupportedException("Not supported in query: in");
82 }
8384public T notInAny(T op1, T op2) {
85thrownew CmisNotSupportedException("Not supported in query: not in");
86 }
8788public T eqAny(T op1, T op2) {
89thrownew CmisNotSupportedException("Not supported in query: = ANY");
90 }
9192public T isNull(T op) {
93thrownew CmisNotSupportedException("Not supported in query: is null");
94 }
9596public T notIsNull(T op) {
97thrownew CmisNotSupportedException("Not supported in query: is not null");
98 }
99100public T like(T op1, T op2) {
101thrownew CmisNotSupportedException("Not supported in query: like");
102 }
103104public T notLike(T op1, T op2) {
105thrownew CmisNotSupportedException("Not supported in query: not like");
106 }
107108public T contains(T op1, T op2) {
109thrownew CmisNotSupportedException("Not supported in query: contains");
110 }
111112public T inFolder(T op1, T op2) {
113thrownew CmisNotSupportedException("Not supported in query: in_folder");
114 }
115116public T inTree(T op1, T op2) {
117thrownew CmisNotSupportedException("Not supported in query: in_tree");
118 }
119120public T list(List<T> ops) {
121thrownew CmisNotSupportedException("Not supported in query: list");
122 }
123124public T value(boolean value) {
125thrownew CmisNotSupportedException("Not supported in query: boolean value " + value);
126 }
127128public T value(double value) {
129thrownew CmisNotSupportedException("Not supported in query: double value " + value);
130 }
131132public T value(long value) {
133thrownew CmisNotSupportedException("Not supported in query: long value " + value);
134 }
135136public T value(String value) {
137thrownew CmisNotSupportedException("Not supported in query: string value " + value);
138 }
139140public T value(GregorianCalendar value) {
141thrownew CmisNotSupportedException("Not supported in query: date value " + value);
142 }
143144public T col(String name) {
145thrownew CmisNotSupportedException("Not supported in query: column name " + name);
146 }
147148 }