def fetch_journal_entry(db_access, key):
 result = db_access.batch_get_entity(JOURNAL_TABLE, [key], JOURNAL_SCHEMA)
 if (len(result.keys()) == 0):
  return None
 if (JOURNAL_SCHEMA[0] in result.keys()[0]):
  ent_string = result[0][JOURNAL_SCHEMA[0]]
  if (ent_string == dbconstants.TOMBSTONE):
   return None
  return entity_pb.EntityProto().ParseFromString(ent_string)
 else:
  return None

def fetch_journal_entry ( db_access , key ) : result = db_access . batch_get_entity ( JOURNAL_TABLE , [ key ] , JOURNAL_SCHEMA ) if ( len ( result . keys ( ) ) == 0 ) : return None if ( JOURNAL_SCHEMA [ 0 ] in result . keys ( ) [ 0 ] ) : ent_string = result [ 0 ] [ JOURNAL_SCHEMA [ 0 ] ] if ( ent_string == dbconstants . TOMBSTONE ) : return None return entity_pb . EntityProto ( ) . ParseFromString ( ent_string ) else : return None
fetches the given key from the journal .