01: /*
02: * Copyright (c) 2002-2003 by OpenSymphony
03: * All rights reserved.
04: */
05: package com.opensymphony.workflow.query;
06:
07: import java.io.Serializable;
08:
09: /**
10: * @deprecated use {@link WorkflowExpressionQuery} instead
11: * @author Hani
12: */
13: public class WorkflowQuery implements Serializable {
14: //~ Static fields/initializers /////////////////////////////////////////////
15:
16: private static final long serialVersionUID = 8130933224983412376L;
17: public final static int EQUALS = 1;
18: public final static int LT = 2;
19: public final static int GT = 3;
20: public final static int BETWEEN = 4;
21: public final static int NOT_EQUALS = 5;
22: public final static int AND = 6;
23: public final static int OR = 7;
24: public final static int XOR = 8;
25: public final static int OWNER = 1;
26: public final static int START_DATE = 2;
27: public final static int FINISH_DATE = 3;
28: public final static int ACTION = 4;
29: public final static int STEP = 5;
30: public final static int CALLER = 6;
31: public final static int STATUS = 7;
32: public final static int HISTORY = 1;
33: public final static int CURRENT = 2;
34:
35: //~ Instance fields ////////////////////////////////////////////////////////
36:
37: private Object value;
38: private WorkflowQuery left;
39: private WorkflowQuery right;
40: private int field;
41: private int operator;
42: private int type;
43:
44: //~ Constructors ///////////////////////////////////////////////////////////
45:
46: public WorkflowQuery() {
47: }
48:
49: public WorkflowQuery(WorkflowQuery left, int operator,
50: WorkflowQuery right) {
51: this .operator = operator;
52: this .left = left;
53: this .right = right;
54: }
55:
56: public WorkflowQuery(int field, int type, int operator, Object value) {
57: this .type = type;
58: this .operator = operator;
59: this .field = field;
60: this .value = value;
61: }
62:
63: //~ Methods ////////////////////////////////////////////////////////////////
64:
65: public int getField() {
66: return field;
67: }
68:
69: public WorkflowQuery getLeft() {
70: return left;
71: }
72:
73: public int getOperator() {
74: return operator;
75: }
76:
77: public WorkflowQuery getRight() {
78: return right;
79: }
80:
81: public int getType() {
82: int qtype = type;
83:
84: if (qtype == 0) {
85: if (getLeft() != null) {
86: qtype = getLeft().getType();
87: }
88: }
89:
90: return qtype;
91: }
92:
93: public Object getValue() {
94: return value;
95: }
96: }
|