/// <summary>
        /// Gets the CaseInfoDetails
        /// </summary>
        /// <param name="criteria">Criteria contains CaseInfoId</param>
        /// <returns></returns>
        public CaseInfoEntity GetCaseInfoDetails(Criteria criteria)
        {
            Check.RequireWithNullException(criteria != null, "criteria was null or empty; it has to have value within it.");

            var caseInfoEntity = new CaseInfoEntity();

            using (var unitOfWork = new UnitOfWorkImpl(DataBaseConnectivity.Application))
            {
                try
                {
                    var icaseinfoRepository = new RepositoryImpl<CaseInfo>(unitOfWork.Session);
                    caseInfoEntity = CaseMapper.GetCaseInfoEntity(icaseinfoRepository.Get(Convert.ToInt64(criteria.Value)));
                }
                catch (Exception ex)
                {
                    unitOfWork.Rollback();
                    Logger.Error("Error encountered at GetCaseInfoDetails", ex);
                    throw;
                }
            }

            return caseInfoEntity;
        }
        /// <summary>
        /// Gets the hearings.
        /// </summary>
        /// <param name="startDateTime">The start date time.</param>
        /// <param name="endDateTime">The end date time.</param>
        /// <returns></returns>
        public List<HearingEntity> GetHearings(DateTime startDateTime, DateTime endDateTime)
        {
            CaseGateway caseGateway = new CaseGateway();
            List<HearingEntity> hearingEntityList = new List<HearingEntity>();

            using(IUnitOfWork unitOfWork=new UnitOfWorkImpl(DataBaseConnectivity.Application))
            {
                try
                {

                    IHearingRepository ihearingRepository = new HearingRepositoryImpl(unitOfWork.Session);
                    hearingEntityList = caseGateway.GetHearingEntityList(startDateTime, endDateTime);
                        //(ihearingRepository.GetHearingsBasedOnDateTime(startDateTime, endDateTime));
                }
                catch (Exception ex)
                {
                    unitOfWork.Rollback();
                    Logger.Error("Error encountered at GetHearings", ex);
                    throw;
                }
            }

            return hearingEntityList;
        }