Configurator Class Reference
List of all members.
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 }
| 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 }
| 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 }
Member Data Documentation
The documentation for this class was generated from the following file: