Subversion Repositories SmartDukaan

Rev

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

Rev 2642 Rev 2717
Line 229... Line 229...
229
     * void updateWidgetItem(1:i64 widgetId, 2:bool enable) throws (1:WidgetException scx),
229
     * void updateWidgetItem(1:i64 widgetId, 2:bool enable) throws (1:WidgetException scx),
230
     * Widget getWidget(1:WidgetType type, 2:i64 userId, 3:bool onlyEnabled) throws (1:WidgetException scx),
230
     * Widget getWidget(1:WidgetType type, 2:i64 userId, 3:bool onlyEnabled) throws (1:WidgetException scx),
231
     * 
231
     * 
232
     * @param user_id
232
     * @param user_id
233
     * @param entity_id
233
     * @param entity_id
234
     * @param slide_id
234
     * @param slide
235
     * @param note
235
     * @param note
236
     */
236
     */
237
    public void putUserNote(long user_id, long entity_id, long slide_id, String note) throws TException;
237
    public void putUserNote(long user_id, long entity_id, String slide, String note) throws TException;
238
 
238
 
239
    public List<UserNote> getUserNotes(long user_id, long entity_id) throws TException;
239
    public List<UserNote> getUserNotes(long user_id, long entity_id) throws TException;
240
 
240
 
241
  }
241
  }
242
 
242
 
Line 2635... Line 2635...
2635
        return result.success;
2635
        return result.success;
2636
      }
2636
      }
2637
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAllUsers failed: unknown result");
2637
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAllUsers failed: unknown result");
2638
    }
2638
    }
2639
 
2639
 
2640
    public void putUserNote(long user_id, long entity_id, long slide_id, String note) throws TException
2640
    public void putUserNote(long user_id, long entity_id, String slide, String note) throws TException
2641
    {
2641
    {
2642
      send_putUserNote(user_id, entity_id, slide_id, note);
2642
      send_putUserNote(user_id, entity_id, slide, note);
2643
      recv_putUserNote();
2643
      recv_putUserNote();
2644
    }
2644
    }
2645
 
2645
 
2646
    public void send_putUserNote(long user_id, long entity_id, long slide_id, String note) throws TException
2646
    public void send_putUserNote(long user_id, long entity_id, String slide, String note) throws TException
2647
    {
2647
    {
2648
      oprot_.writeMessageBegin(new TMessage("putUserNote", TMessageType.CALL, seqid_));
2648
      oprot_.writeMessageBegin(new TMessage("putUserNote", TMessageType.CALL, seqid_));
2649
      putUserNote_args args = new putUserNote_args();
2649
      putUserNote_args args = new putUserNote_args();
2650
      args.user_id = user_id;
2650
      args.user_id = user_id;
2651
      args.entity_id = entity_id;
2651
      args.entity_id = entity_id;
2652
      args.slide_id = slide_id;
2652
      args.slide = slide;
2653
      args.note = note;
2653
      args.note = note;
2654
      args.write(oprot_);
2654
      args.write(oprot_);
2655
      oprot_.writeMessageEnd();
2655
      oprot_.writeMessageEnd();
2656
      oprot_.getTransport().flush();
2656
      oprot_.getTransport().flush();
2657
    }
2657
    }
Line 4604... Line 4604...
4604
      {
4604
      {
4605
        putUserNote_args args = new putUserNote_args();
4605
        putUserNote_args args = new putUserNote_args();
4606
        args.read(iprot);
4606
        args.read(iprot);
4607
        iprot.readMessageEnd();
4607
        iprot.readMessageEnd();
4608
        putUserNote_result result = new putUserNote_result();
4608
        putUserNote_result result = new putUserNote_result();
4609
        iface_.putUserNote(args.user_id, args.entity_id, args.slide_id, args.note);
4609
        iface_.putUserNote(args.user_id, args.entity_id, args.slide, args.note);
4610
        oprot.writeMessageBegin(new TMessage("putUserNote", TMessageType.REPLY, seqid));
4610
        oprot.writeMessageBegin(new TMessage("putUserNote", TMessageType.REPLY, seqid));
4611
        result.write(oprot);
4611
        result.write(oprot);
4612
        oprot.writeMessageEnd();
4612
        oprot.writeMessageEnd();
4613
        oprot.getTransport().flush();
4613
        oprot.getTransport().flush();
4614
      }
4614
      }
Line 50000... Line 50000...
50000
  public static class putUserNote_args implements TBase<putUserNote_args._Fields>, java.io.Serializable, Cloneable, Comparable<putUserNote_args>   {
50000
  public static class putUserNote_args implements TBase<putUserNote_args._Fields>, java.io.Serializable, Cloneable, Comparable<putUserNote_args>   {
50001
    private static final TStruct STRUCT_DESC = new TStruct("putUserNote_args");
50001
    private static final TStruct STRUCT_DESC = new TStruct("putUserNote_args");
50002
 
50002
 
50003
    private static final TField USER_ID_FIELD_DESC = new TField("user_id", TType.I64, (short)1);
50003
    private static final TField USER_ID_FIELD_DESC = new TField("user_id", TType.I64, (short)1);
50004
    private static final TField ENTITY_ID_FIELD_DESC = new TField("entity_id", TType.I64, (short)2);
50004
    private static final TField ENTITY_ID_FIELD_DESC = new TField("entity_id", TType.I64, (short)2);
50005
    private static final TField SLIDE_ID_FIELD_DESC = new TField("slide_id", TType.I64, (short)3);
50005
    private static final TField SLIDE_FIELD_DESC = new TField("slide", TType.STRING, (short)3);
50006
    private static final TField NOTE_FIELD_DESC = new TField("note", TType.STRING, (short)4);
50006
    private static final TField NOTE_FIELD_DESC = new TField("note", TType.STRING, (short)4);
50007
 
50007
 
50008
    private long user_id;
50008
    private long user_id;
50009
    private long entity_id;
50009
    private long entity_id;
50010
    private long slide_id;
50010
    private String slide;
50011
    private String note;
50011
    private String note;
50012
 
50012
 
50013
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
50013
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
50014
    public enum _Fields implements TFieldIdEnum {
50014
    public enum _Fields implements TFieldIdEnum {
50015
      USER_ID((short)1, "user_id"),
50015
      USER_ID((short)1, "user_id"),
50016
      ENTITY_ID((short)2, "entity_id"),
50016
      ENTITY_ID((short)2, "entity_id"),
50017
      SLIDE_ID((short)3, "slide_id"),
50017
      SLIDE((short)3, "slide"),
50018
      NOTE((short)4, "note");
50018
      NOTE((short)4, "note");
50019
 
50019
 
50020
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
50020
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
50021
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
50021
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
50022
 
50022
 
Line 50069... Line 50069...
50069
    }
50069
    }
50070
 
50070
 
50071
    // isset id assignments
50071
    // isset id assignments
50072
    private static final int __USER_ID_ISSET_ID = 0;
50072
    private static final int __USER_ID_ISSET_ID = 0;
50073
    private static final int __ENTITY_ID_ISSET_ID = 1;
50073
    private static final int __ENTITY_ID_ISSET_ID = 1;
50074
    private static final int __SLIDE_ID_ISSET_ID = 2;
-
 
50075
    private BitSet __isset_bit_vector = new BitSet(3);
50074
    private BitSet __isset_bit_vector = new BitSet(2);
50076
 
50075
 
50077
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
50076
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
50078
      put(_Fields.USER_ID, new FieldMetaData("user_id", TFieldRequirementType.DEFAULT, 
50077
      put(_Fields.USER_ID, new FieldMetaData("user_id", TFieldRequirementType.DEFAULT, 
50079
          new FieldValueMetaData(TType.I64)));
50078
          new FieldValueMetaData(TType.I64)));
50080
      put(_Fields.ENTITY_ID, new FieldMetaData("entity_id", TFieldRequirementType.DEFAULT, 
50079
      put(_Fields.ENTITY_ID, new FieldMetaData("entity_id", TFieldRequirementType.DEFAULT, 
50081
          new FieldValueMetaData(TType.I64)));
50080
          new FieldValueMetaData(TType.I64)));
50082
      put(_Fields.SLIDE_ID, new FieldMetaData("slide_id", TFieldRequirementType.DEFAULT, 
50081
      put(_Fields.SLIDE, new FieldMetaData("slide", TFieldRequirementType.DEFAULT, 
50083
          new FieldValueMetaData(TType.I64)));
50082
          new FieldValueMetaData(TType.STRING)));
50084
      put(_Fields.NOTE, new FieldMetaData("note", TFieldRequirementType.DEFAULT, 
50083
      put(_Fields.NOTE, new FieldMetaData("note", TFieldRequirementType.DEFAULT, 
50085
          new FieldValueMetaData(TType.STRING)));
50084
          new FieldValueMetaData(TType.STRING)));
50086
    }});
50085
    }});
50087
 
50086
 
50088
    static {
50087
    static {
Line 50093... Line 50092...
50093
    }
50092
    }
50094
 
50093
 
50095
    public putUserNote_args(
50094
    public putUserNote_args(
50096
      long user_id,
50095
      long user_id,
50097
      long entity_id,
50096
      long entity_id,
50098
      long slide_id,
50097
      String slide,
50099
      String note)
50098
      String note)
50100
    {
50099
    {
50101
      this();
50100
      this();
50102
      this.user_id = user_id;
50101
      this.user_id = user_id;
50103
      setUser_idIsSet(true);
50102
      setUser_idIsSet(true);
50104
      this.entity_id = entity_id;
50103
      this.entity_id = entity_id;
50105
      setEntity_idIsSet(true);
50104
      setEntity_idIsSet(true);
50106
      this.slide_id = slide_id;
50105
      this.slide = slide;
50107
      setSlide_idIsSet(true);
-
 
50108
      this.note = note;
50106
      this.note = note;
50109
    }
50107
    }
50110
 
50108
 
50111
    /**
50109
    /**
50112
     * Performs a deep copy on <i>other</i>.
50110
     * Performs a deep copy on <i>other</i>.
Line 50114... Line 50112...
50114
    public putUserNote_args(putUserNote_args other) {
50112
    public putUserNote_args(putUserNote_args other) {
50115
      __isset_bit_vector.clear();
50113
      __isset_bit_vector.clear();
50116
      __isset_bit_vector.or(other.__isset_bit_vector);
50114
      __isset_bit_vector.or(other.__isset_bit_vector);
50117
      this.user_id = other.user_id;
50115
      this.user_id = other.user_id;
50118
      this.entity_id = other.entity_id;
50116
      this.entity_id = other.entity_id;
-
 
50117
      if (other.isSetSlide()) {
50119
      this.slide_id = other.slide_id;
50118
        this.slide = other.slide;
-
 
50119
      }
50120
      if (other.isSetNote()) {
50120
      if (other.isSetNote()) {
50121
        this.note = other.note;
50121
        this.note = other.note;
50122
      }
50122
      }
50123
    }
50123
    }
50124
 
50124
 
Line 50175... Line 50175...
50175
 
50175
 
50176
    public void setEntity_idIsSet(boolean value) {
50176
    public void setEntity_idIsSet(boolean value) {
50177
      __isset_bit_vector.set(__ENTITY_ID_ISSET_ID, value);
50177
      __isset_bit_vector.set(__ENTITY_ID_ISSET_ID, value);
50178
    }
50178
    }
50179
 
50179
 
50180
    public long getSlide_id() {
50180
    public String getSlide() {
50181
      return this.slide_id;
50181
      return this.slide;
50182
    }
50182
    }
50183
 
50183
 
50184
    public putUserNote_args setSlide_id(long slide_id) {
50184
    public putUserNote_args setSlide(String slide) {
50185
      this.slide_id = slide_id;
50185
      this.slide = slide;
50186
      setSlide_idIsSet(true);
-
 
50187
      return this;
50186
      return this;
50188
    }
50187
    }
50189
 
50188
 
50190
    public void unsetSlide_id() {
50189
    public void unsetSlide() {
50191
      __isset_bit_vector.clear(__SLIDE_ID_ISSET_ID);
50190
      this.slide = null;
50192
    }
50191
    }
50193
 
50192
 
50194
    /** Returns true if field slide_id is set (has been asigned a value) and false otherwise */
50193
    /** Returns true if field slide is set (has been asigned a value) and false otherwise */
50195
    public boolean isSetSlide_id() {
50194
    public boolean isSetSlide() {
50196
      return __isset_bit_vector.get(__SLIDE_ID_ISSET_ID);
50195
      return this.slide != null;
50197
    }
50196
    }
50198
 
50197
 
50199
    public void setSlide_idIsSet(boolean value) {
50198
    public void setSlideIsSet(boolean value) {
-
 
50199
      if (!value) {
50200
      __isset_bit_vector.set(__SLIDE_ID_ISSET_ID, value);
50200
        this.slide = null;
-
 
50201
      }
50201
    }
50202
    }
50202
 
50203
 
50203
    public String getNote() {
50204
    public String getNote() {
50204
      return this.note;
50205
      return this.note;
50205
    }
50206
    }
Line 50240... Line 50241...
50240
        } else {
50241
        } else {
50241
          setEntity_id((Long)value);
50242
          setEntity_id((Long)value);
50242
        }
50243
        }
50243
        break;
50244
        break;
50244
 
50245
 
50245
      case SLIDE_ID:
50246
      case SLIDE:
50246
        if (value == null) {
50247
        if (value == null) {
50247
          unsetSlide_id();
50248
          unsetSlide();
50248
        } else {
50249
        } else {
50249
          setSlide_id((Long)value);
50250
          setSlide((String)value);
50250
        }
50251
        }
50251
        break;
50252
        break;
50252
 
50253
 
50253
      case NOTE:
50254
      case NOTE:
50254
        if (value == null) {
50255
        if (value == null) {
Line 50271... Line 50272...
50271
        return new Long(getUser_id());
50272
        return new Long(getUser_id());
50272
 
50273
 
50273
      case ENTITY_ID:
50274
      case ENTITY_ID:
50274
        return new Long(getEntity_id());
50275
        return new Long(getEntity_id());
50275
 
50276
 
50276
      case SLIDE_ID:
50277
      case SLIDE:
50277
        return new Long(getSlide_id());
50278
        return getSlide();
50278
 
50279
 
50279
      case NOTE:
50280
      case NOTE:
50280
        return getNote();
50281
        return getNote();
50281
 
50282
 
50282
      }
50283
      }
Line 50292... Line 50293...
50292
      switch (field) {
50293
      switch (field) {
50293
      case USER_ID:
50294
      case USER_ID:
50294
        return isSetUser_id();
50295
        return isSetUser_id();
50295
      case ENTITY_ID:
50296
      case ENTITY_ID:
50296
        return isSetEntity_id();
50297
        return isSetEntity_id();
50297
      case SLIDE_ID:
50298
      case SLIDE:
50298
        return isSetSlide_id();
50299
        return isSetSlide();
50299
      case NOTE:
50300
      case NOTE:
50300
        return isSetNote();
50301
        return isSetNote();
50301
      }
50302
      }
50302
      throw new IllegalStateException();
50303
      throw new IllegalStateException();
50303
    }
50304
    }
Line 50335... Line 50336...
50335
          return false;
50336
          return false;
50336
        if (this.entity_id != that.entity_id)
50337
        if (this.entity_id != that.entity_id)
50337
          return false;
50338
          return false;
50338
      }
50339
      }
50339
 
50340
 
50340
      boolean this_present_slide_id = true;
50341
      boolean this_present_slide = true && this.isSetSlide();
50341
      boolean that_present_slide_id = true;
50342
      boolean that_present_slide = true && that.isSetSlide();
50342
      if (this_present_slide_id || that_present_slide_id) {
50343
      if (this_present_slide || that_present_slide) {
50343
        if (!(this_present_slide_id && that_present_slide_id))
50344
        if (!(this_present_slide && that_present_slide))
50344
          return false;
50345
          return false;
50345
        if (this.slide_id != that.slide_id)
50346
        if (!this.slide.equals(that.slide))
50346
          return false;
50347
          return false;
50347
      }
50348
      }
50348
 
50349
 
50349
      boolean this_present_note = true && this.isSetNote();
50350
      boolean this_present_note = true && this.isSetNote();
50350
      boolean that_present_note = true && that.isSetNote();
50351
      boolean that_present_note = true && that.isSetNote();
Line 50385... Line 50386...
50385
      }
50386
      }
50386
      lastComparison = TBaseHelper.compareTo(entity_id, typedOther.entity_id);
50387
      lastComparison = TBaseHelper.compareTo(entity_id, typedOther.entity_id);
50387
      if (lastComparison != 0) {
50388
      if (lastComparison != 0) {
50388
        return lastComparison;
50389
        return lastComparison;
50389
      }
50390
      }
50390
      lastComparison = Boolean.valueOf(isSetSlide_id()).compareTo(isSetSlide_id());
50391
      lastComparison = Boolean.valueOf(isSetSlide()).compareTo(isSetSlide());
50391
      if (lastComparison != 0) {
50392
      if (lastComparison != 0) {
50392
        return lastComparison;
50393
        return lastComparison;
50393
      }
50394
      }
50394
      lastComparison = TBaseHelper.compareTo(slide_id, typedOther.slide_id);
50395
      lastComparison = TBaseHelper.compareTo(slide, typedOther.slide);
50395
      if (lastComparison != 0) {
50396
      if (lastComparison != 0) {
50396
        return lastComparison;
50397
        return lastComparison;
50397
      }
50398
      }
50398
      lastComparison = Boolean.valueOf(isSetNote()).compareTo(isSetNote());
50399
      lastComparison = Boolean.valueOf(isSetNote()).compareTo(isSetNote());
50399
      if (lastComparison != 0) {
50400
      if (lastComparison != 0) {
Line 50434... Line 50435...
50434
                setEntity_idIsSet(true);
50435
                setEntity_idIsSet(true);
50435
              } else { 
50436
              } else { 
50436
                TProtocolUtil.skip(iprot, field.type);
50437
                TProtocolUtil.skip(iprot, field.type);
50437
              }
50438
              }
50438
              break;
50439
              break;
50439
            case SLIDE_ID:
50440
            case SLIDE:
50440
              if (field.type == TType.I64) {
50441
              if (field.type == TType.STRING) {
50441
                this.slide_id = iprot.readI64();
50442
                this.slide = iprot.readString();
50442
                setSlide_idIsSet(true);
-
 
50443
              } else { 
50443
              } else { 
50444
                TProtocolUtil.skip(iprot, field.type);
50444
                TProtocolUtil.skip(iprot, field.type);
50445
              }
50445
              }
50446
              break;
50446
              break;
50447
            case NOTE:
50447
            case NOTE:
Line 50467... Line 50467...
50467
      oprot.writeI64(this.user_id);
50467
      oprot.writeI64(this.user_id);
50468
      oprot.writeFieldEnd();
50468
      oprot.writeFieldEnd();
50469
      oprot.writeFieldBegin(ENTITY_ID_FIELD_DESC);
50469
      oprot.writeFieldBegin(ENTITY_ID_FIELD_DESC);
50470
      oprot.writeI64(this.entity_id);
50470
      oprot.writeI64(this.entity_id);
50471
      oprot.writeFieldEnd();
50471
      oprot.writeFieldEnd();
-
 
50472
      if (this.slide != null) {
50472
      oprot.writeFieldBegin(SLIDE_ID_FIELD_DESC);
50473
        oprot.writeFieldBegin(SLIDE_FIELD_DESC);
50473
      oprot.writeI64(this.slide_id);
50474
        oprot.writeString(this.slide);
50474
      oprot.writeFieldEnd();
50475
        oprot.writeFieldEnd();
-
 
50476
      }
50475
      if (this.note != null) {
50477
      if (this.note != null) {
50476
        oprot.writeFieldBegin(NOTE_FIELD_DESC);
50478
        oprot.writeFieldBegin(NOTE_FIELD_DESC);
50477
        oprot.writeString(this.note);
50479
        oprot.writeString(this.note);
50478
        oprot.writeFieldEnd();
50480
        oprot.writeFieldEnd();
50479
      }
50481
      }
Line 50492... Line 50494...
50492
      if (!first) sb.append(", ");
50494
      if (!first) sb.append(", ");
50493
      sb.append("entity_id:");
50495
      sb.append("entity_id:");
50494
      sb.append(this.entity_id);
50496
      sb.append(this.entity_id);
50495
      first = false;
50497
      first = false;
50496
      if (!first) sb.append(", ");
50498
      if (!first) sb.append(", ");
50497
      sb.append("slide_id:");
50499
      sb.append("slide:");
-
 
50500
      if (this.slide == null) {
-
 
50501
        sb.append("null");
-
 
50502
      } else {
50498
      sb.append(this.slide_id);
50503
        sb.append(this.slide);
-
 
50504
      }
50499
      first = false;
50505
      first = false;
50500
      if (!first) sb.append(", ");
50506
      if (!first) sb.append(", ");
50501
      sb.append("note:");
50507
      sb.append("note:");
50502
      if (this.note == null) {
50508
      if (this.note == null) {
50503
        sb.append("null");
50509
        sb.append("null");