Interface ConvertedSectionCollection

All Superinterfaces:
org.springframework.data.repository.CrudRepository<ConvertedSection, org.bson.types.ObjectId>, org.springframework.data.repository.ListCrudRepository<ConvertedSection, org.bson.types.ObjectId>, org.springframework.data.repository.ListPagingAndSortingRepository<ConvertedSection, org.bson.types.ObjectId>, org.springframework.data.mongodb.repository.MongoRepository<ConvertedSection, org.bson.types.ObjectId>, org.springframework.data.repository.PagingAndSortingRepository<ConvertedSection, org.bson.types.ObjectId>, org.springframework.data.repository.query.QueryByExampleExecutor<ConvertedSection>, org.springframework.data.repository.Repository<ConvertedSection, org.bson.types.ObjectId>

@Repository public interface ConvertedSectionCollection extends org.springframework.data.mongodb.repository.MongoRepository<ConvertedSection, org.bson.types.ObjectId>
  • Method Details

    • findOneByQuarterAndEnrollCode

      @Query("{'courseInfo.quarter': ?0, 'section.enrollCode': ?1}") Optional<ConvertedSection> findOneByQuarterAndEnrollCode(String quarter, String enrollCode)
    • findByQuarterRangeAndCourseId

      @Query("{'courseInfo.quarter': { $gte: ?0, $lte: ?1 }, 'courseInfo.courseId': { $regex: ?2 } }") List<ConvertedSection> findByQuarterRangeAndCourseId(String startQuarter, String endQuarter, String courseId)
    • findByQuarterRangeAndInstructor

      @Query("{'courseInfo.quarter': {$gte: ?0, $lte: ?1}, 'section.instructors': { '$elemMatch': { 'instructor': { $regex: ?2 }, 'functionCode': { $regex: ?3 }}}}") List<ConvertedSection> findByQuarterRangeAndInstructor(String startQuarter, String endQuarter, String instructor, String functionCode)
    • findByQuarterRangeAndBuildingCode

      @Query("{'courseInfo.quarter': { $gte: ?0, $lte: ?1 }, 'section.timeLocations.building': { $regex: ?2, $options: 'i' } }") List<ConvertedSection> findByQuarterRangeAndBuildingCode(String startQuarter, String endQuarter, String buildingCode)
    • findByQuarterAndBuildingCode

      @Query("{'courseInfo.quarter': { $eq: ?0 }, 'section.timeLocations.building': { $regex: ?1, $options: 'i' } }") List<ConvertedSection> findByQuarterAndBuildingCode(String quarter, String buildingCode)
    • findByQuarter

      @Query("{'courseInfo.quarter': { $eq: ?0 } }") List<ConvertedSection> findByQuarter(String quarter)
    • findByQuarterRangeAndSearchTerms

      @Query("{ 'courseInfo.quarter': { $gte: ?0, $lte: ?1 }, $or: [ { 'courseInfo.title': { $regex: ?2, $options: 'i' } }, { 'courseInfo.description': { $regex: ?2, $options: 'i' } } ], 'section.section': { $regex: ?3 } }") List<ConvertedSection> findByQuarterRangeAndSearchTerms(String startQuarter, String endQuarter, String searchTerms, String sectionRegex)
    • findByQuarterAndSubjectArea

      @Query("{'courseInfo.quarter': { $eq: ?0 }, 'courseInfo.courseId': { $regex: ?1 }, 'section.section': { $regex: ?2 }, $expr: { $gte: [ { $size: '$section.timeLocations' }, ?3 ] } }") List<ConvertedSection> findByQuarterAndSubjectArea(String quarter, String subjectArea, String sectionRegex, int minTimeLocations)
      Find sections by quarter and subject area.
      Parameters:
      quarter - Quarter in yyyyq format
      subjectArea - regex (first eight should be subjectArea, then next character determines level; e.g. ' ' for lower div ugrad, 1 for upper div ugrad, 2 or above for grad)
      sectionRegex - use `00$` to omit sections or `.*` for all sections
      minTimeLocations - use 0 for all courses (including independent studies), 1 for only course that have a time and/or locations assigned
      Returns: