001 //
002 // This file is generated by MetaBoss Ver 1.4.0001 at Thu Dec 15 22:36:21 EST 2005
003 // MetaBoss is Copyright 2000-2005 © Softaris Pty.Ltd. All Rights Reserved.
004 // Content of this file is Copyright 2000-2005 © Softaris Pty. Ltd. All Rights Reserved.
005 // This content is licensed under Open Source Gnu Public License (GPL)
006 // Full terms and conditions of GPL can be found found at www.gnu.org
007 //
008 package com.almamater.crs.domains.courses;
009
010 import com.metaboss.enterprise.bo.BOObjectDomain;
011 import com.metaboss.enterprise.bo.BOException;
012
013 /** The course registration information domain
014 *<p>This object represents an entry point into the Enterprise/systems[CRS]/domains[Courses] domain.</p>.
015 * <p><b>Entities in this domain are:</b>
016 * <table border="1">
017 * <tr><th>Entity Name</th><th>Domain Object</th><th>Entity Description</th></tr>
018 * <tr><td>Student</td><td><a href="BOStudent.html">BOStudent</a></td><td>The person enrolled in the university to learn things</td></tr>
019 * <tr><td>Course</td><td><a href="BOCourse.html">BOCourse</a></td><td>The regime of study in the university</td></tr>
020 * <tr><td>Teacher</td><td><a href="BOTeacher.html">BOTeacher</a></td><td>The person employed by the university to teach things</td></tr>
021 * </table>
022 * <p>This object has all methods necesary to navigate entities in the model. It is the only component in the domain, which has
023 * COMPONENT_URL and can be looked up via JNDI. The rest of the entities must be navigated to from here.</p> */
024 public interface BODomain extends BOObjectDomain
025 {
026
027 /** Naming URL of the component. Used to access it via JNDI */
028 public static final String COMPONENT_URL = "component:/com.almamater.crs.domains.courses.BODomain";
029
030 /** Makes this domain editable.
031 * Can only be called during transaction.
032 * @exception BOException look at exception's type and message for the specific error description */
033 public void beginEdit() throws BOException;
034
035 /** Saves changes accumulated since the most recent call to saveChanges() or beginEdit().
036 * After completion of this call the domain has no outstanding changes in memory.
037 * It is not required to call this method explicitly - save will be invoked automatically
038 * during transaction commit. However, there may be valid reasons to call saveChanges() explicitly.
039 * The most common is to bring data base uptodate before executing a query.
040 * Please note that if transaction is rolled back - the updates saved via this method will be rolled back too.
041 * @exception BOException look at exception's type and message for the specific error description */
042 public void saveChanges() throws BOException;
043
044 /** Retrieves collection, which represents all Students in this domain.
045 * @see com.almamater.crs.domains.courses.BOStudent Student documentation
046 * @exception BOException look at exception's type and message for the specific error description
047 */
048 public BOStudentCollection getAllStudents() throws BOException;
049
050 /** Retrieves array of all Students instances loaded in this domain since its creation. This includes created, modified and read only instances.
051 * @exception BOException look at exception's type and message for the specific error description
052 */
053 public BOStudent[] getCachedStudents() throws BOException;
054
055 /** Retrieves single instance of Student with specified instance id.
056 * @see com.almamater.crs.domains.courses.BOStudent Student documentation
057 * @exception BOException look at exception's type and message for the specific error description
058 * @exception BORecordNotFoundException thrown if actual record was not found in storage
059 */
060 public BOStudent getStudent( com.almamater.crs.types.system.courses.StudentInstanceId pStudentInstanceId) throws BOException;
061
062 /** Retrieves single instance of Student with specified natural primary key information.
063 * @see com.almamater.crs.domains.courses.BOStudent Student documentation
064 * @exception BOException look at exception's type and message for the specific error description
065 * @exception BORecordNotFoundException thrown if actual record was not found in storage
066 */
067 public BOStudent getStudent( com.almamater.types.core.StudentNumber pStudentNo) throws BOException;
068
069 /** Retrieves single 'ready-to-edit' instance of Student with specified instance id and version id.
070 * <p>This method can only be called in transaction and the returned instance is ready for editing.
071 * This method will fail if actual version id of the instance is different to the one requested by caller. Such failure generally means
072 * that the entity has been modified by someone else and caller has to read the entity again, inspect its contents and resubmit update if appropriate.</p>
073 * @see com.almamater.crs.domains.courses.BOStudent Student documentation
074 * @exception BOSuperceededVersionException thrown when actual version id of the instance is different to the one requested by caller.
075 * @exception BOException look at exception's type and message for the specific error description
076 */
077 public BOStudent getStudentForEditing( com.almamater.crs.types.system.courses.StudentInstanceId pStudentInstanceId, com.almamater.crs.types.system.courses.StudentVersionId pStudentVersionId) throws BOException;
078
079 /** Creates new instance of Student in the domain.
080 * <p>Note that this method requires editable domain object. This method apppears in here because
081 * Student is a top level domain entity ( it is not contained by any other entity in the domain) </p>
082 * @see com.almamater.crs.domains.courses.BOStudent Student documentation
083 * @return Newly created instance of BOStudent. The returned instance is
084 * already editable, so beginEdit() call is not required for its editing within current transaction.
085 * @exception BOException look at exception's type and message for the specific error description
086 */
087 public BOStudent createStudent(com.almamater.types.core.StudentNumber pStudentNo) throws BOException;
088
089 /** Retrieves collection, which represents all Courses in this domain.
090 * @see com.almamater.crs.domains.courses.BOCourse Course documentation
091 * @exception BOException look at exception's type and message for the specific error description
092 */
093 public BOCourseCollection getAllCourses() throws BOException;
094
095 /** Retrieves array of all Courses instances loaded in this domain since its creation. This includes created, modified and read only instances.
096 * @exception BOException look at exception's type and message for the specific error description
097 */
098 public BOCourse[] getCachedCourses() throws BOException;
099
100 /** Retrieves single instance of Course with specified instance id.
101 * @see com.almamater.crs.domains.courses.BOCourse Course documentation
102 * @exception BOException look at exception's type and message for the specific error description
103 * @exception BORecordNotFoundException thrown if actual record was not found in storage
104 */
105 public BOCourse getCourse( com.almamater.crs.types.system.courses.CourseInstanceId pCourseInstanceId) throws BOException;
106
107 /** Retrieves single instance of Course with specified natural primary key information.
108 * @see com.almamater.crs.domains.courses.BOCourse Course documentation
109 * @exception BOException look at exception's type and message for the specific error description
110 * @exception BORecordNotFoundException thrown if actual record was not found in storage
111 */
112 public BOCourse getCourse( com.almamater.types.core.CourseCode pCode) throws BOException;
113
114 /** Retrieves single 'ready-to-edit' instance of Course with specified instance id and version id.
115 * <p>This method can only be called in transaction and the returned instance is ready for editing.
116 * This method will fail if actual version id of the instance is different to the one requested by caller. Such failure generally means
117 * that the entity has been modified by someone else and caller has to read the entity again, inspect its contents and resubmit update if appropriate.</p>
118 * @see com.almamater.crs.domains.courses.BOCourse Course documentation
119 * @exception BOSuperceededVersionException thrown when actual version id of the instance is different to the one requested by caller.
120 * @exception BOException look at exception's type and message for the specific error description
121 */
122 public BOCourse getCourseForEditing( com.almamater.crs.types.system.courses.CourseInstanceId pCourseInstanceId, com.almamater.crs.types.system.courses.CourseVersionId pCourseVersionId) throws BOException;
123
124 /** Creates new instance of Course in the domain.
125 * <p>Note that this method requires editable domain object. This method apppears in here because
126 * Course is a top level domain entity ( it is not contained by any other entity in the domain) </p>
127 * @see com.almamater.crs.domains.courses.BOCourse Course documentation
128 * @return Newly created instance of BOCourse. The returned instance is
129 * already editable, so beginEdit() call is not required for its editing within current transaction.
130 * @exception BOException look at exception's type and message for the specific error description
131 */
132 public BOCourse createCourse(com.almamater.types.core.CourseCode pCode) throws BOException;
133
134 /** Retrieves collection, which represents all Teachers in this domain.
135 * @see com.almamater.crs.domains.courses.BOTeacher Teacher documentation
136 * @exception BOException look at exception's type and message for the specific error description
137 */
138 public BOTeacherCollection getAllTeachers() throws BOException;
139
140 /** Retrieves array of all Teachers instances loaded in this domain since its creation. This includes created, modified and read only instances.
141 * @exception BOException look at exception's type and message for the specific error description
142 */
143 public BOTeacher[] getCachedTeachers() throws BOException;
144
145 /** Retrieves single instance of Teacher with specified instance id.
146 * @see com.almamater.crs.domains.courses.BOTeacher Teacher documentation
147 * @exception BOException look at exception's type and message for the specific error description
148 * @exception BORecordNotFoundException thrown if actual record was not found in storage
149 */
150 public BOTeacher getTeacher( com.almamater.crs.types.system.courses.TeacherInstanceId pTeacherInstanceId) throws BOException;
151
152 /** Retrieves single 'ready-to-edit' instance of Teacher with specified instance id and version id.
153 * <p>This method can only be called in transaction and the returned instance is ready for editing.
154 * This method will fail if actual version id of the instance is different to the one requested by caller. Such failure generally means
155 * that the entity has been modified by someone else and caller has to read the entity again, inspect its contents and resubmit update if appropriate.</p>
156 * @see com.almamater.crs.domains.courses.BOTeacher Teacher documentation
157 * @exception BOSuperceededVersionException thrown when actual version id of the instance is different to the one requested by caller.
158 * @exception BOException look at exception's type and message for the specific error description
159 */
160 public BOTeacher getTeacherForEditing( com.almamater.crs.types.system.courses.TeacherInstanceId pTeacherInstanceId, com.almamater.crs.types.system.courses.TeacherVersionId pTeacherVersionId) throws BOException;
161
162 /** Creates new instance of Teacher in the domain.
163 * <p>Note that this method requires editable domain object. This method apppears in here because
164 * Teacher is a top level domain entity ( it is not contained by any other entity in the domain) </p>
165 * @see com.almamater.crs.domains.courses.BOTeacher Teacher documentation
166 * @return Newly created instance of BOTeacher. The returned instance is
167 * already editable, so beginEdit() call is not required for its editing within current transaction.
168 * @exception BOException look at exception's type and message for the specific error description
169 */
170 public BOTeacher createTeacher() throws BOException;
171
172 }
|