01: /*******************************************************************************
02: * Licensed to the Apache Software Foundation (ASF) under one
03: * or more contributor license agreements. See the NOTICE file
04: * distributed with this work for additional information
05: * regarding copyright ownership. The ASF licenses this file
06: * to you under the Apache License, Version 2.0 (the
07: * "License"); you may not use this file except in compliance
08: * with the License. You may obtain a copy of the License at
09: *
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: *******************************************************************************/package org.ofbiz.entity.condition;
19:
20: import java.util.List;
21:
22: /**
23: * Represents the conditions to be used to constrain a query
24: * <br/>An EntityCondition can represent various type of constraints, including:
25: * <ul>
26: * <li>EntityConditionList: a list of EntityConditions, combined with the operator specified
27: * <li>EntityExpr: for simple expressions or expressions that combine EntityConditions
28: * <li>EntityFieldMap: a map of fields where the field (key) equals the value, combined with the operator specified
29: * </ul>
30: * These can be used in various combinations using the EntityConditionList and EntityExpr objects.
31: *
32: */
33: public interface EntityConditionVisitor {
34: void visit(Object obj);
35:
36: void accept(Object obj);
37:
38: void acceptObject(Object obj);
39:
40: void acceptEntityCondition(EntityCondition condition);
41:
42: void acceptEntityJoinOperator(EntityJoinOperator op, List conditions);
43:
44: void acceptEntityOperator(EntityOperator op, Object lhs, Object rhs);
45:
46: void acceptEntityComparisonOperator(EntityComparisonOperator op,
47: Object lhs, Object rhs);
48:
49: void acceptEntityConditionValue(EntityConditionValue value);
50:
51: void acceptEntityFieldValue(EntityFieldValue value);
52:
53: void acceptEntityExpr(EntityExpr expr);
54:
55: void acceptEntityConditionList(EntityConditionList list);
56:
57: void acceptEntityFieldMap(EntityFieldMap fieldMap);
58:
59: void acceptEntityConditionFunction(EntityConditionFunction func,
60: EntityCondition nested);
61:
62: void acceptEntityFunction(EntityFunction func);
63:
64: void acceptEntityWhereString(EntityWhereString condition);
65:
66: void acceptEntityDateFilterCondition(
67: EntityDateFilterCondition condition);
68: }
|