#NEWLINE# def load_one_by_id( self , objId ) : #NEWLINE# #INDENT# obj = self . __get_one ( objId ) #NEWLINE# if ( ( not obj ) and objId ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# obj = self . _coll . find_one ( { #NEWLINE# #INDENT# '_id' : objId , #NEWLINE# #UNINDENT# } ) #NEWLINE# obj = base . monkFactory . decode ( obj ) #NEWLINE# if obj : #NEWLINE# #INDENT# self . __put_one ( obj ) #NEWLINE# #UNINDENT# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# logger . warning ( e . message ) #NEWLINE# logger . warning ( 'can not load document by id {0}' . format ( objId ) ) #NEWLINE# obj = None #NEWLINE# #UNINDENT# #UNINDENT# return obj