Package one.suhas.rmc.service
Class ClassService
java.lang.Object
one.suhas.rmc.service.ClassService
The app logic for anything related to classes
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionAdds a class to the databasevoiddeleteClass(long id) Deletes a class.voidGenerates some classes, and adds them to the database.Fetches all classes in the databasegetById(long id) Fetches a class by its IDgetClassReviews(long id) Fetch the reviews of a classgetTextReviews(long id) Fetch the reviews with text of a class 
- 
Constructor Details
- 
ClassService
 
 - 
 - 
Method Details
- 
getAllClasses
Fetches all classes in the database- Returns:
 - A list of all classes
 
 - 
addClass
Adds a class to the database- Parameters:
 className- the name of the class- Returns:
 - the class
 
 - 
getById
Fetches a class by its ID- Parameters:
 id- the ID of the class- Returns:
 - the class with that ID
 
 - 
getClassReviews
Fetch the reviews of a class- Parameters:
 id- the ID of the class- Returns:
 - a Set with the reviews of that class
 
 - 
getTextReviews
Fetch the reviews with text of a class- Parameters:
 id- the ID of the class- Returns:
 - a Set with the textreviews of that class
 
 - 
deleteClass
public void deleteClass(long id) Deletes a class.- Parameters:
 id- the ID of the class.
 - 
generateClasses
public void generateClasses()Generates some classes, and adds them to the database. 
 -