コード例 #1
0
 def get_data_list_object_any_paginated(self, sp_name,
                                        params: ParamsObject):
     """
     :description: This method allows user to get the data list object for any procedure which always                            returns the model object with pagination
     :param sp_name: Procedure name to call
     :param params: list of parameters
     :return: List of model object
     """
     if base.DEBUG_ENABLED:
         LoggingHelper().log_debug(self.__class__, "", params)
     try:
         self.get_cursor(db_type="R").callproc(sp_name,
                                               params.get_params_list())
         list_cursor_object = self.data_as_cursor_list_multiple_rs()
         return self.post_get_data_list_object_paginated(list_cursor_object)
     except Exception as ex:
         if base.DEBUG_ENABLED:
             LoggingHelper().log_error(self.__class__, "", str(ex))
         if isinstance(ex, DatabaseException) or isinstance(
                 ex, AppointmentException):
             raise DatabaseException(self.db_error_code, ex.error_message,
                                     self.data)
         else:
             raise DatabaseException(self.db_error_code, str(ex), self.data)
     finally:
         self.close_cursor()
         if base.DEBUG_ENABLED:
             LoggingHelper().log_debug(self.__class__, "", self.data)
コード例 #2
0
 def get_cache_key(self, object, params: ParamsObject):
     try:
         params_list = params.get_params_list()
         prefix = ""
         if object != "" and object is not None:
             prefix = object
         key = ''.join(str(e) if e is not None else "" for e in params_list)
         return prefix + ':' + key
     except Exception as ex:
         pass
コード例 #3
0
 def pre_get_list_object(self, params: ParamsObject):
     self.sp_name = "sTransactionLogObjectGetList"
     self.params_list = params.get_params_list()
コード例 #4
0
 def pre_get_list_object(self, params: ParamsObject):
     self.sp_name = "suserObjectGetList"
     self.params_list = params.get_params_list()