eschool.ejb
Class _UsersBean

java.lang.Object
  extended byeschool.ejb._UsersBean

public abstract class _UsersBean
extends java.lang.Object


Constructor Summary
_UsersBean()
           
 
Method Summary
 void changeMyProfile(int lecturer_id, java.lang.String fname, java.lang.String lname, java.lang.String phone, java.lang.String email, java.lang.String info)
          Changes lecturer profile
 void changeStudentProfile(int studentId, java.lang.String fname, java.lang.String lname, java.lang.String email, java.lang.String phone)
          Changes student personal data.
 java.util.Vector getAllLecturers()
           
 Lecturer getLecturerByLecturerID(int lecturerid)
           
 Lecturer logOnLecturer(java.lang.String username, java.lang.String password)
          Logs a lecturer into the system by username and password
 Student logOnStudent(java.lang.String username, java.lang.String password)
          Logs a student into the system by username and password
 boolean registerLecturer(Lecturer lecturer)
          Registeres a new system into the system
 boolean registerStudent(Student student)
          Register a new student into system
 void saveOpinion(java.lang.String general, java.lang.String should_add, java.lang.String should_impl, java.lang.String look, java.lang.String rep_name, java.lang.String rep_email, java.lang.String score)
          Saves a user opinion about the system
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

_UsersBean

public _UsersBean()
Method Detail

logOnStudent

public Student logOnStudent(java.lang.String username,
                            java.lang.String password)
Logs a student into the system by username and password

Parameters:
username -
password -
Returns:
Student object corresponding to this username or null if there is no such a student registered into database

logOnLecturer

public Lecturer logOnLecturer(java.lang.String username,
                              java.lang.String password)
Logs a lecturer into the system by username and password

Parameters:
username -
password -
Returns:
Lecturer object corresponding to this username or null if there is no such a lecturer registered into database

getLecturerByLecturerID

public Lecturer getLecturerByLecturerID(int lecturerid)
Parameters:
lecturerid - id of the lecturer
Returns:
Lecturer by its id

registerStudent

public boolean registerStudent(Student student)
Register a new student into system

Parameters:
student - Student that have to be registered
Returns:
true if registration succeeded; false otherwise

saveOpinion

public void saveOpinion(java.lang.String general,
                        java.lang.String should_add,
                        java.lang.String should_impl,
                        java.lang.String look,
                        java.lang.String rep_name,
                        java.lang.String rep_email,
                        java.lang.String score)
Saves a user opinion about the system

Parameters:
general - general feedback about the system
should_add - what should be added to the system
should_impl - what should be improved
look - how the look should be changed
rep_name - reporter name
rep_email - reporter e-mail
score - the system score

changeMyProfile

public void changeMyProfile(int lecturer_id,
                            java.lang.String fname,
                            java.lang.String lname,
                            java.lang.String phone,
                            java.lang.String email,
                            java.lang.String info)
Changes lecturer profile

Parameters:
lecturer_id - id of lecturer
fname - first name that should replace the current first name
lname - last name that should replace the current last name
phone - phone number that should replace the current phone number
email - e-mail address that should replace the current e-mail address
info - additional information that should replace the current additional information

registerLecturer

public boolean registerLecturer(Lecturer lecturer)
Registeres a new system into the system

Parameters:
lecturer - Lecturer that should be registered
Returns:
true if registration is successfull; false otherwise

getAllLecturers

public java.util.Vector getAllLecturers()
Returns:
Vector which contains all registered lecturers in the system

changeStudentProfile

public void changeStudentProfile(int studentId,
                                 java.lang.String fname,
                                 java.lang.String lname,
                                 java.lang.String email,
                                 java.lang.String phone)
Changes student personal data.

Parameters:
studentId - id of the student
fname - first name that should replace the current first name
lname - last name that should replace the current last name
email - e-mail address that should replace the current e-mail address
phone - number that should replace the current phone number