Subversion Repositories SmartDukaan

Rev

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

Rev 1178 Rev 1302
Line 33... Line 33...
33
  private static final TField AIRWAYBILL_NO_FIELD_DESC = new TField("airwaybillNo", TType.STRING, (short)5);
33
  private static final TField AIRWAYBILL_NO_FIELD_DESC = new TField("airwaybillNo", TType.STRING, (short)5);
34
  private static final TField REPLY_TO_FIELD_DESC = new TField("replyTo", TType.STRING, (short)6);
34
  private static final TField REPLY_TO_FIELD_DESC = new TField("replyTo", TType.STRING, (short)6);
35
  private static final TField PRODUCT_NAME_FIELD_DESC = new TField("productName", TType.STRING, (short)7);
35
  private static final TField PRODUCT_NAME_FIELD_DESC = new TField("productName", TType.STRING, (short)7);
36
  private static final TField SUBJECT_FIELD_DESC = new TField("subject", TType.STRING, (short)8);
36
  private static final TField SUBJECT_FIELD_DESC = new TField("subject", TType.STRING, (short)8);
37
  private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRING, (short)9);
37
  private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRING, (short)9);
38
  private static final TField ADDED_AT_FIELD_DESC = new TField("addedAt", TType.I64, (short)10);
38
  private static final TField COMMUNICATION_TIMESTAMP_FIELD_DESC = new TField("communication_timestamp", TType.I64, (short)10);
39
 
39
 
40
  private long id;
40
  private long id;
41
  private long userId;
41
  private long userId;
42
  private UserCommunicationType communicationType;
42
  private UserCommunicationType communicationType;
43
  private long orderId;
43
  private long orderId;
44
  private String airwaybillNo;
44
  private String airwaybillNo;
45
  private String replyTo;
45
  private String replyTo;
46
  private String productName;
46
  private String productName;
47
  private String subject;
47
  private String subject;
48
  private String message;
48
  private String message;
49
  private long addedAt;
49
  private long communication_timestamp;
50
 
50
 
51
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
51
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
52
  public enum _Fields implements TFieldIdEnum {
52
  public enum _Fields implements TFieldIdEnum {
53
    ID((short)1, "id"),
53
    ID((short)1, "id"),
54
    USER_ID((short)2, "userId"),
54
    USER_ID((short)2, "userId"),
Line 61... Line 61...
61
    AIRWAYBILL_NO((short)5, "airwaybillNo"),
61
    AIRWAYBILL_NO((short)5, "airwaybillNo"),
62
    REPLY_TO((short)6, "replyTo"),
62
    REPLY_TO((short)6, "replyTo"),
63
    PRODUCT_NAME((short)7, "productName"),
63
    PRODUCT_NAME((short)7, "productName"),
64
    SUBJECT((short)8, "subject"),
64
    SUBJECT((short)8, "subject"),
65
    MESSAGE((short)9, "message"),
65
    MESSAGE((short)9, "message"),
66
    ADDED_AT((short)10, "addedAt");
66
    COMMUNICATION_TIMESTAMP((short)10, "communication_timestamp");
67
 
67
 
68
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
68
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
69
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
69
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
70
 
70
 
71
    static {
71
    static {
Line 118... Line 118...
118
 
118
 
119
  // isset id assignments
119
  // isset id assignments
120
  private static final int __ID_ISSET_ID = 0;
120
  private static final int __ID_ISSET_ID = 0;
121
  private static final int __USERID_ISSET_ID = 1;
121
  private static final int __USERID_ISSET_ID = 1;
122
  private static final int __ORDERID_ISSET_ID = 2;
122
  private static final int __ORDERID_ISSET_ID = 2;
123
  private static final int __ADDEDAT_ISSET_ID = 3;
123
  private static final int __COMMUNICATION_TIMESTAMP_ISSET_ID = 3;
124
  private BitSet __isset_bit_vector = new BitSet(4);
124
  private BitSet __isset_bit_vector = new BitSet(4);
125
 
125
 
126
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
126
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
127
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
127
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
128
        new FieldValueMetaData(TType.I64)));
128
        new FieldValueMetaData(TType.I64)));
Line 140... Line 140...
140
        new FieldValueMetaData(TType.STRING)));
140
        new FieldValueMetaData(TType.STRING)));
141
    put(_Fields.SUBJECT, new FieldMetaData("subject", TFieldRequirementType.DEFAULT, 
141
    put(_Fields.SUBJECT, new FieldMetaData("subject", TFieldRequirementType.DEFAULT, 
142
        new FieldValueMetaData(TType.STRING)));
142
        new FieldValueMetaData(TType.STRING)));
143
    put(_Fields.MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, 
143
    put(_Fields.MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, 
144
        new FieldValueMetaData(TType.STRING)));
144
        new FieldValueMetaData(TType.STRING)));
145
    put(_Fields.ADDED_AT, new FieldMetaData("addedAt", TFieldRequirementType.DEFAULT, 
145
    put(_Fields.COMMUNICATION_TIMESTAMP, new FieldMetaData("communication_timestamp", TFieldRequirementType.DEFAULT, 
146
        new FieldValueMetaData(TType.I64)));
146
        new FieldValueMetaData(TType.I64)));
147
  }});
147
  }});
148
 
148
 
149
  static {
149
  static {
150
    FieldMetaData.addStructMetaDataMap(UserCommunication.class, metaDataMap);
150
    FieldMetaData.addStructMetaDataMap(UserCommunication.class, metaDataMap);
Line 161... Line 161...
161
    String airwaybillNo,
161
    String airwaybillNo,
162
    String replyTo,
162
    String replyTo,
163
    String productName,
163
    String productName,
164
    String subject,
164
    String subject,
165
    String message,
165
    String message,
166
    long addedAt)
166
    long communication_timestamp)
167
  {
167
  {
168
    this();
168
    this();
169
    this.id = id;
169
    this.id = id;
170
    setIdIsSet(true);
170
    setIdIsSet(true);
171
    this.userId = userId;
171
    this.userId = userId;
Line 176... Line 176...
176
    this.airwaybillNo = airwaybillNo;
176
    this.airwaybillNo = airwaybillNo;
177
    this.replyTo = replyTo;
177
    this.replyTo = replyTo;
178
    this.productName = productName;
178
    this.productName = productName;
179
    this.subject = subject;
179
    this.subject = subject;
180
    this.message = message;
180
    this.message = message;
181
    this.addedAt = addedAt;
181
    this.communication_timestamp = communication_timestamp;
182
    setAddedAtIsSet(true);
182
    setCommunication_timestampIsSet(true);
183
  }
183
  }
184
 
184
 
185
  /**
185
  /**
186
   * Performs a deep copy on <i>other</i>.
186
   * Performs a deep copy on <i>other</i>.
187
   */
187
   */
Line 207... Line 207...
207
      this.subject = other.subject;
207
      this.subject = other.subject;
208
    }
208
    }
209
    if (other.isSetMessage()) {
209
    if (other.isSetMessage()) {
210
      this.message = other.message;
210
      this.message = other.message;
211
    }
211
    }
212
    this.addedAt = other.addedAt;
212
    this.communication_timestamp = other.communication_timestamp;
213
  }
213
  }
214
 
214
 
215
  public UserCommunication deepCopy() {
215
  public UserCommunication deepCopy() {
216
    return new UserCommunication(this);
216
    return new UserCommunication(this);
217
  }
217
  }
Line 440... Line 440...
440
    if (!value) {
440
    if (!value) {
441
      this.message = null;
441
      this.message = null;
442
    }
442
    }
443
  }
443
  }
444
 
444
 
445
  public long getAddedAt() {
445
  public long getCommunication_timestamp() {
446
    return this.addedAt;
446
    return this.communication_timestamp;
447
  }
447
  }
448
 
448
 
449
  public UserCommunication setAddedAt(long addedAt) {
449
  public UserCommunication setCommunication_timestamp(long communication_timestamp) {
450
    this.addedAt = addedAt;
450
    this.communication_timestamp = communication_timestamp;
451
    setAddedAtIsSet(true);
451
    setCommunication_timestampIsSet(true);
452
    return this;
452
    return this;
453
  }
453
  }
454
 
454
 
455
  public void unsetAddedAt() {
455
  public void unsetCommunication_timestamp() {
456
    __isset_bit_vector.clear(__ADDEDAT_ISSET_ID);
456
    __isset_bit_vector.clear(__COMMUNICATION_TIMESTAMP_ISSET_ID);
457
  }
457
  }
458
 
458
 
459
  /** Returns true if field addedAt is set (has been asigned a value) and false otherwise */
459
  /** Returns true if field communication_timestamp is set (has been asigned a value) and false otherwise */
460
  public boolean isSetAddedAt() {
460
  public boolean isSetCommunication_timestamp() {
461
    return __isset_bit_vector.get(__ADDEDAT_ISSET_ID);
461
    return __isset_bit_vector.get(__COMMUNICATION_TIMESTAMP_ISSET_ID);
462
  }
462
  }
463
 
463
 
464
  public void setAddedAtIsSet(boolean value) {
464
  public void setCommunication_timestampIsSet(boolean value) {
465
    __isset_bit_vector.set(__ADDEDAT_ISSET_ID, value);
465
    __isset_bit_vector.set(__COMMUNICATION_TIMESTAMP_ISSET_ID, value);
466
  }
466
  }
467
 
467
 
468
  public void setFieldValue(_Fields field, Object value) {
468
  public void setFieldValue(_Fields field, Object value) {
469
    switch (field) {
469
    switch (field) {
470
    case ID:
470
    case ID:
Line 537... Line 537...
537
      } else {
537
      } else {
538
        setMessage((String)value);
538
        setMessage((String)value);
539
      }
539
      }
540
      break;
540
      break;
541
 
541
 
542
    case ADDED_AT:
542
    case COMMUNICATION_TIMESTAMP:
543
      if (value == null) {
543
      if (value == null) {
544
        unsetAddedAt();
544
        unsetCommunication_timestamp();
545
      } else {
545
      } else {
546
        setAddedAt((Long)value);
546
        setCommunication_timestamp((Long)value);
547
      }
547
      }
548
      break;
548
      break;
549
 
549
 
550
    }
550
    }
551
  }
551
  }
Line 581... Line 581...
581
      return getSubject();
581
      return getSubject();
582
 
582
 
583
    case MESSAGE:
583
    case MESSAGE:
584
      return getMessage();
584
      return getMessage();
585
 
585
 
586
    case ADDED_AT:
586
    case COMMUNICATION_TIMESTAMP:
587
      return new Long(getAddedAt());
587
      return new Long(getCommunication_timestamp());
588
 
588
 
589
    }
589
    }
590
    throw new IllegalStateException();
590
    throw new IllegalStateException();
591
  }
591
  }
592
 
592
 
Line 613... Line 613...
613
      return isSetProductName();
613
      return isSetProductName();
614
    case SUBJECT:
614
    case SUBJECT:
615
      return isSetSubject();
615
      return isSetSubject();
616
    case MESSAGE:
616
    case MESSAGE:
617
      return isSetMessage();
617
      return isSetMessage();
618
    case ADDED_AT:
618
    case COMMUNICATION_TIMESTAMP:
619
      return isSetAddedAt();
619
      return isSetCommunication_timestamp();
620
    }
620
    }
621
    throw new IllegalStateException();
621
    throw new IllegalStateException();
622
  }
622
  }
623
 
623
 
624
  public boolean isSet(int fieldID) {
624
  public boolean isSet(int fieldID) {
Line 717... Line 717...
717
        return false;
717
        return false;
718
      if (!this.message.equals(that.message))
718
      if (!this.message.equals(that.message))
719
        return false;
719
        return false;
720
    }
720
    }
721
 
721
 
722
    boolean this_present_addedAt = true;
722
    boolean this_present_communication_timestamp = true;
723
    boolean that_present_addedAt = true;
723
    boolean that_present_communication_timestamp = true;
724
    if (this_present_addedAt || that_present_addedAt) {
724
    if (this_present_communication_timestamp || that_present_communication_timestamp) {
725
      if (!(this_present_addedAt && that_present_addedAt))
725
      if (!(this_present_communication_timestamp && that_present_communication_timestamp))
726
        return false;
726
        return false;
727
      if (this.addedAt != that.addedAt)
727
      if (this.communication_timestamp != that.communication_timestamp)
728
        return false;
728
        return false;
729
    }
729
    }
730
 
730
 
731
    return true;
731
    return true;
732
  }
732
  }
Line 814... Line 814...
814
    }
814
    }
815
    lastComparison = TBaseHelper.compareTo(message, typedOther.message);
815
    lastComparison = TBaseHelper.compareTo(message, typedOther.message);
816
    if (lastComparison != 0) {
816
    if (lastComparison != 0) {
817
      return lastComparison;
817
      return lastComparison;
818
    }
818
    }
819
    lastComparison = Boolean.valueOf(isSetAddedAt()).compareTo(isSetAddedAt());
819
    lastComparison = Boolean.valueOf(isSetCommunication_timestamp()).compareTo(isSetCommunication_timestamp());
820
    if (lastComparison != 0) {
820
    if (lastComparison != 0) {
821
      return lastComparison;
821
      return lastComparison;
822
    }
822
    }
823
    lastComparison = TBaseHelper.compareTo(addedAt, typedOther.addedAt);
823
    lastComparison = TBaseHelper.compareTo(communication_timestamp, typedOther.communication_timestamp);
824
    if (lastComparison != 0) {
824
    if (lastComparison != 0) {
825
      return lastComparison;
825
      return lastComparison;
826
    }
826
    }
827
    return 0;
827
    return 0;
828
  }
828
  }
Line 905... Line 905...
905
              this.message = iprot.readString();
905
              this.message = iprot.readString();
906
            } else { 
906
            } else { 
907
              TProtocolUtil.skip(iprot, field.type);
907
              TProtocolUtil.skip(iprot, field.type);
908
            }
908
            }
909
            break;
909
            break;
910
          case ADDED_AT:
910
          case COMMUNICATION_TIMESTAMP:
911
            if (field.type == TType.I64) {
911
            if (field.type == TType.I64) {
912
              this.addedAt = iprot.readI64();
912
              this.communication_timestamp = iprot.readI64();
913
              setAddedAtIsSet(true);
913
              setCommunication_timestampIsSet(true);
914
            } else { 
914
            } else { 
915
              TProtocolUtil.skip(iprot, field.type);
915
              TProtocolUtil.skip(iprot, field.type);
916
            }
916
            }
917
            break;
917
            break;
918
        }
918
        }
Line 964... Line 964...
964
    if (this.message != null) {
964
    if (this.message != null) {
965
      oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
965
      oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
966
      oprot.writeString(this.message);
966
      oprot.writeString(this.message);
967
      oprot.writeFieldEnd();
967
      oprot.writeFieldEnd();
968
    }
968
    }
969
    oprot.writeFieldBegin(ADDED_AT_FIELD_DESC);
969
    oprot.writeFieldBegin(COMMUNICATION_TIMESTAMP_FIELD_DESC);
970
    oprot.writeI64(this.addedAt);
970
    oprot.writeI64(this.communication_timestamp);
971
    oprot.writeFieldEnd();
971
    oprot.writeFieldEnd();
972
    oprot.writeFieldStop();
972
    oprot.writeFieldStop();
973
    oprot.writeStructEnd();
973
    oprot.writeStructEnd();
974
  }
974
  }
975
 
975
 
Line 1044... Line 1044...
1044
    } else {
1044
    } else {
1045
      sb.append(this.message);
1045
      sb.append(this.message);
1046
    }
1046
    }
1047
    first = false;
1047
    first = false;
1048
    if (!first) sb.append(", ");
1048
    if (!first) sb.append(", ");
1049
    sb.append("addedAt:");
1049
    sb.append("communication_timestamp:");
1050
    sb.append(this.addedAt);
1050
    sb.append(this.communication_timestamp);
1051
    first = false;
1051
    first = false;
1052
    sb.append(")");
1052
    sb.append(")");
1053
    return sb.toString();
1053
    return sb.toString();
1054
  }
1054
  }
1055
 
1055