New methods added for getContextEvents from DB.