Package invenio :: Module bibexport_method_fieldexporter_dblayer :: Class JobResult
[hide private]
[frames] | no frames]

Class JobResult

source code

Class containing the result of job execution.

Instance Methods [hide private]
 
__init__(self, job, query_results=[], execution_date_time=time.struct_time(tm_year=2012, tm_mon=2, tm_mday=8, tm_hour=14..., id=-1, status=0, status_message='')
Initialize the state of the object
source code
 
get_query_results(self)
Returns list of results from the queries in the job
source code
 
set_query_results(self, value)
Sets the results of execution of the job queries.
source code
 
add_query_result(self, query_result)
Adds a aquery result to the results
source code
 
get_status(self)
Returns the status of the execution
source code
 
set_status(self, value)
Sets the status of the execution.
source code
 
get_status_message(self)
Sets the status message of the result
source code
 
set_status_message(self, value)
Returns the status message of the result
source code
 
get_job(self)
Sets the job causing the result
source code
 
add_status_message(self, message)
Adds additional message to status message field
source code
 
set_job(self, value)
Returns the job causing the result
source code
 
get_id(self)
Returns identifier of the job result
source code
 
get_execution_date_time(self)
Returns the date and time of job execution.
source code
 
set_execution_date_time(self, value)
Sets the last run time of the job.
source code
 
get_number_of_records_found(self)
Returns the number of records in the job result
source code
Class Variables [hide private]
  STATUS_CODE_OK = 0
  STATUS_CODE_ERROR = 1
  ID_MISSING = -1
  _id = -1
  _job = None
hash(x)
  _query_results = []
  _status = 0
  _status_message = ''
  _execution_date_time = time.struct_time(tm_year=2012, tm_mon=2...
Method Details [hide private]

__init__(self, job, query_results=[], execution_date_time=time.struct_time(tm_year=2012, tm_mon=2, tm_mday=8, tm_hour=14..., id=-1, status=0, status_message='')
(Constructor)

source code 

Initialize the state of the object

Parameters:
  • id - identifier of the job result in the database
  • query_results - List of query results (one result per query in the job)
  • status - status of execution
  • status_message - text containing additional information about the status

get_query_results(self)

source code 

Returns list of results from the queries in the job

Returns:
List of QueryResult objects

set_query_results(self, value)

source code 

Sets the results of execution of the job queries.

Parameters:
  • value - list of QueryResult objects

add_query_result(self, query_result)

source code 

Adds a aquery result to the results

Parameters:
  • query_result - QueryResult object containing information about the result

get_status(self)

source code 

Returns the status of the execution

Returns:
Integer value representing the status of execution

set_status(self, value)

source code 

Sets the status of the execution.

Parameters:
  • value - Integer value reperesenting the status of execution

get_status_message(self)

source code 

Sets the status message of the result

Returns:
string containing the message

set_status_message(self, value)

source code 

Returns the status message of the result

Parameters:
  • value - string containing the message

add_status_message(self, message)

source code 

Adds additional message to status message field

Parameters:
  • message - string containing the additional message

get_execution_date_time(self)

source code 

Returns the date and time of job execution.

Returns:
datestruct representing date and time of execution

set_execution_date_time(self, value)

source code 

Sets the last run time of the job.

Parameters:
  • value - datestruct representing date and time of execution

Class Variable Details [hide private]

_execution_date_time

Value:
time.struct_time(tm_year=2012, tm_mon=2, tm_mday=8, tm_hour=14, tm_min\
=58, tm_sec=31, tm_wday=2, tm_yday=39, tm_isdst=0)