Subversion Repositories SmartDukaan

Rev

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

Rev 1859 Rev 1891
Line 523... Line 523...
523
    Parameters:
523
    Parameters:
524
     - userType
524
     - userType
525
    """
525
    """
526
    pass
526
    pass
527
 
527
 
528
  def getAllUsers(self, userType):
528
  def getAllUsers(self, userType, startDate, endDate):
529
    """
529
    """
530
    Returns list of users of type userType. If userType is null, then returns all the users.
530
    Returns list of users of type userType who registered between startDate and endDate (both inclusive).
-
 
531
    If any of startDate or endDate is -1, then that filter is ignored.
-
 
532
    If userType is null, then returns all the users, irrespective of anonymous flag
-
 
533
    
531
    
534
    
532
    Parameters:
535
    Parameters:
533
     - userType
536
     - userType
-
 
537
     - startDate
-
 
538
     - endDate
534
    """
539
    """
535
    pass
540
    pass
536
 
541
 
537
 
542
 
538
class Client(Iface):
543
class Client(Iface):
Line 2638... Line 2643...
2638
    self._iprot.readMessageEnd()
2643
    self._iprot.readMessageEnd()
2639
    if result.success != None:
2644
    if result.success != None:
2640
      return result.success
2645
      return result.success
2641
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getUserCount failed: unknown result");
2646
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getUserCount failed: unknown result");
2642
 
2647
 
2643
  def getAllUsers(self, userType):
2648
  def getAllUsers(self, userType, startDate, endDate):
2644
    """
2649
    """
2645
    Returns list of users of type userType. If userType is null, then returns all the users.
2650
    Returns list of users of type userType who registered between startDate and endDate (both inclusive).
-
 
2651
    If any of startDate or endDate is -1, then that filter is ignored.
-
 
2652
    If userType is null, then returns all the users, irrespective of anonymous flag
-
 
2653
    
2646
    
2654
    
2647
    Parameters:
2655
    Parameters:
2648
     - userType
2656
     - userType
-
 
2657
     - startDate
-
 
2658
     - endDate
2649
    """
2659
    """
2650
    self.send_getAllUsers(userType)
2660
    self.send_getAllUsers(userType, startDate, endDate)
2651
    return self.recv_getAllUsers()
2661
    return self.recv_getAllUsers()
2652
 
2662
 
2653
  def send_getAllUsers(self, userType):
2663
  def send_getAllUsers(self, userType, startDate, endDate):
2654
    self._oprot.writeMessageBegin('getAllUsers', TMessageType.CALL, self._seqid)
2664
    self._oprot.writeMessageBegin('getAllUsers', TMessageType.CALL, self._seqid)
2655
    args = getAllUsers_args()
2665
    args = getAllUsers_args()
2656
    args.userType = userType
2666
    args.userType = userType
-
 
2667
    args.startDate = startDate
-
 
2668
    args.endDate = endDate
2657
    args.write(self._oprot)
2669
    args.write(self._oprot)
2658
    self._oprot.writeMessageEnd()
2670
    self._oprot.writeMessageEnd()
2659
    self._oprot.trans.flush()
2671
    self._oprot.trans.flush()
2660
 
2672
 
2661
  def recv_getAllUsers(self, ):
2673
  def recv_getAllUsers(self, ):
Line 3627... Line 3639...
3627
  def process_getAllUsers(self, seqid, iprot, oprot):
3639
  def process_getAllUsers(self, seqid, iprot, oprot):
3628
    args = getAllUsers_args()
3640
    args = getAllUsers_args()
3629
    args.read(iprot)
3641
    args.read(iprot)
3630
    iprot.readMessageEnd()
3642
    iprot.readMessageEnd()
3631
    result = getAllUsers_result()
3643
    result = getAllUsers_result()
3632
    result.success = self._handler.getAllUsers(args.userType)
3644
    result.success = self._handler.getAllUsers(args.userType, args.startDate, args.endDate)
3633
    oprot.writeMessageBegin("getAllUsers", TMessageType.REPLY, seqid)
3645
    oprot.writeMessageBegin("getAllUsers", TMessageType.REPLY, seqid)
3634
    result.write(oprot)
3646
    result.write(oprot)
3635
    oprot.writeMessageEnd()
3647
    oprot.writeMessageEnd()
3636
    oprot.trans.flush()
3648
    oprot.trans.flush()
3637
 
3649
 
Line 11915... Line 11927...
11915
 
11927
 
11916
class getAllUsers_args:
11928
class getAllUsers_args:
11917
  """
11929
  """
11918
  Attributes:
11930
  Attributes:
11919
   - userType
11931
   - userType
-
 
11932
   - startDate
-
 
11933
   - endDate
11920
  """
11934
  """
11921
 
11935
 
11922
  thrift_spec = (
11936
  thrift_spec = (
11923
    None, # 0
11937
    None, # 0
11924
    (1, TType.I32, 'userType', None, None, ), # 1
11938
    (1, TType.I32, 'userType', None, None, ), # 1
-
 
11939
    (2, TType.I64, 'startDate', None, None, ), # 2
-
 
11940
    (3, TType.I64, 'endDate', None, None, ), # 3
11925
  )
11941
  )
11926
 
11942
 
11927
  def __init__(self, userType=None,):
11943
  def __init__(self, userType=None, startDate=None, endDate=None,):
11928
    self.userType = userType
11944
    self.userType = userType
-
 
11945
    self.startDate = startDate
-
 
11946
    self.endDate = endDate
11929
 
11947
 
11930
  def read(self, iprot):
11948
  def read(self, iprot):
11931
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
11949
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
11932
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
11950
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
11933
      return
11951
      return
Line 11939... Line 11957...
11939
      if fid == 1:
11957
      if fid == 1:
11940
        if ftype == TType.I32:
11958
        if ftype == TType.I32:
11941
          self.userType = iprot.readI32();
11959
          self.userType = iprot.readI32();
11942
        else:
11960
        else:
11943
          iprot.skip(ftype)
11961
          iprot.skip(ftype)
-
 
11962
      elif fid == 2:
-
 
11963
        if ftype == TType.I64:
-
 
11964
          self.startDate = iprot.readI64();
-
 
11965
        else:
-
 
11966
          iprot.skip(ftype)
-
 
11967
      elif fid == 3:
-
 
11968
        if ftype == TType.I64:
-
 
11969
          self.endDate = iprot.readI64();
-
 
11970
        else:
-
 
11971
          iprot.skip(ftype)
11944
      else:
11972
      else:
11945
        iprot.skip(ftype)
11973
        iprot.skip(ftype)
11946
      iprot.readFieldEnd()
11974
      iprot.readFieldEnd()
11947
    iprot.readStructEnd()
11975
    iprot.readStructEnd()
11948
 
11976
 
Line 11953... Line 11981...
11953
    oprot.writeStructBegin('getAllUsers_args')
11981
    oprot.writeStructBegin('getAllUsers_args')
11954
    if self.userType != None:
11982
    if self.userType != None:
11955
      oprot.writeFieldBegin('userType', TType.I32, 1)
11983
      oprot.writeFieldBegin('userType', TType.I32, 1)
11956
      oprot.writeI32(self.userType)
11984
      oprot.writeI32(self.userType)
11957
      oprot.writeFieldEnd()
11985
      oprot.writeFieldEnd()
-
 
11986
    if self.startDate != None:
-
 
11987
      oprot.writeFieldBegin('startDate', TType.I64, 2)
-
 
11988
      oprot.writeI64(self.startDate)
-
 
11989
      oprot.writeFieldEnd()
-
 
11990
    if self.endDate != None:
-
 
11991
      oprot.writeFieldBegin('endDate', TType.I64, 3)
-
 
11992
      oprot.writeI64(self.endDate)
-
 
11993
      oprot.writeFieldEnd()
11958
    oprot.writeFieldStop()
11994
    oprot.writeFieldStop()
11959
    oprot.writeStructEnd()
11995
    oprot.writeStructEnd()
11960
 
11996
 
11961
  def __repr__(self):
11997
  def __repr__(self):
11962
    L = ['%s=%r' % (key, value)
11998
    L = ['%s=%r' % (key, value)