Subversion Repositories SmartDukaan

Rev

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

Rev 3106 Rev 3168
Line 148... Line 148...
148
        new FieldValueMetaData(TType.I64)));
148
        new FieldValueMetaData(TType.I64)));
149
    put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
149
    put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
150
        new FieldValueMetaData(TType.I64)));
150
        new FieldValueMetaData(TType.I64)));
151
    put(_Fields.OPEN_DATE, new FieldMetaData("openDate", TFieldRequirementType.DEFAULT, 
151
    put(_Fields.OPEN_DATE, new FieldMetaData("openDate", TFieldRequirementType.DEFAULT, 
152
        new FieldValueMetaData(TType.I64)));
152
        new FieldValueMetaData(TType.I64)));
153
    put(_Fields.CLOSE_DATE, new FieldMetaData("closeDate", TFieldRequirementType.DEFAULT, 
153
    put(_Fields.CLOSE_DATE, new FieldMetaData("closeDate", TFieldRequirementType.OPTIONAL, 
154
        new FieldValueMetaData(TType.I64)));
154
        new FieldValueMetaData(TType.I64)));
155
    put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
155
    put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
156
        new FieldValueMetaData(TType.STRING)));
156
        new FieldValueMetaData(TType.STRING)));
157
    put(_Fields.PRIORITY, new FieldMetaData("priority", TFieldRequirementType.DEFAULT, 
157
    put(_Fields.PRIORITY, new FieldMetaData("priority", TFieldRequirementType.DEFAULT, 
158
        new EnumMetaData(TType.ENUM, TicketPriority.class)));
158
        new EnumMetaData(TType.ENUM, TicketPriority.class)));
159
    put(_Fields.CATEGORY, new FieldMetaData("category", TFieldRequirementType.DEFAULT, 
159
    put(_Fields.CATEGORY, new FieldMetaData("category", TFieldRequirementType.DEFAULT, 
160
        new EnumMetaData(TType.ENUM, TicketCategory.class)));
160
        new EnumMetaData(TType.ENUM, TicketCategory.class)));
161
    put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
161
    put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
162
        new EnumMetaData(TType.ENUM, TicketStatus.class)));
162
        new EnumMetaData(TType.ENUM, TicketStatus.class)));
163
    put(_Fields.ASSIGNEE_ID, new FieldMetaData("assigneeId", TFieldRequirementType.DEFAULT, 
163
    put(_Fields.ASSIGNEE_ID, new FieldMetaData("assigneeId", TFieldRequirementType.OPTIONAL, 
164
        new FieldValueMetaData(TType.I64)));
164
        new FieldValueMetaData(TType.I64)));
165
    put(_Fields.CREATOR_ID, new FieldMetaData("creatorId", TFieldRequirementType.DEFAULT, 
165
    put(_Fields.CREATOR_ID, new FieldMetaData("creatorId", TFieldRequirementType.DEFAULT, 
166
        new FieldValueMetaData(TType.I64)));
166
        new FieldValueMetaData(TType.I64)));
167
    put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
167
    put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.OPTIONAL, 
168
        new FieldValueMetaData(TType.I64)));
168
        new FieldValueMetaData(TType.I64)));
169
    put(_Fields.AIRWAY_BILL_NO, new FieldMetaData("airwayBillNo", TFieldRequirementType.DEFAULT, 
169
    put(_Fields.AIRWAY_BILL_NO, new FieldMetaData("airwayBillNo", TFieldRequirementType.OPTIONAL, 
170
        new FieldValueMetaData(TType.STRING)));
170
        new FieldValueMetaData(TType.STRING)));
171
    put(_Fields.PRODUCT_NAME, new FieldMetaData("productName", TFieldRequirementType.DEFAULT, 
171
    put(_Fields.PRODUCT_NAME, new FieldMetaData("productName", TFieldRequirementType.OPTIONAL, 
172
        new FieldValueMetaData(TType.STRING)));
172
        new FieldValueMetaData(TType.STRING)));
173
  }});
173
  }});
174
 
174
 
175
  static {
175
  static {
176
    FieldMetaData.addStructMetaDataMap(Ticket.class, metaDataMap);
176
    FieldMetaData.addStructMetaDataMap(Ticket.class, metaDataMap);
Line 181... Line 181...
181
 
181
 
182
  public Ticket(
182
  public Ticket(
183
    long id,
183
    long id,
184
    long customerId,
184
    long customerId,
185
    long openDate,
185
    long openDate,
186
    long closeDate,
-
 
187
    String description,
186
    String description,
188
    TicketPriority priority,
187
    TicketPriority priority,
189
    TicketCategory category,
188
    TicketCategory category,
190
    TicketStatus status,
189
    TicketStatus status,
191
    long assigneeId,
-
 
192
    long creatorId,
190
    long creatorId)
193
    long orderId,
-
 
194
    String airwayBillNo,
-
 
195
    String productName)
-
 
196
  {
191
  {
197
    this();
192
    this();
198
    this.id = id;
193
    this.id = id;
199
    setIdIsSet(true);
194
    setIdIsSet(true);
200
    this.customerId = customerId;
195
    this.customerId = customerId;
201
    setCustomerIdIsSet(true);
196
    setCustomerIdIsSet(true);
202
    this.openDate = openDate;
197
    this.openDate = openDate;
203
    setOpenDateIsSet(true);
198
    setOpenDateIsSet(true);
204
    this.closeDate = closeDate;
-
 
205
    setCloseDateIsSet(true);
-
 
206
    this.description = description;
199
    this.description = description;
207
    this.priority = priority;
200
    this.priority = priority;
208
    this.category = category;
201
    this.category = category;
209
    this.status = status;
202
    this.status = status;
210
    this.assigneeId = assigneeId;
-
 
211
    setAssigneeIdIsSet(true);
-
 
212
    this.creatorId = creatorId;
203
    this.creatorId = creatorId;
213
    setCreatorIdIsSet(true);
204
    setCreatorIdIsSet(true);
214
    this.orderId = orderId;
-
 
215
    setOrderIdIsSet(true);
-
 
216
    this.airwayBillNo = airwayBillNo;
-
 
217
    this.productName = productName;
-
 
218
  }
205
  }
219
 
206
 
220
  /**
207
  /**
221
   * Performs a deep copy on <i>other</i>.
208
   * Performs a deep copy on <i>other</i>.
222
   */
209
   */
Line 825... Line 812...
825
        return false;
812
        return false;
826
      if (this.openDate != that.openDate)
813
      if (this.openDate != that.openDate)
827
        return false;
814
        return false;
828
    }
815
    }
829
 
816
 
830
    boolean this_present_closeDate = true;
817
    boolean this_present_closeDate = true && this.isSetCloseDate();
831
    boolean that_present_closeDate = true;
818
    boolean that_present_closeDate = true && that.isSetCloseDate();
832
    if (this_present_closeDate || that_present_closeDate) {
819
    if (this_present_closeDate || that_present_closeDate) {
833
      if (!(this_present_closeDate && that_present_closeDate))
820
      if (!(this_present_closeDate && that_present_closeDate))
834
        return false;
821
        return false;
835
      if (this.closeDate != that.closeDate)
822
      if (this.closeDate != that.closeDate)
836
        return false;
823
        return false;
Line 870... Line 857...
870
        return false;
857
        return false;
871
      if (!this.status.equals(that.status))
858
      if (!this.status.equals(that.status))
872
        return false;
859
        return false;
873
    }
860
    }
874
 
861
 
875
    boolean this_present_assigneeId = true;
862
    boolean this_present_assigneeId = true && this.isSetAssigneeId();
876
    boolean that_present_assigneeId = true;
863
    boolean that_present_assigneeId = true && that.isSetAssigneeId();
877
    if (this_present_assigneeId || that_present_assigneeId) {
864
    if (this_present_assigneeId || that_present_assigneeId) {
878
      if (!(this_present_assigneeId && that_present_assigneeId))
865
      if (!(this_present_assigneeId && that_present_assigneeId))
879
        return false;
866
        return false;
880
      if (this.assigneeId != that.assigneeId)
867
      if (this.assigneeId != that.assigneeId)
881
        return false;
868
        return false;
Line 888... Line 875...
888
        return false;
875
        return false;
889
      if (this.creatorId != that.creatorId)
876
      if (this.creatorId != that.creatorId)
890
        return false;
877
        return false;
891
    }
878
    }
892
 
879
 
893
    boolean this_present_orderId = true;
880
    boolean this_present_orderId = true && this.isSetOrderId();
894
    boolean that_present_orderId = true;
881
    boolean that_present_orderId = true && that.isSetOrderId();
895
    if (this_present_orderId || that_present_orderId) {
882
    if (this_present_orderId || that_present_orderId) {
896
      if (!(this_present_orderId && that_present_orderId))
883
      if (!(this_present_orderId && that_present_orderId))
897
        return false;
884
        return false;
898
      if (this.orderId != that.orderId)
885
      if (this.orderId != that.orderId)
899
        return false;
886
        return false;
Line 1171... Line 1158...
1171
    oprot.writeI64(this.customerId);
1158
    oprot.writeI64(this.customerId);
1172
    oprot.writeFieldEnd();
1159
    oprot.writeFieldEnd();
1173
    oprot.writeFieldBegin(OPEN_DATE_FIELD_DESC);
1160
    oprot.writeFieldBegin(OPEN_DATE_FIELD_DESC);
1174
    oprot.writeI64(this.openDate);
1161
    oprot.writeI64(this.openDate);
1175
    oprot.writeFieldEnd();
1162
    oprot.writeFieldEnd();
-
 
1163
    if (isSetCloseDate()) {
1176
    oprot.writeFieldBegin(CLOSE_DATE_FIELD_DESC);
1164
      oprot.writeFieldBegin(CLOSE_DATE_FIELD_DESC);
1177
    oprot.writeI64(this.closeDate);
1165
      oprot.writeI64(this.closeDate);
1178
    oprot.writeFieldEnd();
1166
      oprot.writeFieldEnd();
-
 
1167
    }
1179
    if (this.description != null) {
1168
    if (this.description != null) {
1180
      oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
1169
      oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
1181
      oprot.writeString(this.description);
1170
      oprot.writeString(this.description);
1182
      oprot.writeFieldEnd();
1171
      oprot.writeFieldEnd();
1183
    }
1172
    }
Line 1194... Line 1183...
1194
    if (this.status != null) {
1183
    if (this.status != null) {
1195
      oprot.writeFieldBegin(STATUS_FIELD_DESC);
1184
      oprot.writeFieldBegin(STATUS_FIELD_DESC);
1196
      oprot.writeI32(this.status.getValue());
1185
      oprot.writeI32(this.status.getValue());
1197
      oprot.writeFieldEnd();
1186
      oprot.writeFieldEnd();
1198
    }
1187
    }
-
 
1188
    if (isSetAssigneeId()) {
1199
    oprot.writeFieldBegin(ASSIGNEE_ID_FIELD_DESC);
1189
      oprot.writeFieldBegin(ASSIGNEE_ID_FIELD_DESC);
1200
    oprot.writeI64(this.assigneeId);
1190
      oprot.writeI64(this.assigneeId);
1201
    oprot.writeFieldEnd();
1191
      oprot.writeFieldEnd();
-
 
1192
    }
1202
    oprot.writeFieldBegin(CREATOR_ID_FIELD_DESC);
1193
    oprot.writeFieldBegin(CREATOR_ID_FIELD_DESC);
1203
    oprot.writeI64(this.creatorId);
1194
    oprot.writeI64(this.creatorId);
1204
    oprot.writeFieldEnd();
1195
    oprot.writeFieldEnd();
1205
    oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
-
 
1206
    oprot.writeI64(this.orderId);
-
 
1207
    oprot.writeFieldEnd();
1196
    if (isSetOrderId()) {
1208
    if (this.airwayBillNo != null) {
-
 
1209
      oprot.writeFieldBegin(AIRWAY_BILL_NO_FIELD_DESC);
1197
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
1210
      oprot.writeString(this.airwayBillNo);
1198
      oprot.writeI64(this.orderId);
1211
      oprot.writeFieldEnd();
1199
      oprot.writeFieldEnd();
1212
    }
1200
    }
-
 
1201
    if (this.airwayBillNo != null) {
-
 
1202
      if (isSetAirwayBillNo()) {
-
 
1203
        oprot.writeFieldBegin(AIRWAY_BILL_NO_FIELD_DESC);
-
 
1204
        oprot.writeString(this.airwayBillNo);
-
 
1205
        oprot.writeFieldEnd();
-
 
1206
      }
-
 
1207
    }
1213
    if (this.productName != null) {
1208
    if (this.productName != null) {
-
 
1209
      if (isSetProductName()) {
1214
      oprot.writeFieldBegin(PRODUCT_NAME_FIELD_DESC);
1210
        oprot.writeFieldBegin(PRODUCT_NAME_FIELD_DESC);
1215
      oprot.writeString(this.productName);
1211
        oprot.writeString(this.productName);
1216
      oprot.writeFieldEnd();
1212
        oprot.writeFieldEnd();
-
 
1213
      }
1217
    }
1214
    }
1218
    oprot.writeFieldStop();
1215
    oprot.writeFieldStop();
1219
    oprot.writeStructEnd();
1216
    oprot.writeStructEnd();
1220
  }
1217
  }
1221
 
1218
 
Line 1233... Line 1230...
1233
    first = false;
1230
    first = false;
1234
    if (!first) sb.append(", ");
1231
    if (!first) sb.append(", ");
1235
    sb.append("openDate:");
1232
    sb.append("openDate:");
1236
    sb.append(this.openDate);
1233
    sb.append(this.openDate);
1237
    first = false;
1234
    first = false;
-
 
1235
    if (isSetCloseDate()) {
1238
    if (!first) sb.append(", ");
1236
      if (!first) sb.append(", ");
1239
    sb.append("closeDate:");
1237
      sb.append("closeDate:");
1240
    sb.append(this.closeDate);
1238
      sb.append(this.closeDate);
1241
    first = false;
1239
      first = false;
-
 
1240
    }
1242
    if (!first) sb.append(", ");
1241
    if (!first) sb.append(", ");
1243
    sb.append("description:");
1242
    sb.append("description:");
1244
    if (this.description == null) {
1243
    if (this.description == null) {
1245
      sb.append("null");
1244
      sb.append("null");
1246
    } else {
1245
    } else {
Line 1293... Line 1292...
1293
      if (status_name != null) {
1292
      if (status_name != null) {
1294
        sb.append(")");
1293
        sb.append(")");
1295
      }
1294
      }
1296
    }
1295
    }
1297
    first = false;
1296
    first = false;
-
 
1297
    if (isSetAssigneeId()) {
1298
    if (!first) sb.append(", ");
1298
      if (!first) sb.append(", ");
1299
    sb.append("assigneeId:");
1299
      sb.append("assigneeId:");
1300
    sb.append(this.assigneeId);
1300
      sb.append(this.assigneeId);
1301
    first = false;
1301
      first = false;
-
 
1302
    }
1302
    if (!first) sb.append(", ");
1303
    if (!first) sb.append(", ");
1303
    sb.append("creatorId:");
1304
    sb.append("creatorId:");
1304
    sb.append(this.creatorId);
1305
    sb.append(this.creatorId);
1305
    first = false;
1306
    first = false;
-
 
1307
    if (isSetOrderId()) {
1306
    if (!first) sb.append(", ");
1308
      if (!first) sb.append(", ");
1307
    sb.append("orderId:");
1309
      sb.append("orderId:");
1308
    sb.append(this.orderId);
1310
      sb.append(this.orderId);
1309
    first = false;
1311
      first = false;
-
 
1312
    }
-
 
1313
    if (isSetAirwayBillNo()) {
1310
    if (!first) sb.append(", ");
1314
      if (!first) sb.append(", ");
1311
    sb.append("airwayBillNo:");
1315
      sb.append("airwayBillNo:");
1312
    if (this.airwayBillNo == null) {
1316
      if (this.airwayBillNo == null) {
1313
      sb.append("null");
1317
        sb.append("null");
1314
    } else {
1318
      } else {
1315
      sb.append(this.airwayBillNo);
1319
        sb.append(this.airwayBillNo);
-
 
1320
      }
-
 
1321
      first = false;
1316
    }
1322
    }
1317
    first = false;
1323
    if (isSetProductName()) {
1318
    if (!first) sb.append(", ");
1324
      if (!first) sb.append(", ");
1319
    sb.append("productName:");
1325
      sb.append("productName:");
1320
    if (this.productName == null) {
1326
      if (this.productName == null) {
1321
      sb.append("null");
1327
        sb.append("null");
1322
    } else {
1328
      } else {
1323
      sb.append(this.productName);
1329
        sb.append(this.productName);
-
 
1330
      }
-
 
1331
      first = false;
1324
    }
1332
    }
1325
    first = false;
-
 
1326
    sb.append(")");
1333
    sb.append(")");
1327
    return sb.toString();
1334
    return sb.toString();
1328
  }
1335
  }
1329
 
1336
 
1330
  public void validate() throws TException {
1337
  public void validate() throws TException {