Subversion Repositories SmartDukaan

Rev

Rev 3430 | Rev 4241 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3430 Rev 3546
Line 38... Line 38...
38
  private static final org.apache.thrift.protocol.TField TICKET_DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("ticketDescription", org.apache.thrift.protocol.TType.STRING, (short)13);
38
  private static final org.apache.thrift.protocol.TField TICKET_DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("ticketDescription", org.apache.thrift.protocol.TType.STRING, (short)13);
39
  private static final org.apache.thrift.protocol.TField IS_READ_FIELD_DESC = new org.apache.thrift.protocol.TField("isRead", org.apache.thrift.protocol.TType.BOOL, (short)14);
39
  private static final org.apache.thrift.protocol.TField IS_READ_FIELD_DESC = new org.apache.thrift.protocol.TField("isRead", org.apache.thrift.protocol.TType.BOOL, (short)14);
40
  private static final org.apache.thrift.protocol.TField CUSTOMER_MOBILE_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("customerMobileNumber", org.apache.thrift.protocol.TType.STRING, (short)15);
40
  private static final org.apache.thrift.protocol.TField CUSTOMER_MOBILE_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("customerMobileNumber", org.apache.thrift.protocol.TType.STRING, (short)15);
41
  private static final org.apache.thrift.protocol.TField CUSTOMER_EMAIL_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("customerEmailId", org.apache.thrift.protocol.TType.STRING, (short)16);
41
  private static final org.apache.thrift.protocol.TField CUSTOMER_EMAIL_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("customerEmailId", org.apache.thrift.protocol.TType.STRING, (short)16);
42
  private static final org.apache.thrift.protocol.TField CUSTOMER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("customerName", org.apache.thrift.protocol.TType.STRING, (short)17);
42
  private static final org.apache.thrift.protocol.TField CUSTOMER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("customerName", org.apache.thrift.protocol.TType.STRING, (short)17);
43
  private static final org.apache.thrift.protocol.TField CREATOR_FIELD_DESC = new org.apache.thrift.protocol.TField("creator", org.apache.thrift.protocol.TType.STRUCT, (short)18);
-
 
44
  private static final org.apache.thrift.protocol.TField TICKET_ASSIGNEE_FIELD_DESC = new org.apache.thrift.protocol.TField("ticketAssignee", org.apache.thrift.protocol.TType.STRUCT, (short)19);
-
 
45
 
43
 
46
  private long id; // required
44
  private long id; // required
47
  private String description; // required
45
  private String description; // required
48
  private long creationTimestamp; // required
46
  private long creationTimestamp; // required
49
  private ActivityType type; // required
47
  private ActivityType type; // required
Line 58... Line 56...
58
  private String ticketDescription; // required
56
  private String ticketDescription; // required
59
  private boolean isRead; // required
57
  private boolean isRead; // required
60
  private String customerMobileNumber; // required
58
  private String customerMobileNumber; // required
61
  private String customerEmailId; // required
59
  private String customerEmailId; // required
62
  private String customerName; // required
60
  private String customerName; // required
63
  private Agent creator; // required
-
 
64
  private Agent ticketAssignee; // required
-
 
65
 
61
 
66
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
62
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
67
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
63
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
68
    ID((short)1, "id"),
64
    ID((short)1, "id"),
69
    DESCRIPTION((short)2, "description"),
65
    DESCRIPTION((short)2, "description"),
Line 95... Line 91...
95
    TICKET_CATEGORY((short)12, "ticketCategory"),
91
    TICKET_CATEGORY((short)12, "ticketCategory"),
96
    TICKET_DESCRIPTION((short)13, "ticketDescription"),
92
    TICKET_DESCRIPTION((short)13, "ticketDescription"),
97
    IS_READ((short)14, "isRead"),
93
    IS_READ((short)14, "isRead"),
98
    CUSTOMER_MOBILE_NUMBER((short)15, "customerMobileNumber"),
94
    CUSTOMER_MOBILE_NUMBER((short)15, "customerMobileNumber"),
99
    CUSTOMER_EMAIL_ID((short)16, "customerEmailId"),
95
    CUSTOMER_EMAIL_ID((short)16, "customerEmailId"),
100
    CUSTOMER_NAME((short)17, "customerName"),
96
    CUSTOMER_NAME((short)17, "customerName");
101
    CREATOR((short)18, "creator"),
-
 
102
    TICKET_ASSIGNEE((short)19, "ticketAssignee");
-
 
103
 
97
 
104
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
98
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
105
 
99
 
106
    static {
100
    static {
107
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
101
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 146... Line 140...
146
          return CUSTOMER_MOBILE_NUMBER;
140
          return CUSTOMER_MOBILE_NUMBER;
147
        case 16: // CUSTOMER_EMAIL_ID
141
        case 16: // CUSTOMER_EMAIL_ID
148
          return CUSTOMER_EMAIL_ID;
142
          return CUSTOMER_EMAIL_ID;
149
        case 17: // CUSTOMER_NAME
143
        case 17: // CUSTOMER_NAME
150
          return CUSTOMER_NAME;
144
          return CUSTOMER_NAME;
151
        case 18: // CREATOR
-
 
152
          return CREATOR;
-
 
153
        case 19: // TICKET_ASSIGNEE
-
 
154
          return TICKET_ASSIGNEE;
-
 
155
        default:
145
        default:
156
          return null;
146
          return null;
157
      }
147
      }
158
    }
148
    }
159
 
149
 
Line 237... Line 227...
237
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
227
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
238
    tmpMap.put(_Fields.CUSTOMER_EMAIL_ID, new org.apache.thrift.meta_data.FieldMetaData("customerEmailId", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
228
    tmpMap.put(_Fields.CUSTOMER_EMAIL_ID, new org.apache.thrift.meta_data.FieldMetaData("customerEmailId", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
239
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
229
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
240
    tmpMap.put(_Fields.CUSTOMER_NAME, new org.apache.thrift.meta_data.FieldMetaData("customerName", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
230
    tmpMap.put(_Fields.CUSTOMER_NAME, new org.apache.thrift.meta_data.FieldMetaData("customerName", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
241
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
231
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
242
    tmpMap.put(_Fields.CREATOR, new org.apache.thrift.meta_data.FieldMetaData("creator", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
-
 
243
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Agent.class)));
-
 
244
    tmpMap.put(_Fields.TICKET_ASSIGNEE, new org.apache.thrift.meta_data.FieldMetaData("ticketAssignee", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
-
 
245
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Agent.class)));
-
 
246
    metaDataMap = Collections.unmodifiableMap(tmpMap);
232
    metaDataMap = Collections.unmodifiableMap(tmpMap);
247
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Activity.class, metaDataMap);
233
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Activity.class, metaDataMap);
248
  }
234
  }
249
 
235
 
250
  public Activity() {
236
  public Activity() {
Line 305... Line 291...
305
      this.customerEmailId = other.customerEmailId;
291
      this.customerEmailId = other.customerEmailId;
306
    }
292
    }
307
    if (other.isSetCustomerName()) {
293
    if (other.isSetCustomerName()) {
308
      this.customerName = other.customerName;
294
      this.customerName = other.customerName;
309
    }
295
    }
310
    if (other.isSetCreator()) {
-
 
311
      this.creator = new Agent(other.creator);
-
 
312
    }
-
 
313
    if (other.isSetTicketAssignee()) {
-
 
314
      this.ticketAssignee = new Agent(other.ticketAssignee);
-
 
315
    }
-
 
316
  }
296
  }
317
 
297
 
318
  public Activity deepCopy() {
298
  public Activity deepCopy() {
319
    return new Activity(this);
299
    return new Activity(this);
320
  }
300
  }
Line 344... Line 324...
344
    setIsReadIsSet(false);
324
    setIsReadIsSet(false);
345
    this.isRead = false;
325
    this.isRead = false;
346
    this.customerMobileNumber = null;
326
    this.customerMobileNumber = null;
347
    this.customerEmailId = null;
327
    this.customerEmailId = null;
348
    this.customerName = null;
328
    this.customerName = null;
349
    this.creator = null;
-
 
350
    this.ticketAssignee = null;
-
 
351
  }
329
  }
352
 
330
 
353
  public long getId() {
331
  public long getId() {
354
    return this.id;
332
    return this.id;
355
  }
333
  }
Line 763... Line 741...
763
    if (!value) {
741
    if (!value) {
764
      this.customerName = null;
742
      this.customerName = null;
765
    }
743
    }
766
  }
744
  }
767
 
745
 
768
  public Agent getCreator() {
-
 
769
    return this.creator;
-
 
770
  }
-
 
771
 
-
 
772
  public void setCreator(Agent creator) {
-
 
773
    this.creator = creator;
-
 
774
  }
-
 
775
 
-
 
776
  public void unsetCreator() {
-
 
777
    this.creator = null;
-
 
778
  }
-
 
779
 
-
 
780
  /** Returns true if field creator is set (has been assigned a value) and false otherwise */
-
 
781
  public boolean isSetCreator() {
-
 
782
    return this.creator != null;
-
 
783
  }
-
 
784
 
-
 
785
  public void setCreatorIsSet(boolean value) {
-
 
786
    if (!value) {
-
 
787
      this.creator = null;
-
 
788
    }
-
 
789
  }
-
 
790
 
-
 
791
  public Agent getTicketAssignee() {
-
 
792
    return this.ticketAssignee;
-
 
793
  }
-
 
794
 
-
 
795
  public void setTicketAssignee(Agent ticketAssignee) {
-
 
796
    this.ticketAssignee = ticketAssignee;
-
 
797
  }
-
 
798
 
-
 
799
  public void unsetTicketAssignee() {
-
 
800
    this.ticketAssignee = null;
-
 
801
  }
-
 
802
 
-
 
803
  /** Returns true if field ticketAssignee is set (has been assigned a value) and false otherwise */
-
 
804
  public boolean isSetTicketAssignee() {
-
 
805
    return this.ticketAssignee != null;
-
 
806
  }
-
 
807
 
-
 
808
  public void setTicketAssigneeIsSet(boolean value) {
-
 
809
    if (!value) {
-
 
810
      this.ticketAssignee = null;
-
 
811
    }
-
 
812
  }
-
 
813
 
-
 
814
  public void setFieldValue(_Fields field, Object value) {
746
  public void setFieldValue(_Fields field, Object value) {
815
    switch (field) {
747
    switch (field) {
816
    case ID:
748
    case ID:
817
      if (value == null) {
749
      if (value == null) {
818
        unsetId();
750
        unsetId();
Line 947... Line 879...
947
      } else {
879
      } else {
948
        setCustomerName((String)value);
880
        setCustomerName((String)value);
949
      }
881
      }
950
      break;
882
      break;
951
 
883
 
952
    case CREATOR:
-
 
953
      if (value == null) {
-
 
954
        unsetCreator();
-
 
955
      } else {
-
 
956
        setCreator((Agent)value);
-
 
957
      }
-
 
958
      break;
-
 
959
 
-
 
960
    case TICKET_ASSIGNEE:
-
 
961
      if (value == null) {
-
 
962
        unsetTicketAssignee();
-
 
963
      } else {
-
 
964
        setTicketAssignee((Agent)value);
-
 
965
      }
-
 
966
      break;
-
 
967
 
-
 
968
    }
884
    }
969
  }
885
  }
970
 
886
 
971
  public Object getFieldValue(_Fields field) {
887
  public Object getFieldValue(_Fields field) {
972
    switch (field) {
888
    switch (field) {
Line 1019... Line 935...
1019
      return getCustomerEmailId();
935
      return getCustomerEmailId();
1020
 
936
 
1021
    case CUSTOMER_NAME:
937
    case CUSTOMER_NAME:
1022
      return getCustomerName();
938
      return getCustomerName();
1023
 
939
 
1024
    case CREATOR:
-
 
1025
      return getCreator();
-
 
1026
 
-
 
1027
    case TICKET_ASSIGNEE:
-
 
1028
      return getTicketAssignee();
-
 
1029
 
-
 
1030
    }
940
    }
1031
    throw new IllegalStateException();
941
    throw new IllegalStateException();
1032
  }
942
  }
1033
 
943
 
1034
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
944
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 1070... Line 980...
1070
      return isSetCustomerMobileNumber();
980
      return isSetCustomerMobileNumber();
1071
    case CUSTOMER_EMAIL_ID:
981
    case CUSTOMER_EMAIL_ID:
1072
      return isSetCustomerEmailId();
982
      return isSetCustomerEmailId();
1073
    case CUSTOMER_NAME:
983
    case CUSTOMER_NAME:
1074
      return isSetCustomerName();
984
      return isSetCustomerName();
1075
    case CREATOR:
-
 
1076
      return isSetCreator();
-
 
1077
    case TICKET_ASSIGNEE:
-
 
1078
      return isSetTicketAssignee();
-
 
1079
    }
985
    }
1080
    throw new IllegalStateException();
986
    throw new IllegalStateException();
1081
  }
987
  }
1082
 
988
 
1083
  @Override
989
  @Override
Line 1244... Line 1150...
1244
        return false;
1150
        return false;
1245
      if (!this.customerName.equals(that.customerName))
1151
      if (!this.customerName.equals(that.customerName))
1246
        return false;
1152
        return false;
1247
    }
1153
    }
1248
 
1154
 
1249
    boolean this_present_creator = true && this.isSetCreator();
-
 
1250
    boolean that_present_creator = true && that.isSetCreator();
-
 
1251
    if (this_present_creator || that_present_creator) {
-
 
1252
      if (!(this_present_creator && that_present_creator))
-
 
1253
        return false;
-
 
1254
      if (!this.creator.equals(that.creator))
-
 
1255
        return false;
-
 
1256
    }
-
 
1257
 
-
 
1258
    boolean this_present_ticketAssignee = true && this.isSetTicketAssignee();
-
 
1259
    boolean that_present_ticketAssignee = true && that.isSetTicketAssignee();
-
 
1260
    if (this_present_ticketAssignee || that_present_ticketAssignee) {
-
 
1261
      if (!(this_present_ticketAssignee && that_present_ticketAssignee))
-
 
1262
        return false;
-
 
1263
      if (!this.ticketAssignee.equals(that.ticketAssignee))
-
 
1264
        return false;
-
 
1265
    }
-
 
1266
 
-
 
1267
    return true;
1155
    return true;
1268
  }
1156
  }
1269
 
1157
 
1270
  @Override
1158
  @Override
1271
  public int hashCode() {
1159
  public int hashCode() {
Line 1448... Line 1336...
1448
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.customerName, typedOther.customerName);
1336
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.customerName, typedOther.customerName);
1449
      if (lastComparison != 0) {
1337
      if (lastComparison != 0) {
1450
        return lastComparison;
1338
        return lastComparison;
1451
      }
1339
      }
1452
    }
1340
    }
1453
    lastComparison = Boolean.valueOf(isSetCreator()).compareTo(typedOther.isSetCreator());
-
 
1454
    if (lastComparison != 0) {
-
 
1455
      return lastComparison;
-
 
1456
    }
-
 
1457
    if (isSetCreator()) {
-
 
1458
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creator, typedOther.creator);
-
 
1459
      if (lastComparison != 0) {
-
 
1460
        return lastComparison;
-
 
1461
      }
-
 
1462
    }
-
 
1463
    lastComparison = Boolean.valueOf(isSetTicketAssignee()).compareTo(typedOther.isSetTicketAssignee());
-
 
1464
    if (lastComparison != 0) {
-
 
1465
      return lastComparison;
-
 
1466
    }
-
 
1467
    if (isSetTicketAssignee()) {
-
 
1468
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ticketAssignee, typedOther.ticketAssignee);
-
 
1469
      if (lastComparison != 0) {
-
 
1470
        return lastComparison;
-
 
1471
      }
-
 
1472
    }
-
 
1473
    return 0;
1341
    return 0;
1474
  }
1342
  }
1475
 
1343
 
1476
  public _Fields fieldForId(int fieldId) {
1344
  public _Fields fieldForId(int fieldId) {
1477
    return _Fields.findByThriftId(fieldId);
1345
    return _Fields.findByThriftId(fieldId);
Line 1612... Line 1480...
1612
            this.customerName = iprot.readString();
1480
            this.customerName = iprot.readString();
1613
          } else { 
1481
          } else { 
1614
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1482
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1615
          }
1483
          }
1616
          break;
1484
          break;
1617
        case 18: // CREATOR
-
 
1618
          if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-
 
1619
            this.creator = new Agent();
-
 
1620
            this.creator.read(iprot);
-
 
1621
          } else { 
-
 
1622
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1623
          }
-
 
1624
          break;
-
 
1625
        case 19: // TICKET_ASSIGNEE
-
 
1626
          if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-
 
1627
            this.ticketAssignee = new Agent();
-
 
1628
            this.ticketAssignee.read(iprot);
-
 
1629
          } else { 
-
 
1630
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1631
          }
-
 
1632
          break;
-
 
1633
        default:
1485
        default:
1634
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1486
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1635
      }
1487
      }
1636
      iprot.readFieldEnd();
1488
      iprot.readFieldEnd();
1637
    }
1489
    }
Line 1736... Line 1588...
1736
        oprot.writeFieldBegin(CUSTOMER_NAME_FIELD_DESC);
1588
        oprot.writeFieldBegin(CUSTOMER_NAME_FIELD_DESC);
1737
        oprot.writeString(this.customerName);
1589
        oprot.writeString(this.customerName);
1738
        oprot.writeFieldEnd();
1590
        oprot.writeFieldEnd();
1739
      }
1591
      }
1740
    }
1592
    }
1741
    if (this.creator != null) {
-
 
1742
      if (isSetCreator()) {
-
 
1743
        oprot.writeFieldBegin(CREATOR_FIELD_DESC);
-
 
1744
        this.creator.write(oprot);
-
 
1745
        oprot.writeFieldEnd();
-
 
1746
      }
-
 
1747
    }
-
 
1748
    if (this.ticketAssignee != null) {
-
 
1749
      if (isSetTicketAssignee()) {
-
 
1750
        oprot.writeFieldBegin(TICKET_ASSIGNEE_FIELD_DESC);
-
 
1751
        this.ticketAssignee.write(oprot);
-
 
1752
        oprot.writeFieldEnd();
-
 
1753
      }
-
 
1754
    }
-
 
1755
    oprot.writeFieldStop();
1593
    oprot.writeFieldStop();
1756
    oprot.writeStructEnd();
1594
    oprot.writeStructEnd();
1757
  }
1595
  }
1758
 
1596
 
1759
  @Override
1597
  @Override
Line 1888... Line 1726...
1888
      } else {
1726
      } else {
1889
        sb.append(this.customerName);
1727
        sb.append(this.customerName);
1890
      }
1728
      }
1891
      first = false;
1729
      first = false;
1892
    }
1730
    }
1893
    if (isSetCreator()) {
-
 
1894
      if (!first) sb.append(", ");
-
 
1895
      sb.append("creator:");
-
 
1896
      if (this.creator == null) {
-
 
1897
        sb.append("null");
-
 
1898
      } else {
-
 
1899
        sb.append(this.creator);
-
 
1900
      }
-
 
1901
      first = false;
-
 
1902
    }
-
 
1903
    if (isSetTicketAssignee()) {
-
 
1904
      if (!first) sb.append(", ");
-
 
1905
      sb.append("ticketAssignee:");
-
 
1906
      if (this.ticketAssignee == null) {
-
 
1907
        sb.append("null");
-
 
1908
      } else {
-
 
1909
        sb.append(this.ticketAssignee);
-
 
1910
      }
-
 
1911
      first = false;
-
 
1912
    }
-
 
1913
    sb.append(")");
1731
    sb.append(")");
1914
    return sb.toString();
1732
    return sb.toString();
1915
  }
1733
  }
1916
 
1734
 
1917
  public void validate() throws org.apache.thrift.TException {
1735
  public void validate() throws org.apache.thrift.TException {