1 package com.instantbank.component.job.model;
2
3 import java.io.Serializable;
4 import org.w3c.dom.Element;
5 import org.w3c.dom.Document;
6
7
8
12 public class JobWHEREelement
13 implements Serializable {
14
15
18 private int sequence;
19
22 private int clause;
23
26 private long fieldId;
27
28
31 private String ruleOperator;
32
33
36 private String value;
37
38
42 private String connector;
43
44
45
55 public JobWHEREelement(int sequence, int clause, long fieldId,
56 String ruleOperator, String value, String connector) {
57 this.sequence = sequence;
58 this.clause = clause;
59 this.fieldId = fieldId;
60 this.ruleOperator = ruleOperator;
61 this.value = value;
62 this.connector = connector;
63 }
64
65
66
71 public int getSequence() {
72 return sequence;
73 }
74
75
76
81 public int getClause() {
82 return clause;
83 }
84
85
86
91 public long getFieldId() {
92 return fieldId;
93 }
94
95
96
101 public String getRuleOperator() {
102 return ruleOperator;
103 }
104
105
106
111 public String getValue() {
112 return value;
113 }
114
115
116
121 public String getConnector() {
122 return connector;
123 }
124
125
126
131 public String toString() {
132 return "[sequence=" + sequence
133 + ", clause=" + clause
134 + ", fieldId=" + fieldId
135 + ", ruleOperator=" + ruleOperator
136 + ", value=" + value
137 + "]";
138 }
139
140
141
147 public Element toXml(Document doc) {
148 Element root = doc.createElement("JobWHEREelement");
149 root.setAttribute("Id", String.valueOf(sequence));
150
151 Element node = null;
152
153 node = doc.createElement("Clause");
154 node.appendChild(doc.createTextNode(String.valueOf(clause)));
155 root.appendChild(node);
156
157 node = doc.createElement("FieldId");
158 node.appendChild(doc.createTextNode(String.valueOf(fieldId)));
159 root.appendChild(node);
160
161 node = doc.createElement("RuleOperator");
162 node.appendChild(doc.createTextNode(ruleOperator));
163 root.appendChild(node);
164
165 node = doc.createElement("Value");
166 node.appendChild(doc.createTextNode(value));
167 root.appendChild(node);
168
169 node = doc.createElement("Connector");
170 node.appendChild(doc.createTextNode(connector));
171 root.appendChild(node);
172
173 return root;
174 }
175 }
176