Configurator Class Reference

Collaboration diagram for Configurator:
[legend]

List of all members.

Public Member Functions

void setConfiguration ()
void updateParam (String id, String value)
String getParam (String id)
void closeConfig ()

Static Public Attributes

static ResultSet config = null
static ResultSet crs = null


Member Function Documentation

void Configurator::closeConfig (  )  [inline]

00042                                  {
00043 
00044                 if (config != null) {
00045                         try {
00046                                 config.close();
00047                         } catch (Exception e) { }
00048                         config = null;
00049                 }
00050                 System.out.println("Config closed!");
00051         }

String Configurator::getParam ( String  id  )  [inline]

00027                                          {
00028                 ResultSet res = null;
00029                 String result = null;
00030 
00031                 try{
00032                         res = db.getResult("SELECT Value FROM Config WHERE ConfigID = " + id);
00033                         res.next();
00034                         result = res.getString(1);
00035                 } catch (Exception e){
00036                         System.out.println("getParam failed with " + e);
00037                 }
00038                 
00039                 return result;
00040         }

Here is the call graph for this function:

void Configurator::setConfiguration (  )  [inline]

00008                                       {
00009                 try {
00010                         config = db.getResult("SELECT SQL_CALC_FOUND_ROWS ConfigID, Label, Value FROM Config");
00011                         crs = db.getResult("SELECT FOUND_ROWS()");
00012                         crs.next();
00013                 } catch (Exception e){
00014                         System.out.println("setConfiguration failed with " + e);
00015                 }
00016         }

Here is the call graph for this function:

void Configurator::updateParam ( String  id,
String  value 
) [inline]

00018                                                         {
00019                 String[] params = {value, id};
00020                 try {
00021                         db.execute("UPDATE Config SET Value = ? WHERE ConfigID = ?", params);
00022                 }catch (Exception e){
00023                         System.out.println("updateParam failed with " + e);
00024                 }
00025         }

Here is the call graph for this function:


Member Data Documentation

ResultSet Configurator::config = null [static]

ResultSet Configurator::crs = null [static]


The documentation for this class was generated from the following file:

Generated on Thu Oct 22 17:40:09 2009 for JAVAProxyClick by  doxygen 1.5.8