|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.antelmann.calendar.SQLCalendarDB
public class SQLCalendarDB
a JDBC implementation of a calendar database. doesn't include recurrence, yet.
| Field Summary | |
|---|---|
protected String |
beginDateField
|
protected String |
cancelField
|
protected String |
categoryField
categories are stored in a single comma-separated text field |
static String |
catSeparator
|
protected Connection |
con
|
protected String |
confirmField
|
protected String |
createdField
|
protected String |
descriptionField
|
protected String |
endDateField
|
protected String |
idField
|
protected String |
locationField
|
protected String |
propsIdField
|
protected String |
propsKeyField
|
protected String |
propsTableName
|
protected String |
propsValueField
|
protected String |
tableName
|
protected String |
titleField
|
protected String |
updatedField
|
| Constructor Summary | |
|---|---|
SQLCalendarDB(Connection con,
Properties props)
|
|
| Method Summary | |
|---|---|
void |
close()
|
boolean |
containsEntry(CalendarEntry entry)
entry is there if the id corresponds to an entry in the database; the contained data may be different |
boolean |
deleteEntry(CalendarEntry entry)
deletes the given entry from the database |
protected int |
generateNewID()
takes the maximum existing id and adds one |
Collection<Alert> |
getActiveAlerts()
returns all active non-acknowledged alerts |
Collection<Alert> |
getAlerts(Filter<Alert> filter)
|
Collection<CalendarEntry> |
getEntries(Filter<CalendarEntry> filter)
|
void |
insertAlert(Alert alert)
|
CalendarEntry |
insertEntry(CalendarEntry entry)
the id of the given entry is ignored; the returned entry will reflect the actual database object |
void |
updateAlert(Alert alert)
|
void |
updateEntry(CalendarEntry entry)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String catSeparator
protected Connection con
protected String tableName
protected String idField
protected String titleField
protected String locationField
protected String descriptionField
protected String beginDateField
protected String endDateField
protected String confirmField
protected String cancelField
protected String createdField
protected String updatedField
protected String categoryField
protected String propsTableName
protected String propsIdField
protected String propsKeyField
protected String propsValueField
| Constructor Detail |
|---|
public SQLCalendarDB(Connection con,
Properties props)
| Method Detail |
|---|
public boolean containsEntry(CalendarEntry entry)
throws DatabaseException
CalendarDB
containsEntry in interface CalendarDBDatabaseException
public void updateEntry(CalendarEntry entry)
throws CalendarException,
DatabaseException
updateEntry in interface CalendarDBCalendarException
DatabaseException
public CalendarEntry insertEntry(CalendarEntry entry)
throws DatabaseException
CalendarDB
insertEntry in interface CalendarDBDatabaseException
protected int generateNewID()
throws SQLException
SQLException
public boolean deleteEntry(CalendarEntry entry)
throws DatabaseException
deleteEntry in interface CalendarDBDatabaseException
public Collection<CalendarEntry> getEntries(Filter<CalendarEntry> filter)
throws DatabaseException
getEntries in interface CalendarDBDatabaseException
public Collection<Alert> getActiveAlerts()
throws DatabaseException
CalendarDB
getActiveAlerts in interface CalendarDBDatabaseException
public Collection<Alert> getAlerts(Filter<Alert> filter)
throws DatabaseException
getAlerts in interface CalendarDBDatabaseException
public void insertAlert(Alert alert)
throws DatabaseException,
CalendarException
insertAlert in interface CalendarDBDatabaseException
CalendarException
public void updateAlert(Alert alert)
throws DatabaseException,
CalendarException
updateAlert in interface CalendarDBDatabaseException
CalendarException
public void close()
throws DatabaseException
close in interface CalendarDBclose in interface CloseableDatabaseException
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||