Added different scenarios such as offset and limit, sort order and sort by to the dao and the service