public class AcademicCourse extends DBPersist
Modifier and Type | Field and Description |
---|---|
static short |
ClassId |
Constructor and Description |
---|
AcademicCourse() |
AcademicCourse(JDCConnection oConn,
java.lang.String sGuACourse) |
Modifier and Type | Method and Description |
---|---|
boolean |
active() |
void |
convertConfirmedBookingsToAlumni(JDCConnection oConn) |
int |
countAlumni(JDCConnection oConn) |
int |
countBookings(JDCConnection oConn) |
int |
countConfirmedBookings(JDCConnection oConn) |
int |
countPaidBookings(JDCConnection oConn) |
int |
countWaitingBookings(JDCConnection oConn) |
boolean |
delete(JDCConnection oConn)
Delete a register from database
The deleted register will be the one matching this DBPersist primary key,
as set at constructor or load() method.
|
static boolean |
delete(JDCConnection oConn,
java.lang.String sGuACourse) |
AcademicCourseBooking[] |
getActiveBookings(JDCConnection oConn) |
AcademicCourseBooking[] |
getAllBookings(JDCConnection oConn) |
AcademicCourseAlumni[] |
getAlumni(JDCConnection oConn) |
AcademicCourseBooking[] |
getCancelledBookings(JDCConnection oConn) |
AcademicCourseBooking[] |
getConfirmedBookings(JDCConnection oConn) |
Contact[] |
getContacts(JDCConnection oConn) |
Course |
getCourse(JDCConnection oConn) |
AcademicCourseBooking[] |
getPaidBookings(JDCConnection oConn) |
Subject[] |
getSubjects(JDCConnection oConn) |
AcademicCourseBooking[] |
getUnconfirmedBookings(JDCConnection oConn) |
AcademicCourseBooking[] |
getUnpaidBookings(JDCConnection oConn) |
AcademicCourseBooking[] |
getWaitingBookings(JDCConnection oConn) |
int |
maxAlumni() |
boolean |
store(JDCConnection oConn)
Store a register at database representing this instance of DBPersist
Insertions and updates : The store method automatically manages
register insertions and updates.
|
java.lang.String |
toXML(JDCConnection oConn,
java.lang.String sIdent,
java.lang.String sDelim)
Get complete dump in XML
This method gets a full XML dump of an academic course,
including its base course, subjects and bookings
|
allcaps, allcaps, clear, clone, columns, containsKey, containsValue, entrySet, exists, get, get, getAuditClassName, getCreationDate, getDate, getDate, getDateFormated, getDateShort, getDateTime, getDateTime24, getDecimal, getDecimalFormated, getDecimalFormated, getDouble, getDoubleFormated, getFloat, getFloatFormated, getInt, getIntArray, getInteger, getIntegerArray, getIntervalPart, getItemMap, getItems, getMoney, getPrimaryKey, getShort, getSQLDate, getSQLTime, getString, getStringHtml, getStringNull, getTable, getTable, getTime, getTimeOfDay, getTimestamp, isEmpty, isNull, iterator, keySet, load, load, parseXML, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, putAll, putAll, remove, remove, replace, replace, replace, replace, replace, replace, replace, replace, setAuditTransact, setAuditUser, setCreationDate, setPrimaryKey, size, toLowerCase, toUpperCase, toXML, toXML, toXML, values
public static final short ClassId
public AcademicCourse()
public AcademicCourse(JDCConnection oConn, java.lang.String sGuACourse) throws java.sql.SQLException
java.sql.SQLException
public boolean active()
public int countAlumni(JDCConnection oConn) throws java.sql.SQLException, java.lang.IllegalStateException
java.sql.SQLException
java.lang.IllegalStateException
public int countBookings(JDCConnection oConn) throws java.sql.SQLException, java.lang.IllegalStateException
java.sql.SQLException
java.lang.IllegalStateException
public int countConfirmedBookings(JDCConnection oConn) throws java.sql.SQLException, java.lang.IllegalStateException
java.sql.SQLException
java.lang.IllegalStateException
public int countPaidBookings(JDCConnection oConn) throws java.sql.SQLException, java.lang.IllegalStateException
java.sql.SQLException
java.lang.IllegalStateException
public int countWaitingBookings(JDCConnection oConn) throws java.sql.SQLException, java.lang.IllegalStateException
java.sql.SQLException
java.lang.IllegalStateException
public int maxAlumni()
public boolean store(JDCConnection oConn) throws java.sql.SQLException
DBPersist
Store a register at database representing this instance of DBPersist
Insertions and updates : The store method automatically manages register insertions and updates. If the stored object already exists at database then it is updated, if it does not exists then it is inserted. A primary key violation error is never thrown so ther is no need to call delete() method before re-writing an existing object.
NULL fields : All values not set calling put() methods for DBPersist
will be assumed to be NULL. If a not nullable field is not set then an
SQLException will be raised.
On storing an already existing object all values will we overwrited,
so is a DBPersist is not fully loaded before storing it, values not set
by calling put() methods that already were present at database will be lost.
public boolean delete(JDCConnection oConn) throws java.sql.SQLException
DBPersist
Delete a register from database
The deleted register will be the one matching this DBPersist primary key, as set at constructor or load() method.
public Contact[] getContacts(JDCConnection oConn) throws java.sql.SQLException
java.sql.SQLException
public AcademicCourseAlumni[] getAlumni(JDCConnection oConn) throws java.sql.SQLException
java.sql.SQLException
public AcademicCourseBooking[] getAllBookings(JDCConnection oConn) throws java.sql.SQLException
java.sql.SQLException
public AcademicCourseBooking[] getActiveBookings(JDCConnection oConn) throws java.sql.SQLException
java.sql.SQLException
public AcademicCourseBooking[] getCancelledBookings(JDCConnection oConn) throws java.sql.SQLException
java.sql.SQLException
public AcademicCourseBooking[] getConfirmedBookings(JDCConnection oConn) throws java.sql.SQLException
java.sql.SQLException
public AcademicCourseBooking[] getUnconfirmedBookings(JDCConnection oConn) throws java.sql.SQLException
java.sql.SQLException
public AcademicCourseBooking[] getWaitingBookings(JDCConnection oConn) throws java.sql.SQLException
java.sql.SQLException
public AcademicCourseBooking[] getPaidBookings(JDCConnection oConn) throws java.sql.SQLException
java.sql.SQLException
public AcademicCourseBooking[] getUnpaidBookings(JDCConnection oConn) throws java.sql.SQLException
java.sql.SQLException
public Course getCourse(JDCConnection oConn) throws java.sql.SQLException, java.lang.NullPointerException
java.sql.SQLException
java.lang.NullPointerException
public Subject[] getSubjects(JDCConnection oConn) throws java.sql.SQLException, java.lang.NullPointerException
java.sql.SQLException
java.lang.NullPointerException
public void convertConfirmedBookingsToAlumni(JDCConnection oConn) throws java.sql.SQLException
java.sql.SQLException
public java.lang.String toXML(JDCConnection oConn, java.lang.String sIdent, java.lang.String sDelim) throws java.sql.SQLException
Get complete dump in XML
This method gets a full XML dump of an academic course, including its base course, subjects and bookingsjava.sql.SQLException
public static boolean delete(JDCConnection oConn, java.lang.String sGuACourse) throws java.sql.SQLException
java.sql.SQLException