This project has retired. For details please refer to its Attic page.
EvaluatorBase xref

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  
20  package org.apache.chemistry.opencmis.jcr.query;
21  
22  import org.apache.chemistry.opencmis.commons.exceptions.CmisNotSupportedException;
23  
24  import java.util.GregorianCalendar;
25  import java.util.List;
26  
27  /**
28   * This abstract base class implements all methods of the {@link Evaluator} interface
29   * by throwing a {@link CmisNotSupportedException}.
30   */
31  public abstract class EvaluatorBase<T> implements Evaluator<T> {
32      public Evaluator<T> op() {
33          throw new CmisNotSupportedException();
34      }
35  
36      public T not(T op) {
37          throw new CmisNotSupportedException("Not supported in query: not");
38      }
39  
40      public T and(T op1, T op2) {
41          throw new CmisNotSupportedException("Not supported in query: and");
42      }
43  
44      public T or(T op1, T op2) {
45          throw new CmisNotSupportedException("Not supported in query: or");
46      }
47  
48      public T eq(T op1, T op2) {
49          throw new CmisNotSupportedException("Not supported in query: =");
50      }
51  
52      public T neq(T op1, T op2) {
53          throw new CmisNotSupportedException("Not supported in query: !=");
54      }
55  
56      public T gt(T op1, T op2) {
57          throw new CmisNotSupportedException("Not supported in query: >");
58      }
59  
60      public T gteq(T op1, T op2) {
61          throw new CmisNotSupportedException("Not supported in query: >=");
62      }
63  
64      public T lt(T op1, T op2) {
65          throw new CmisNotSupportedException("Not supported in query: <");
66      }
67  
68      public T lteq(T op1, T op2) {
69          throw new CmisNotSupportedException("Not supported in query: <=");
70      }
71  
72      public T in(T op1, T op2) {
73          throw new CmisNotSupportedException("Not supported in query: in");
74      }
75  
76      public T notIn(T op1, T op2) {
77          throw new CmisNotSupportedException("Not supported in query: not in");
78      }
79  
80      public T inAny(T op1, T op2) {
81          throw new CmisNotSupportedException("Not supported in query: in");
82      }
83  
84      public T notInAny(T op1, T op2) {
85          throw new CmisNotSupportedException("Not supported in query: not in");
86      }
87  
88      public T eqAny(T op1, T op2) {
89          throw new CmisNotSupportedException("Not supported in query: = ANY");
90      }
91  
92      public T isNull(T op) {
93          throw new CmisNotSupportedException("Not supported in query: is null");
94      }
95  
96      public T notIsNull(T op) {
97          throw new CmisNotSupportedException("Not supported in query: is not null");
98      }
99  
100     public T like(T op1, T op2) {
101         throw new CmisNotSupportedException("Not supported in query: like");
102     }
103 
104     public T notLike(T op1, T op2) {
105         throw new CmisNotSupportedException("Not supported in query: not like");
106     }
107 
108     public T contains(T op1, T op2) {
109         throw new CmisNotSupportedException("Not supported in query: contains");
110     }
111 
112     public T inFolder(T op1, T op2) {
113         throw new CmisNotSupportedException("Not supported in query: in_folder");
114     }
115 
116     public T inTree(T op1, T op2) {
117         throw new CmisNotSupportedException("Not supported in query: in_tree");
118     }
119 
120     public T list(List<T> ops) {
121         throw new CmisNotSupportedException("Not supported in query: list");
122     }
123 
124     public T value(boolean value) {
125         throw new CmisNotSupportedException("Not supported in query: boolean value " + value);
126     }
127 
128     public T value(double value) {
129         throw new CmisNotSupportedException("Not supported in query: double value " + value);
130     }
131 
132     public T value(long value) {
133         throw new CmisNotSupportedException("Not supported in query: long value " + value);
134     }
135 
136     public T value(String value) {
137         throw new CmisNotSupportedException("Not supported in query: string value " + value);
138     }
139 
140     public T value(GregorianCalendar value) {
141         throw new CmisNotSupportedException("Not supported in query: date value " + value);
142     }
143 
144     public T col(String name) {
145         throw new CmisNotSupportedException("Not supported in query: column name " + name);
146     }
147 
148 }