AnsweredAssumed Answered

How to set CourseSearch parameters

Question asked by kh32344 on Oct 21, 2016
Latest reply on Oct 24, 2016 by kh32344

This code snippet does not return any result, but I am sure there are many courses in DB table having course_id(course_main/course_id) ended with "_F2016"

How to set the parameters of CourseSearch with this very basic search?

The code runs on 2015, Q4.

 

-----

java.util.Date createDate = Calendar.getInstance().getTime();

SearchOperator dateOp = SearchOperator.LessThan;

String sCourses = "_F2016";

 

CourseSearch sCourse = CourseSearch.getViewCoursesSearch

(CourseSearch.SearchKey.CourseId, SearchOperator.Like, sCourses, dateOp, createDate, ServiceLevel.FULL);

 

  if ( bbPm == null )bbPm = PersistenceServiceFactory.getInstance().getDbPersistenceManager();

  CourseDbLoader courseDbLoader = (CourseDbLoader) bbPm.getLoader( CourseDbLoader.TYPE );

  List<Course> sResults = courseDbLoader.loadByCourseSearch(sCourse);

------

 

Please shed some light, thank you!

Outcomes