| 3893 |
chandransh |
1 |
/**
|
|
|
2 |
* Autogenerated by Thrift Compiler (0.7.0)
|
|
|
3 |
*
|
|
|
4 |
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
|
|
5 |
*/
|
|
|
6 |
package in.shop2020.content;
|
|
|
7 |
|
|
|
8 |
import java.util.List;
|
|
|
9 |
import java.util.ArrayList;
|
|
|
10 |
import java.util.Map;
|
|
|
11 |
import java.util.HashMap;
|
|
|
12 |
import java.util.EnumMap;
|
|
|
13 |
import java.util.Set;
|
|
|
14 |
import java.util.HashSet;
|
|
|
15 |
import java.util.EnumSet;
|
|
|
16 |
import java.util.Collections;
|
|
|
17 |
import java.util.BitSet;
|
|
|
18 |
import java.nio.ByteBuffer;
|
|
|
19 |
import java.util.Arrays;
|
|
|
20 |
import org.slf4j.Logger;
|
|
|
21 |
import org.slf4j.LoggerFactory;
|
|
|
22 |
|
|
|
23 |
public class ContentService {
|
|
|
24 |
|
|
|
25 |
public interface Iface extends in.shop2020.generic.GenericService.Iface {
|
|
|
26 |
|
| 3896 |
chandransh |
27 |
/**
|
|
|
28 |
* Push the content of the given entity to production
|
|
|
29 |
*
|
|
|
30 |
* @param entityId
|
|
|
31 |
*/
|
|
|
32 |
public boolean pushContentToProduction(long entityId) throws ContentServiceException, org.apache.thrift.TException;
|
| 3893 |
chandransh |
33 |
|
|
|
34 |
}
|
|
|
35 |
|
|
|
36 |
public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
|
|
|
37 |
|
|
|
38 |
public void pushContentToProduction(long entityId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.pushContentToProduction_call> resultHandler) throws org.apache.thrift.TException;
|
|
|
39 |
|
|
|
40 |
}
|
|
|
41 |
|
|
|
42 |
public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
|
|
|
43 |
public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
|
|
|
44 |
public Factory() {}
|
|
|
45 |
public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
|
|
|
46 |
return new Client(prot);
|
|
|
47 |
}
|
|
|
48 |
public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
|
|
|
49 |
return new Client(iprot, oprot);
|
|
|
50 |
}
|
|
|
51 |
}
|
|
|
52 |
|
|
|
53 |
public Client(org.apache.thrift.protocol.TProtocol prot)
|
|
|
54 |
{
|
|
|
55 |
super(prot, prot);
|
|
|
56 |
}
|
|
|
57 |
|
|
|
58 |
public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
|
|
|
59 |
super(iprot, oprot);
|
|
|
60 |
}
|
|
|
61 |
|
| 3896 |
chandransh |
62 |
public boolean pushContentToProduction(long entityId) throws ContentServiceException, org.apache.thrift.TException
|
| 3893 |
chandransh |
63 |
{
|
|
|
64 |
send_pushContentToProduction(entityId);
|
| 3896 |
chandransh |
65 |
return recv_pushContentToProduction();
|
| 3893 |
chandransh |
66 |
}
|
|
|
67 |
|
|
|
68 |
public void send_pushContentToProduction(long entityId) throws org.apache.thrift.TException
|
|
|
69 |
{
|
|
|
70 |
pushContentToProduction_args args = new pushContentToProduction_args();
|
|
|
71 |
args.setEntityId(entityId);
|
|
|
72 |
sendBase("pushContentToProduction", args);
|
|
|
73 |
}
|
|
|
74 |
|
| 3896 |
chandransh |
75 |
public boolean recv_pushContentToProduction() throws ContentServiceException, org.apache.thrift.TException
|
| 3893 |
chandransh |
76 |
{
|
|
|
77 |
pushContentToProduction_result result = new pushContentToProduction_result();
|
|
|
78 |
receiveBase(result, "pushContentToProduction");
|
| 3896 |
chandransh |
79 |
if (result.isSetSuccess()) {
|
|
|
80 |
return result.success;
|
|
|
81 |
}
|
|
|
82 |
if (result.cse != null) {
|
|
|
83 |
throw result.cse;
|
|
|
84 |
}
|
|
|
85 |
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "pushContentToProduction failed: unknown result");
|
| 3893 |
chandransh |
86 |
}
|
|
|
87 |
|
|
|
88 |
}
|
|
|
89 |
public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
|
|
|
90 |
public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
|
|
|
91 |
private org.apache.thrift.async.TAsyncClientManager clientManager;
|
|
|
92 |
private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
|
|
|
93 |
public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
|
|
|
94 |
this.clientManager = clientManager;
|
|
|
95 |
this.protocolFactory = protocolFactory;
|
|
|
96 |
}
|
|
|
97 |
public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
|
|
|
98 |
return new AsyncClient(protocolFactory, clientManager, transport);
|
|
|
99 |
}
|
|
|
100 |
}
|
|
|
101 |
|
|
|
102 |
public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
|
|
|
103 |
super(protocolFactory, clientManager, transport);
|
|
|
104 |
}
|
|
|
105 |
|
|
|
106 |
public void pushContentToProduction(long entityId, org.apache.thrift.async.AsyncMethodCallback<pushContentToProduction_call> resultHandler) throws org.apache.thrift.TException {
|
|
|
107 |
checkReady();
|
|
|
108 |
pushContentToProduction_call method_call = new pushContentToProduction_call(entityId, resultHandler, this, ___protocolFactory, ___transport);
|
|
|
109 |
this.___currentMethod = method_call;
|
|
|
110 |
___manager.call(method_call);
|
|
|
111 |
}
|
|
|
112 |
|
|
|
113 |
public static class pushContentToProduction_call extends org.apache.thrift.async.TAsyncMethodCall {
|
|
|
114 |
private long entityId;
|
|
|
115 |
public pushContentToProduction_call(long entityId, org.apache.thrift.async.AsyncMethodCallback<pushContentToProduction_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
|
|
|
116 |
super(client, protocolFactory, transport, resultHandler, false);
|
|
|
117 |
this.entityId = entityId;
|
|
|
118 |
}
|
|
|
119 |
|
|
|
120 |
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
|
|
|
121 |
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("pushContentToProduction", org.apache.thrift.protocol.TMessageType.CALL, 0));
|
|
|
122 |
pushContentToProduction_args args = new pushContentToProduction_args();
|
|
|
123 |
args.setEntityId(entityId);
|
|
|
124 |
args.write(prot);
|
|
|
125 |
prot.writeMessageEnd();
|
|
|
126 |
}
|
|
|
127 |
|
| 3896 |
chandransh |
128 |
public boolean getResult() throws ContentServiceException, org.apache.thrift.TException {
|
| 3893 |
chandransh |
129 |
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
|
|
|
130 |
throw new IllegalStateException("Method call not finished!");
|
|
|
131 |
}
|
|
|
132 |
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
|
|
|
133 |
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
|
| 3896 |
chandransh |
134 |
return (new Client(prot)).recv_pushContentToProduction();
|
| 3893 |
chandransh |
135 |
}
|
|
|
136 |
}
|
|
|
137 |
|
|
|
138 |
}
|
|
|
139 |
|
|
|
140 |
public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
|
|
|
141 |
private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
|
|
|
142 |
public Processor(I iface) {
|
|
|
143 |
super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
|
|
|
144 |
}
|
|
|
145 |
|
|
|
146 |
protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
|
|
|
147 |
super(iface, getProcessMap(processMap));
|
|
|
148 |
}
|
|
|
149 |
|
|
|
150 |
private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
|
|
|
151 |
processMap.put("pushContentToProduction", new pushContentToProduction());
|
|
|
152 |
return processMap;
|
|
|
153 |
}
|
|
|
154 |
|
|
|
155 |
private static class pushContentToProduction<I extends Iface> extends org.apache.thrift.ProcessFunction<I, pushContentToProduction_args> {
|
|
|
156 |
public pushContentToProduction() {
|
|
|
157 |
super("pushContentToProduction");
|
|
|
158 |
}
|
|
|
159 |
|
|
|
160 |
protected pushContentToProduction_args getEmptyArgsInstance() {
|
|
|
161 |
return new pushContentToProduction_args();
|
|
|
162 |
}
|
|
|
163 |
|
|
|
164 |
protected pushContentToProduction_result getResult(I iface, pushContentToProduction_args args) throws org.apache.thrift.TException {
|
|
|
165 |
pushContentToProduction_result result = new pushContentToProduction_result();
|
| 3896 |
chandransh |
166 |
try {
|
|
|
167 |
result.success = iface.pushContentToProduction(args.entityId);
|
|
|
168 |
result.setSuccessIsSet(true);
|
|
|
169 |
} catch (ContentServiceException cse) {
|
|
|
170 |
result.cse = cse;
|
|
|
171 |
}
|
| 3893 |
chandransh |
172 |
return result;
|
|
|
173 |
}
|
|
|
174 |
}
|
|
|
175 |
|
|
|
176 |
}
|
|
|
177 |
|
|
|
178 |
public static class pushContentToProduction_args implements org.apache.thrift.TBase<pushContentToProduction_args, pushContentToProduction_args._Fields>, java.io.Serializable, Cloneable {
|
|
|
179 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("pushContentToProduction_args");
|
|
|
180 |
|
|
|
181 |
private static final org.apache.thrift.protocol.TField ENTITY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("entityId", org.apache.thrift.protocol.TType.I64, (short)1);
|
|
|
182 |
|
|
|
183 |
private long entityId; // required
|
|
|
184 |
|
|
|
185 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
186 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
|
|
187 |
ENTITY_ID((short)1, "entityId");
|
|
|
188 |
|
|
|
189 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
190 |
|
|
|
191 |
static {
|
|
|
192 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
193 |
byName.put(field.getFieldName(), field);
|
|
|
194 |
}
|
|
|
195 |
}
|
|
|
196 |
|
|
|
197 |
/**
|
|
|
198 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
199 |
*/
|
|
|
200 |
public static _Fields findByThriftId(int fieldId) {
|
|
|
201 |
switch(fieldId) {
|
|
|
202 |
case 1: // ENTITY_ID
|
|
|
203 |
return ENTITY_ID;
|
|
|
204 |
default:
|
|
|
205 |
return null;
|
|
|
206 |
}
|
|
|
207 |
}
|
|
|
208 |
|
|
|
209 |
/**
|
|
|
210 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
211 |
* if it is not found.
|
|
|
212 |
*/
|
|
|
213 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
214 |
_Fields fields = findByThriftId(fieldId);
|
|
|
215 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
216 |
return fields;
|
|
|
217 |
}
|
|
|
218 |
|
|
|
219 |
/**
|
|
|
220 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
221 |
*/
|
|
|
222 |
public static _Fields findByName(String name) {
|
|
|
223 |
return byName.get(name);
|
|
|
224 |
}
|
|
|
225 |
|
|
|
226 |
private final short _thriftId;
|
|
|
227 |
private final String _fieldName;
|
|
|
228 |
|
|
|
229 |
_Fields(short thriftId, String fieldName) {
|
|
|
230 |
_thriftId = thriftId;
|
|
|
231 |
_fieldName = fieldName;
|
|
|
232 |
}
|
|
|
233 |
|
|
|
234 |
public short getThriftFieldId() {
|
|
|
235 |
return _thriftId;
|
|
|
236 |
}
|
|
|
237 |
|
|
|
238 |
public String getFieldName() {
|
|
|
239 |
return _fieldName;
|
|
|
240 |
}
|
|
|
241 |
}
|
|
|
242 |
|
|
|
243 |
// isset id assignments
|
|
|
244 |
private static final int __ENTITYID_ISSET_ID = 0;
|
|
|
245 |
private BitSet __isset_bit_vector = new BitSet(1);
|
|
|
246 |
|
|
|
247 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
|
|
248 |
static {
|
|
|
249 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
250 |
tmpMap.put(_Fields.ENTITY_ID, new org.apache.thrift.meta_data.FieldMetaData("entityId", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
251 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
252 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
253 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(pushContentToProduction_args.class, metaDataMap);
|
|
|
254 |
}
|
|
|
255 |
|
|
|
256 |
public pushContentToProduction_args() {
|
|
|
257 |
}
|
|
|
258 |
|
|
|
259 |
public pushContentToProduction_args(
|
|
|
260 |
long entityId)
|
|
|
261 |
{
|
|
|
262 |
this();
|
|
|
263 |
this.entityId = entityId;
|
|
|
264 |
setEntityIdIsSet(true);
|
|
|
265 |
}
|
|
|
266 |
|
|
|
267 |
/**
|
|
|
268 |
* Performs a deep copy on <i>other</i>.
|
|
|
269 |
*/
|
|
|
270 |
public pushContentToProduction_args(pushContentToProduction_args other) {
|
|
|
271 |
__isset_bit_vector.clear();
|
|
|
272 |
__isset_bit_vector.or(other.__isset_bit_vector);
|
|
|
273 |
this.entityId = other.entityId;
|
|
|
274 |
}
|
|
|
275 |
|
|
|
276 |
public pushContentToProduction_args deepCopy() {
|
|
|
277 |
return new pushContentToProduction_args(this);
|
|
|
278 |
}
|
|
|
279 |
|
|
|
280 |
@Override
|
|
|
281 |
public void clear() {
|
|
|
282 |
setEntityIdIsSet(false);
|
|
|
283 |
this.entityId = 0;
|
|
|
284 |
}
|
|
|
285 |
|
|
|
286 |
public long getEntityId() {
|
|
|
287 |
return this.entityId;
|
|
|
288 |
}
|
|
|
289 |
|
|
|
290 |
public void setEntityId(long entityId) {
|
|
|
291 |
this.entityId = entityId;
|
|
|
292 |
setEntityIdIsSet(true);
|
|
|
293 |
}
|
|
|
294 |
|
|
|
295 |
public void unsetEntityId() {
|
|
|
296 |
__isset_bit_vector.clear(__ENTITYID_ISSET_ID);
|
|
|
297 |
}
|
|
|
298 |
|
|
|
299 |
/** Returns true if field entityId is set (has been assigned a value) and false otherwise */
|
|
|
300 |
public boolean isSetEntityId() {
|
|
|
301 |
return __isset_bit_vector.get(__ENTITYID_ISSET_ID);
|
|
|
302 |
}
|
|
|
303 |
|
|
|
304 |
public void setEntityIdIsSet(boolean value) {
|
|
|
305 |
__isset_bit_vector.set(__ENTITYID_ISSET_ID, value);
|
|
|
306 |
}
|
|
|
307 |
|
|
|
308 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
309 |
switch (field) {
|
|
|
310 |
case ENTITY_ID:
|
|
|
311 |
if (value == null) {
|
|
|
312 |
unsetEntityId();
|
|
|
313 |
} else {
|
|
|
314 |
setEntityId((Long)value);
|
|
|
315 |
}
|
|
|
316 |
break;
|
|
|
317 |
|
|
|
318 |
}
|
|
|
319 |
}
|
|
|
320 |
|
|
|
321 |
public Object getFieldValue(_Fields field) {
|
|
|
322 |
switch (field) {
|
|
|
323 |
case ENTITY_ID:
|
|
|
324 |
return Long.valueOf(getEntityId());
|
|
|
325 |
|
|
|
326 |
}
|
|
|
327 |
throw new IllegalStateException();
|
|
|
328 |
}
|
|
|
329 |
|
|
|
330 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
331 |
public boolean isSet(_Fields field) {
|
|
|
332 |
if (field == null) {
|
|
|
333 |
throw new IllegalArgumentException();
|
|
|
334 |
}
|
|
|
335 |
|
|
|
336 |
switch (field) {
|
|
|
337 |
case ENTITY_ID:
|
|
|
338 |
return isSetEntityId();
|
|
|
339 |
}
|
|
|
340 |
throw new IllegalStateException();
|
|
|
341 |
}
|
|
|
342 |
|
|
|
343 |
@Override
|
|
|
344 |
public boolean equals(Object that) {
|
|
|
345 |
if (that == null)
|
|
|
346 |
return false;
|
|
|
347 |
if (that instanceof pushContentToProduction_args)
|
|
|
348 |
return this.equals((pushContentToProduction_args)that);
|
|
|
349 |
return false;
|
|
|
350 |
}
|
|
|
351 |
|
|
|
352 |
public boolean equals(pushContentToProduction_args that) {
|
|
|
353 |
if (that == null)
|
|
|
354 |
return false;
|
|
|
355 |
|
|
|
356 |
boolean this_present_entityId = true;
|
|
|
357 |
boolean that_present_entityId = true;
|
|
|
358 |
if (this_present_entityId || that_present_entityId) {
|
|
|
359 |
if (!(this_present_entityId && that_present_entityId))
|
|
|
360 |
return false;
|
|
|
361 |
if (this.entityId != that.entityId)
|
|
|
362 |
return false;
|
|
|
363 |
}
|
|
|
364 |
|
|
|
365 |
return true;
|
|
|
366 |
}
|
|
|
367 |
|
|
|
368 |
@Override
|
|
|
369 |
public int hashCode() {
|
|
|
370 |
return 0;
|
|
|
371 |
}
|
|
|
372 |
|
|
|
373 |
public int compareTo(pushContentToProduction_args other) {
|
|
|
374 |
if (!getClass().equals(other.getClass())) {
|
|
|
375 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
376 |
}
|
|
|
377 |
|
|
|
378 |
int lastComparison = 0;
|
|
|
379 |
pushContentToProduction_args typedOther = (pushContentToProduction_args)other;
|
|
|
380 |
|
|
|
381 |
lastComparison = Boolean.valueOf(isSetEntityId()).compareTo(typedOther.isSetEntityId());
|
|
|
382 |
if (lastComparison != 0) {
|
|
|
383 |
return lastComparison;
|
|
|
384 |
}
|
|
|
385 |
if (isSetEntityId()) {
|
|
|
386 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.entityId, typedOther.entityId);
|
|
|
387 |
if (lastComparison != 0) {
|
|
|
388 |
return lastComparison;
|
|
|
389 |
}
|
|
|
390 |
}
|
|
|
391 |
return 0;
|
|
|
392 |
}
|
|
|
393 |
|
|
|
394 |
public _Fields fieldForId(int fieldId) {
|
|
|
395 |
return _Fields.findByThriftId(fieldId);
|
|
|
396 |
}
|
|
|
397 |
|
|
|
398 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
399 |
org.apache.thrift.protocol.TField field;
|
|
|
400 |
iprot.readStructBegin();
|
|
|
401 |
while (true)
|
|
|
402 |
{
|
|
|
403 |
field = iprot.readFieldBegin();
|
|
|
404 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
|
|
405 |
break;
|
|
|
406 |
}
|
|
|
407 |
switch (field.id) {
|
|
|
408 |
case 1: // ENTITY_ID
|
|
|
409 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
410 |
this.entityId = iprot.readI64();
|
|
|
411 |
setEntityIdIsSet(true);
|
|
|
412 |
} else {
|
|
|
413 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
414 |
}
|
|
|
415 |
break;
|
|
|
416 |
default:
|
|
|
417 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
418 |
}
|
|
|
419 |
iprot.readFieldEnd();
|
|
|
420 |
}
|
|
|
421 |
iprot.readStructEnd();
|
|
|
422 |
validate();
|
|
|
423 |
}
|
|
|
424 |
|
|
|
425 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
|
|
426 |
validate();
|
|
|
427 |
|
|
|
428 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
429 |
oprot.writeFieldBegin(ENTITY_ID_FIELD_DESC);
|
|
|
430 |
oprot.writeI64(this.entityId);
|
|
|
431 |
oprot.writeFieldEnd();
|
|
|
432 |
oprot.writeFieldStop();
|
|
|
433 |
oprot.writeStructEnd();
|
|
|
434 |
}
|
|
|
435 |
|
|
|
436 |
@Override
|
|
|
437 |
public String toString() {
|
|
|
438 |
StringBuilder sb = new StringBuilder("pushContentToProduction_args(");
|
|
|
439 |
boolean first = true;
|
|
|
440 |
|
|
|
441 |
sb.append("entityId:");
|
|
|
442 |
sb.append(this.entityId);
|
|
|
443 |
first = false;
|
|
|
444 |
sb.append(")");
|
|
|
445 |
return sb.toString();
|
|
|
446 |
}
|
|
|
447 |
|
|
|
448 |
public void validate() throws org.apache.thrift.TException {
|
|
|
449 |
// check for required fields
|
|
|
450 |
}
|
|
|
451 |
|
|
|
452 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
453 |
try {
|
|
|
454 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
455 |
} catch (org.apache.thrift.TException te) {
|
|
|
456 |
throw new java.io.IOException(te);
|
|
|
457 |
}
|
|
|
458 |
}
|
|
|
459 |
|
|
|
460 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
461 |
try {
|
|
|
462 |
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
|
|
|
463 |
__isset_bit_vector = new BitSet(1);
|
|
|
464 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
465 |
} catch (org.apache.thrift.TException te) {
|
|
|
466 |
throw new java.io.IOException(te);
|
|
|
467 |
}
|
|
|
468 |
}
|
|
|
469 |
|
|
|
470 |
}
|
|
|
471 |
|
|
|
472 |
public static class pushContentToProduction_result implements org.apache.thrift.TBase<pushContentToProduction_result, pushContentToProduction_result._Fields>, java.io.Serializable, Cloneable {
|
|
|
473 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("pushContentToProduction_result");
|
|
|
474 |
|
| 3896 |
chandransh |
475 |
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
|
|
|
476 |
private static final org.apache.thrift.protocol.TField CSE_FIELD_DESC = new org.apache.thrift.protocol.TField("cse", org.apache.thrift.protocol.TType.STRUCT, (short)1);
|
| 3893 |
chandransh |
477 |
|
| 3896 |
chandransh |
478 |
private boolean success; // required
|
|
|
479 |
private ContentServiceException cse; // required
|
| 3893 |
chandransh |
480 |
|
|
|
481 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
482 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
| 3896 |
chandransh |
483 |
SUCCESS((short)0, "success"),
|
|
|
484 |
CSE((short)1, "cse");
|
| 3893 |
chandransh |
485 |
|
|
|
486 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
487 |
|
|
|
488 |
static {
|
|
|
489 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
490 |
byName.put(field.getFieldName(), field);
|
|
|
491 |
}
|
|
|
492 |
}
|
|
|
493 |
|
|
|
494 |
/**
|
|
|
495 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
496 |
*/
|
|
|
497 |
public static _Fields findByThriftId(int fieldId) {
|
|
|
498 |
switch(fieldId) {
|
| 3896 |
chandransh |
499 |
case 0: // SUCCESS
|
|
|
500 |
return SUCCESS;
|
|
|
501 |
case 1: // CSE
|
|
|
502 |
return CSE;
|
| 3893 |
chandransh |
503 |
default:
|
|
|
504 |
return null;
|
|
|
505 |
}
|
|
|
506 |
}
|
|
|
507 |
|
|
|
508 |
/**
|
|
|
509 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
510 |
* if it is not found.
|
|
|
511 |
*/
|
|
|
512 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
513 |
_Fields fields = findByThriftId(fieldId);
|
|
|
514 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
515 |
return fields;
|
|
|
516 |
}
|
|
|
517 |
|
|
|
518 |
/**
|
|
|
519 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
520 |
*/
|
|
|
521 |
public static _Fields findByName(String name) {
|
|
|
522 |
return byName.get(name);
|
|
|
523 |
}
|
|
|
524 |
|
|
|
525 |
private final short _thriftId;
|
|
|
526 |
private final String _fieldName;
|
|
|
527 |
|
|
|
528 |
_Fields(short thriftId, String fieldName) {
|
|
|
529 |
_thriftId = thriftId;
|
|
|
530 |
_fieldName = fieldName;
|
|
|
531 |
}
|
|
|
532 |
|
|
|
533 |
public short getThriftFieldId() {
|
|
|
534 |
return _thriftId;
|
|
|
535 |
}
|
|
|
536 |
|
|
|
537 |
public String getFieldName() {
|
|
|
538 |
return _fieldName;
|
|
|
539 |
}
|
|
|
540 |
}
|
| 3896 |
chandransh |
541 |
|
|
|
542 |
// isset id assignments
|
|
|
543 |
private static final int __SUCCESS_ISSET_ID = 0;
|
|
|
544 |
private BitSet __isset_bit_vector = new BitSet(1);
|
|
|
545 |
|
| 3893 |
chandransh |
546 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
|
|
547 |
static {
|
|
|
548 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
| 3896 |
chandransh |
549 |
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
550 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
|
|
|
551 |
tmpMap.put(_Fields.CSE, new org.apache.thrift.meta_data.FieldMetaData("cse", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
552 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
|
| 3893 |
chandransh |
553 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
554 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(pushContentToProduction_result.class, metaDataMap);
|
|
|
555 |
}
|
|
|
556 |
|
|
|
557 |
public pushContentToProduction_result() {
|
|
|
558 |
}
|
|
|
559 |
|
| 3896 |
chandransh |
560 |
public pushContentToProduction_result(
|
|
|
561 |
boolean success,
|
|
|
562 |
ContentServiceException cse)
|
|
|
563 |
{
|
|
|
564 |
this();
|
|
|
565 |
this.success = success;
|
|
|
566 |
setSuccessIsSet(true);
|
|
|
567 |
this.cse = cse;
|
|
|
568 |
}
|
|
|
569 |
|
| 3893 |
chandransh |
570 |
/**
|
|
|
571 |
* Performs a deep copy on <i>other</i>.
|
|
|
572 |
*/
|
|
|
573 |
public pushContentToProduction_result(pushContentToProduction_result other) {
|
| 3896 |
chandransh |
574 |
__isset_bit_vector.clear();
|
|
|
575 |
__isset_bit_vector.or(other.__isset_bit_vector);
|
|
|
576 |
this.success = other.success;
|
|
|
577 |
if (other.isSetCse()) {
|
|
|
578 |
this.cse = new ContentServiceException(other.cse);
|
|
|
579 |
}
|
| 3893 |
chandransh |
580 |
}
|
|
|
581 |
|
|
|
582 |
public pushContentToProduction_result deepCopy() {
|
|
|
583 |
return new pushContentToProduction_result(this);
|
|
|
584 |
}
|
|
|
585 |
|
|
|
586 |
@Override
|
|
|
587 |
public void clear() {
|
| 3896 |
chandransh |
588 |
setSuccessIsSet(false);
|
|
|
589 |
this.success = false;
|
|
|
590 |
this.cse = null;
|
| 3893 |
chandransh |
591 |
}
|
|
|
592 |
|
| 3896 |
chandransh |
593 |
public boolean isSuccess() {
|
|
|
594 |
return this.success;
|
|
|
595 |
}
|
|
|
596 |
|
|
|
597 |
public void setSuccess(boolean success) {
|
|
|
598 |
this.success = success;
|
|
|
599 |
setSuccessIsSet(true);
|
|
|
600 |
}
|
|
|
601 |
|
|
|
602 |
public void unsetSuccess() {
|
|
|
603 |
__isset_bit_vector.clear(__SUCCESS_ISSET_ID);
|
|
|
604 |
}
|
|
|
605 |
|
|
|
606 |
/** Returns true if field success is set (has been assigned a value) and false otherwise */
|
|
|
607 |
public boolean isSetSuccess() {
|
|
|
608 |
return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
|
|
|
609 |
}
|
|
|
610 |
|
|
|
611 |
public void setSuccessIsSet(boolean value) {
|
|
|
612 |
__isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
|
|
|
613 |
}
|
|
|
614 |
|
|
|
615 |
public ContentServiceException getCse() {
|
|
|
616 |
return this.cse;
|
|
|
617 |
}
|
|
|
618 |
|
|
|
619 |
public void setCse(ContentServiceException cse) {
|
|
|
620 |
this.cse = cse;
|
|
|
621 |
}
|
|
|
622 |
|
|
|
623 |
public void unsetCse() {
|
|
|
624 |
this.cse = null;
|
|
|
625 |
}
|
|
|
626 |
|
|
|
627 |
/** Returns true if field cse is set (has been assigned a value) and false otherwise */
|
|
|
628 |
public boolean isSetCse() {
|
|
|
629 |
return this.cse != null;
|
|
|
630 |
}
|
|
|
631 |
|
|
|
632 |
public void setCseIsSet(boolean value) {
|
|
|
633 |
if (!value) {
|
|
|
634 |
this.cse = null;
|
|
|
635 |
}
|
|
|
636 |
}
|
|
|
637 |
|
| 3893 |
chandransh |
638 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
639 |
switch (field) {
|
| 3896 |
chandransh |
640 |
case SUCCESS:
|
|
|
641 |
if (value == null) {
|
|
|
642 |
unsetSuccess();
|
|
|
643 |
} else {
|
|
|
644 |
setSuccess((Boolean)value);
|
|
|
645 |
}
|
|
|
646 |
break;
|
|
|
647 |
|
|
|
648 |
case CSE:
|
|
|
649 |
if (value == null) {
|
|
|
650 |
unsetCse();
|
|
|
651 |
} else {
|
|
|
652 |
setCse((ContentServiceException)value);
|
|
|
653 |
}
|
|
|
654 |
break;
|
|
|
655 |
|
| 3893 |
chandransh |
656 |
}
|
|
|
657 |
}
|
|
|
658 |
|
|
|
659 |
public Object getFieldValue(_Fields field) {
|
|
|
660 |
switch (field) {
|
| 3896 |
chandransh |
661 |
case SUCCESS:
|
|
|
662 |
return Boolean.valueOf(isSuccess());
|
|
|
663 |
|
|
|
664 |
case CSE:
|
|
|
665 |
return getCse();
|
|
|
666 |
|
| 3893 |
chandransh |
667 |
}
|
|
|
668 |
throw new IllegalStateException();
|
|
|
669 |
}
|
|
|
670 |
|
|
|
671 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
672 |
public boolean isSet(_Fields field) {
|
|
|
673 |
if (field == null) {
|
|
|
674 |
throw new IllegalArgumentException();
|
|
|
675 |
}
|
|
|
676 |
|
|
|
677 |
switch (field) {
|
| 3896 |
chandransh |
678 |
case SUCCESS:
|
|
|
679 |
return isSetSuccess();
|
|
|
680 |
case CSE:
|
|
|
681 |
return isSetCse();
|
| 3893 |
chandransh |
682 |
}
|
|
|
683 |
throw new IllegalStateException();
|
|
|
684 |
}
|
|
|
685 |
|
|
|
686 |
@Override
|
|
|
687 |
public boolean equals(Object that) {
|
|
|
688 |
if (that == null)
|
|
|
689 |
return false;
|
|
|
690 |
if (that instanceof pushContentToProduction_result)
|
|
|
691 |
return this.equals((pushContentToProduction_result)that);
|
|
|
692 |
return false;
|
|
|
693 |
}
|
|
|
694 |
|
|
|
695 |
public boolean equals(pushContentToProduction_result that) {
|
|
|
696 |
if (that == null)
|
|
|
697 |
return false;
|
|
|
698 |
|
| 3896 |
chandransh |
699 |
boolean this_present_success = true;
|
|
|
700 |
boolean that_present_success = true;
|
|
|
701 |
if (this_present_success || that_present_success) {
|
|
|
702 |
if (!(this_present_success && that_present_success))
|
|
|
703 |
return false;
|
|
|
704 |
if (this.success != that.success)
|
|
|
705 |
return false;
|
|
|
706 |
}
|
|
|
707 |
|
|
|
708 |
boolean this_present_cse = true && this.isSetCse();
|
|
|
709 |
boolean that_present_cse = true && that.isSetCse();
|
|
|
710 |
if (this_present_cse || that_present_cse) {
|
|
|
711 |
if (!(this_present_cse && that_present_cse))
|
|
|
712 |
return false;
|
|
|
713 |
if (!this.cse.equals(that.cse))
|
|
|
714 |
return false;
|
|
|
715 |
}
|
|
|
716 |
|
| 3893 |
chandransh |
717 |
return true;
|
|
|
718 |
}
|
|
|
719 |
|
|
|
720 |
@Override
|
|
|
721 |
public int hashCode() {
|
|
|
722 |
return 0;
|
|
|
723 |
}
|
|
|
724 |
|
|
|
725 |
public int compareTo(pushContentToProduction_result other) {
|
|
|
726 |
if (!getClass().equals(other.getClass())) {
|
|
|
727 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
728 |
}
|
|
|
729 |
|
|
|
730 |
int lastComparison = 0;
|
|
|
731 |
pushContentToProduction_result typedOther = (pushContentToProduction_result)other;
|
|
|
732 |
|
| 3896 |
chandransh |
733 |
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
|
|
|
734 |
if (lastComparison != 0) {
|
|
|
735 |
return lastComparison;
|
|
|
736 |
}
|
|
|
737 |
if (isSetSuccess()) {
|
|
|
738 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
|
|
|
739 |
if (lastComparison != 0) {
|
|
|
740 |
return lastComparison;
|
|
|
741 |
}
|
|
|
742 |
}
|
|
|
743 |
lastComparison = Boolean.valueOf(isSetCse()).compareTo(typedOther.isSetCse());
|
|
|
744 |
if (lastComparison != 0) {
|
|
|
745 |
return lastComparison;
|
|
|
746 |
}
|
|
|
747 |
if (isSetCse()) {
|
|
|
748 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cse, typedOther.cse);
|
|
|
749 |
if (lastComparison != 0) {
|
|
|
750 |
return lastComparison;
|
|
|
751 |
}
|
|
|
752 |
}
|
| 3893 |
chandransh |
753 |
return 0;
|
|
|
754 |
}
|
|
|
755 |
|
|
|
756 |
public _Fields fieldForId(int fieldId) {
|
|
|
757 |
return _Fields.findByThriftId(fieldId);
|
|
|
758 |
}
|
|
|
759 |
|
|
|
760 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
761 |
org.apache.thrift.protocol.TField field;
|
|
|
762 |
iprot.readStructBegin();
|
|
|
763 |
while (true)
|
|
|
764 |
{
|
|
|
765 |
field = iprot.readFieldBegin();
|
|
|
766 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
|
|
767 |
break;
|
|
|
768 |
}
|
|
|
769 |
switch (field.id) {
|
| 3896 |
chandransh |
770 |
case 0: // SUCCESS
|
|
|
771 |
if (field.type == org.apache.thrift.protocol.TType.BOOL) {
|
|
|
772 |
this.success = iprot.readBool();
|
|
|
773 |
setSuccessIsSet(true);
|
|
|
774 |
} else {
|
|
|
775 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
776 |
}
|
|
|
777 |
break;
|
|
|
778 |
case 1: // CSE
|
|
|
779 |
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
|
|
|
780 |
this.cse = new ContentServiceException();
|
|
|
781 |
this.cse.read(iprot);
|
|
|
782 |
} else {
|
|
|
783 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
784 |
}
|
|
|
785 |
break;
|
| 3893 |
chandransh |
786 |
default:
|
|
|
787 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
788 |
}
|
|
|
789 |
iprot.readFieldEnd();
|
|
|
790 |
}
|
|
|
791 |
iprot.readStructEnd();
|
|
|
792 |
validate();
|
|
|
793 |
}
|
|
|
794 |
|
|
|
795 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
|
|
796 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
797 |
|
| 3896 |
chandransh |
798 |
if (this.isSetSuccess()) {
|
|
|
799 |
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
|
|
|
800 |
oprot.writeBool(this.success);
|
|
|
801 |
oprot.writeFieldEnd();
|
|
|
802 |
} else if (this.isSetCse()) {
|
|
|
803 |
oprot.writeFieldBegin(CSE_FIELD_DESC);
|
|
|
804 |
this.cse.write(oprot);
|
|
|
805 |
oprot.writeFieldEnd();
|
|
|
806 |
}
|
| 3893 |
chandransh |
807 |
oprot.writeFieldStop();
|
|
|
808 |
oprot.writeStructEnd();
|
|
|
809 |
}
|
|
|
810 |
|
|
|
811 |
@Override
|
|
|
812 |
public String toString() {
|
|
|
813 |
StringBuilder sb = new StringBuilder("pushContentToProduction_result(");
|
|
|
814 |
boolean first = true;
|
|
|
815 |
|
| 3896 |
chandransh |
816 |
sb.append("success:");
|
|
|
817 |
sb.append(this.success);
|
|
|
818 |
first = false;
|
|
|
819 |
if (!first) sb.append(", ");
|
|
|
820 |
sb.append("cse:");
|
|
|
821 |
if (this.cse == null) {
|
|
|
822 |
sb.append("null");
|
|
|
823 |
} else {
|
|
|
824 |
sb.append(this.cse);
|
|
|
825 |
}
|
|
|
826 |
first = false;
|
| 3893 |
chandransh |
827 |
sb.append(")");
|
|
|
828 |
return sb.toString();
|
|
|
829 |
}
|
|
|
830 |
|
|
|
831 |
public void validate() throws org.apache.thrift.TException {
|
|
|
832 |
// check for required fields
|
|
|
833 |
}
|
|
|
834 |
|
|
|
835 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
836 |
try {
|
|
|
837 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
838 |
} catch (org.apache.thrift.TException te) {
|
|
|
839 |
throw new java.io.IOException(te);
|
|
|
840 |
}
|
|
|
841 |
}
|
|
|
842 |
|
|
|
843 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
844 |
try {
|
|
|
845 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
846 |
} catch (org.apache.thrift.TException te) {
|
|
|
847 |
throw new java.io.IOException(te);
|
|
|
848 |
}
|
|
|
849 |
}
|
|
|
850 |
|
|
|
851 |
}
|
|
|
852 |
|
|
|
853 |
}
|