example.cmp.transaction
Interface RegistrationSession

All Superinterfaces:
javax.ejb.EJBLocalObject

public interface RegistrationSession
extends javax.ejb.EJBLocalObject

Local Interface for the RegistrationSession bean.


Method Summary
 void addCourse(Course course)
          Adds a Course to the list of selected courses.
 void finalizeRegistration()
          Consitutes a transaction that tries to commit every course in the RegistrationSessionBean's list of selected courses to the database.
 java.util.Collection getAvailableCourses()
          Returns a Collection of all available Courses.
 java.util.Collection getEnrolledCourses()
          Returns a Collection of all Courses that the Student currently enrolled in.
 java.util.Collection getSelectedCourses()
          Returns a Collection of all Courses that are currently selected in this RegistrationSession Bean.
 java.lang.String getStudentName()
          Returns the name of the Student who is currently selecting Courses.
 boolean isComplete()
          Returns true if the registration is complete.
 void removeCourse(Course course)
          Removes a Course from the list of selected courses.
 
Methods inherited from interface javax.ejb.EJBLocalObject
getEJBLocalHome, getPrimaryKey, isIdentical, remove
 

Method Detail

addCourse

public void addCourse(Course course)
               throws javax.ejb.FinderException
Adds a Course to the list of selected courses. Note that this method does store the Course to the database.

removeCourse

public void removeCourse(Course course)
                  throws javax.ejb.FinderException
Removes a Course from the list of selected courses. Note that this method does not delete any records from the database.

getAvailableCourses

public java.util.Collection getAvailableCourses()
Returns a Collection of all available Courses.

getSelectedCourses

public java.util.Collection getSelectedCourses()
Returns a Collection of all Courses that are currently selected in this RegistrationSession Bean.

getEnrolledCourses

public java.util.Collection getEnrolledCourses()
Returns a Collection of all Courses that the Student currently enrolled in.

getStudentName

public java.lang.String getStudentName()
Returns the name of the Student who is currently selecting Courses.

isComplete

public boolean isComplete()
Returns true if the registration is complete.

finalizeRegistration

public void finalizeRegistration()
                          throws RegistrationDeniedException
Consitutes a transaction that tries to commit every course in the RegistrationSessionBean's list of selected courses to the database.