eschool.ejb
Class _LecturesBean

java.lang.Object
  extended byeschool.ejb._LecturesBean

public abstract class _LecturesBean
extends java.lang.Object


Constructor Summary
_LecturesBean()
           
 
Method Summary
 void addLecture(int courseid, java.lang.String title, java.lang.String content, int lecturerid, int lecture_num)
          Adds a lecture to a course.
 boolean canEdit(int courseid, int userid)
          Checks whether a certain lecture can be edited by a certain user.
 boolean canRemove(int courseid, int userid)
          Checks whether a certain course can be removed by a certain user
 void editLecture(int lectureid, java.lang.String title, java.lang.String content, int lecturerid, int lecture_num)
          Edits a lecture.
 Lecture getLectureByLectureID(int lectureid)
           
 java.util.Vector getLecturesByCourseID(int courseid)
           
 boolean isLectureNumAvail(int courseid, int lectureNum)
          Checks whether a certain lecture number is availabe for a certain course
 void removeLecture(int lectureid)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

_LecturesBean

public _LecturesBean()
Method Detail

getLecturesByCourseID

public java.util.Vector getLecturesByCourseID(int courseid)
Parameters:
courseid - id of the course
Returns:
Vector which contains all lectures in a certain course

getLectureByLectureID

public Lecture getLectureByLectureID(int lectureid)
Parameters:
lectureid - id of the lecture
Returns:
Lecture specified by its id

canEdit

public boolean canEdit(int courseid,
                       int userid)
Checks whether a certain lecture can be edited by a certain user.

Parameters:
courseid - id of the lecture
userid - id of the user who wants to edit lecture
Returns:
true if lecture can be edited by this user (only of the user is owner of the lecture); false otherwise

canRemove

public boolean canRemove(int courseid,
                         int userid)
Checks whether a certain course can be removed by a certain user

Parameters:
courseid - id of the course
userid - id of the user
Returns:
true if course can be removed by this user; false otherwise

addLecture

public void addLecture(int courseid,
                       java.lang.String title,
                       java.lang.String content,
                       int lecturerid,
                       int lecture_num)
Adds a lecture to a course.

Parameters:
courseid - id of the new course
title - title of the new course
content - content of the new course
lecturerid - id of the lecturer who is owner of the course
lecture_num - number of the course, unique in the course

editLecture

public void editLecture(int lectureid,
                        java.lang.String title,
                        java.lang.String content,
                        int lecturerid,
                        int lecture_num)
Edits a lecture.

Parameters:
lectureid - id of the lecture that will be edited
title - title that will change the current title
content - content that will change the current content
lecturerid - id of the lecturer who wants to edit the lecture
lecture_num - lecture number that will change the current lecture number

removeLecture

public void removeLecture(int lectureid)

isLectureNumAvail

public boolean isLectureNumAvail(int courseid,
                                 int lectureNum)
Checks whether a certain lecture number is availabe for a certain course

Parameters:
courseid - id of the course
lectureNum - lecture number
Returns: