KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > example > cmp > transaction > RegistrationSession


1 package example.cmp.transaction;
2
3 import javax.ejb.*;
4 import java.util.Collection;
5
6 /**
7  * Local Interface for the RegistrationSession bean.
8  */

9 public interface RegistrationSession extends EJBLocalObject {
10
11   /**
12    * Adds a <code>Course</code> to the list of selected courses. Note that this
13    * method does store the <code>Course</code> to the database.
14    */

15   public void addCourse(Course course)
16     throws FinderException;
17   /**
18    * Removes a <code>Course</code> from the list of selected courses. Note that
19    * this method does not delete any records from the database.
20    */

21   public void removeCourse(Course course)
22     throws FinderException;
23   /**
24    * Returns a <code>Collection</code> of all available Courses.
25    */

26   public Collection getAvailableCourses();
27   /**
28    * Returns a <code>Collection</code> of all Courses that are currently
29    * selected in this RegistrationSession Bean.
30    */

31   public Collection getSelectedCourses();
32   /**
33    * Returns a <code>Collection</code> of all Courses that the Student
34    * currently enrolled in.
35    */

36   public Collection getEnrolledCourses();
37   /**
38    * Returns the name of the Student who is currently selecting Courses.
39    */

40   public String getStudentName();
41   /**
42    * Returns true if the registration is complete.
43    */

44   public boolean isComplete();
45   /**
46    * Consitutes a transaction that tries to commit every course in the
47    * <code>RegistrationSessionBean</code>'s list of selected courses to the
48    * database.
49    */

50   public void finalizeRegistration()
51     throws RegistrationDeniedException;
52
53 }
54
Popular Tags