base
Class SQLAccess

java.lang.Object
  extended by base.SQLAccess
Direct Known Subclasses:
SQLLocalAccess

public class SQLAccess
extends Object

This is a base class for all SQL database access operations. The real implementation has to be done within a class that inherits from SQLAccess.


Field Summary
static String CDTable
           
static String CDTracksTable
           
static String DVDTable
           
static String ScheduleTable
           
static String StationsTable
           
static int T_CDS
           
static int T_CDTRACKS
           
static int T_COUNT
           
static int T_DVDS
           
static int T_SCHEDULE
           
static int T_STATIONS
           
static int T_TEXT
           
 
Constructor Summary
SQLAccess()
           
 
Method Summary
 void closeJDBC()
          Closes a JDBC connection to a database; after this method was called the database cant be accessed any longer.
 boolean initJDBC()
          Establishes a new JDBC connection; this method has to be called after object creation and before the database is accessed.
 DefaultListModel loadStations()
          Fetch a full list of TV stations from the database
 void saveRecording(RecordInfo info, String uname, String pwd)
          This method deletes stores a new schedule for a recording within the database
 void saveStations(StationsList list, String uname, String pwd)
          This method deletes a possibly existing list of TV stations out of the database and stores the new one
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

T_CDS

public static final int T_CDS
See Also:
Constant Field Values

T_CDTRACKS

public static final int T_CDTRACKS
See Also:
Constant Field Values

T_STATIONS

public static final int T_STATIONS
See Also:
Constant Field Values

T_DVDS

public static final int T_DVDS
See Also:
Constant Field Values

T_SCHEDULE

public static final int T_SCHEDULE
See Also:
Constant Field Values

T_COUNT

public static final int T_COUNT
See Also:
Constant Field Values

T_TEXT

public static final int T_TEXT
See Also:
Constant Field Values

CDTable

public static final String CDTable
See Also:
Constant Field Values

CDTracksTable

public static final String CDTracksTable
See Also:
Constant Field Values

ScheduleTable

public static final String ScheduleTable
See Also:
Constant Field Values

DVDTable

public static final String DVDTable
See Also:
Constant Field Values

StationsTable

public static final String StationsTable
See Also:
Constant Field Values
Constructor Detail

SQLAccess

public SQLAccess()
Method Detail

closeJDBC

public void closeJDBC()
Closes a JDBC connection to a database; after this method was called the database cant be accessed any longer.


initJDBC

public boolean initJDBC()
Establishes a new JDBC connection; this method has to be called after object creation and before the database is accessed.


loadStations

public DefaultListModel loadStations()
Fetch a full list of TV stations from the database

Returns:
the TV stations that have been stored within the database

saveStations

public void saveStations(StationsList list,
                         String uname,
                         String pwd)
This method deletes a possibly existing list of TV stations out of the database and stores the new one

Parameters:
list - the new list of TV stations to be saved

saveRecording

public void saveRecording(RecordInfo info,
                          String uname,
                          String pwd)
This method deletes stores a new schedule for a recording within the database

Parameters:
info - the schedule information to be saved