|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsemorg.sql.tables.AbstractTable
semorg.sql.tables.Instructor
public class Instructor
Models the association "Instructor" between the classes Lecturer and Presentation: a Lecturer is an Instructor of a Presentation (association has a * cardinality).
| Field Summary | |
|---|---|
private static String |
createTableSQLString
SQL statement for creating the table "instructor" (if not exists). |
protected int |
lecturerId
The id of the lecturer. |
static List<KeyPair> |
lockedIds
A list of id-pairs of locked records. |
protected int |
presentationId
The id of the presentation. |
protected static String |
supervisorDeleteString
SQL query to delete a instructor record. |
protected static String |
supervisorInsertString
SQL query to insert a instructor record. |
private static String |
tableName
The name of the corresponding table in the database. |
| Fields inherited from class semorg.sql.tables.AbstractTable |
|---|
creationDate, modificationDate, NULL_ID |
| Constructor Summary | |
|---|---|
Instructor(int lecturerId,
int presentationId,
Timestamp creationDate,
Timestamp modificationDate)
Creates an instance of the class Instructor with the given parameters. |
|
| Method Summary | |
|---|---|
static void |
createInstructorTable(Statement statement)
Creates the table "instructor" if it does not exist. |
void |
deleteFromDB()
Delets a instructor record from the db using the supervisorDeleteString. |
static Vector<DBColumn> |
getColumns()
Returns a vector of DBColumn instances according to
the properties of the table "instructor". |
int |
getLecturerId()
|
int |
getPresentationId()
|
void |
insertIntoDB()
Inserts a instructor record into the db using the supervisorInsertString. |
static boolean |
tableOK()
Checks if the according DB table exists. |
| Methods inherited from class semorg.sql.tables.AbstractTable |
|---|
addDBTableChangedListener, createExtendedQueryString, fireTableChangedEvent, getColumns, getCreationDate, getModificationDate, getNext, getPrevious, removeDBTableChangedListener, setModificationDate, tableOK |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static List<KeyPair> lockedIds
protected int lecturerId
protected int presentationId
private static String tableName
protected static String supervisorInsertString
protected static String supervisorDeleteString
private static String createTableSQLString
| Constructor Detail |
|---|
public Instructor(int lecturerId,
int presentationId,
Timestamp creationDate,
Timestamp modificationDate)
| Method Detail |
|---|
public static boolean tableOK()
true, if the table is ok, false
otherwise.AbstractTable.tableOK(String)
public static void createInstructorTable(Statement statement)
throws SQLException
statement - instance of the class Statement, which is used for
executing the SQL statement createTableSQLString.
SQLException - If the execution or closing of the given statement fails.
public void insertIntoDB()
throws SQLException
supervisorInsertString. Finally it fires a
TableChangedEvent-Listener with the appropriate type.
SQLException - If the creation, manipulation, execution or closing of a
PreparedStatement instance used for querying the database
fails.- overview of all listener
types
public void deleteFromDB()
throws SQLException
supervisorDeleteString. Finally it fires a
TableChangedEvent-Listener with the appropriate type.
SQLException - If the creation, manipulation, execution or closing of a
PreparedStatement instance used for querying the database
fails.- overview of all listener
typespublic static Vector<DBColumn> getColumns()
DBColumn instances according to
the properties of the table "instructor".
AbstractTable.getColumns(String tableAbbreviation)public int getLecturerId()
public int getPresentationId()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||