|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectblackboard.persist.course.CourseSearch
public class CourseSearch
Class to encapsulate user searches as viewed from the control and admin panels. The factory methods getNameSearch(), getEnrollmentSearch(), getLoginDateSearch(), and getRoleSearch() return properly initialized searches. Examples:
UserSearch us = UserSearch.getNameSearch( UserSearch.SearchKey.UserName, SearchOperator.Contains, "admin" ); UserSearch us = UserSearch.getLoginDateSearch( SearchOperator.IsNull, null );
| Nested Class Summary | |
|---|---|
static class |
CourseSearch.SearchKey
Valid keys for search operations |
static class |
CourseSearch.SortKey
Enumeration of possible "sort" keys. |
| Constructor Summary | |
|---|---|
CourseSearch()
Constructor |
|
| Method Summary | |
|---|---|
static CourseSearch |
getDateCreatedSearch(SearchOperator op,
java.util.Date value,
Course.ServiceLevel serviceLevel)
Creates a search object that compares the creation date. |
static CourseSearch |
getInfoSearch(CourseSearch.SearchKey key,
SearchOperator op,
java.lang.String value,
Course.ServiceLevel serviceLevel)
Generates a search object that finds courses based on the specified name key. |
static CourseSearch |
getInstructorSearch(SearchOperator op,
java.lang.String value,
Course.ServiceLevel serviceLevel)
Generates a search object that finds courses based on whether one of the instructors has a name matching the specified value. |
SelectQuery |
getQuery()
Returns a query for use by the loader. |
int |
getRowCount()
getRowCount |
boolean |
getUsePaging()
Returns whether this search will return "paged" results. |
static CourseSearch |
getViewCatalogSearch(CourseSearch.SearchKey key,
SearchOperator op,
java.lang.String value,
SearchOperator dateOp,
java.util.Date createdDate,
Id categoryId,
Course.ServiceLevel serviceLevel)
Returns a course search object appropriate for use when rendering a course list with the course catalog as viewed by user (i.e., non-admin panel) Since this is not used from the admin panel, the entitlement clause is not added. |
static CourseSearch |
getViewCoursesSearch(CourseSearch.SearchKey key,
SearchOperator op,
java.lang.String value,
SearchOperator dateOp,
java.util.Date createdDate,
Course.ServiceLevel serviceLevel)
Creates a search object that |
static CourseSearch |
getViewCoursesSearch(CourseSearch.SearchKey key,
SearchOperator op,
java.lang.String value,
SearchOperator dateOp,
java.util.Date createdDate,
Course.ServiceLevel serviceLevel,
boolean bFilterRowStatus)
Creates a search object that |
static CourseSearch |
getViewCoursesSearch(CourseSearch.SearchKey key,
SearchOperator op,
java.lang.String value,
SearchOperator dateOp,
java.util.Date createdDate,
Course.ServiceLevel serviceLevel,
boolean bFilterRowStatus,
boolean bCheckDomainEntitlement)
|
static CourseSearch |
getViewCoursesSearch(CourseSearch.SearchKey key,
SearchOperator op,
java.lang.String value,
SearchOperator dateOp,
java.util.Date createdDate,
Course.ServiceLevel serviceLevel,
boolean bFilterRowStatus,
boolean bCheckDomainEntitlement,
boolean displayIntegrated)
Creates a search object that |
void |
setAscending(boolean value)
Sets flag determining whether sort order is ascending. |
void |
setCurrentPage(int value)
setCurrentPage |
void |
setPageSize(int value)
setPageSize |
void |
setUsePaging(boolean usePaging)
Sets whether to "page" this search |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CourseSearch()
| Method Detail |
|---|
public static CourseSearch getInfoSearch(CourseSearch.SearchKey key,
SearchOperator op,
java.lang.String value,
Course.ServiceLevel serviceLevel)
key - Key to search on. Must be one of FamilyName, GivenName, or
UserNameop - Operator to usevalue - Value to search. Should be provided "as-is", appropriate search
syntax will be added as required.serviceLevel - Discriminator for searching courses vs organizations
public static CourseSearch getInstructorSearch(SearchOperator op,
java.lang.String value,
Course.ServiceLevel serviceLevel)
op - Operator for the value comparisonvalue - Value to compare; it will be converted to an appropriate
SQL predicate based on op.serviceLevel - Discriminator for searching courses vs organizations
public static CourseSearch getDateCreatedSearch(SearchOperator op,
java.util.Date value,
Course.ServiceLevel serviceLevel)
op - Operator to applyvalue - Date value to searchserviceLevel - Discriminator for searching courses vs organizations
public static CourseSearch getViewCoursesSearch(CourseSearch.SearchKey key,
SearchOperator op,
java.lang.String value,
SearchOperator dateOp,
java.util.Date createdDate,
Course.ServiceLevel serviceLevel)
public static CourseSearch getViewCoursesSearch(CourseSearch.SearchKey key,
SearchOperator op,
java.lang.String value,
SearchOperator dateOp,
java.util.Date createdDate,
Course.ServiceLevel serviceLevel,
boolean bFilterRowStatus)
public static CourseSearch getViewCoursesSearch(CourseSearch.SearchKey key,
SearchOperator op,
java.lang.String value,
SearchOperator dateOp,
java.util.Date createdDate,
Course.ServiceLevel serviceLevel,
boolean bFilterRowStatus,
boolean bCheckDomainEntitlement)
public static CourseSearch getViewCoursesSearch(CourseSearch.SearchKey key,
SearchOperator op,
java.lang.String value,
SearchOperator dateOp,
java.util.Date createdDate,
Course.ServiceLevel serviceLevel,
boolean bFilterRowStatus,
boolean bCheckDomainEntitlement,
boolean displayIntegrated)
public static CourseSearch getViewCatalogSearch(CourseSearch.SearchKey key,
SearchOperator op,
java.lang.String value,
SearchOperator dateOp,
java.util.Date createdDate,
Id categoryId,
Course.ServiceLevel serviceLevel)
key - the course search key to filter results usingop - the operator to use for the course search key criteriavalue - the value to use for the course search key criteriadateOp - the operator to use for the date search criteriacreatedDate - the value to use for the date search criteriacategoryId - the category within the catalog to which the search should
be restricted. Provide null if the entire catalog should be searchedserviceLevel - the service level which describes the type of course to
search for (course versus organization)
CourseSearch object which can used with the appropriate
database loader to load the desired course list.public void setAscending(boolean value)
value - True if sort should be ascendingpublic void setPageSize(int value)
public void setCurrentPage(int value)
public int getRowCount()
public boolean getUsePaging()
public void setUsePaging(boolean usePaging)
usePaging - Whether to page the search.public SelectQuery getQuery()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||