|
CFEngine API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.recommender.util.Database
Describes functions to maniplate databases thru JDBC.
Constructor Summary | |
Database()
|
Method Summary | |
static void |
createTable(java.lang.String tableName,
java.lang.String tableFormat,
java.sql.Statement stmt)
Create an SQL table |
static java.sql.Connection |
getConnection()
Load in database properties and create connection with database using the url, username, password specified in the properties. |
static void |
insertIntoTable(java.lang.String tableName,
java.lang.String values,
java.sql.Statement stmt)
Insert value to a table. |
static void |
showTable(java.lang.String tableName,
java.sql.Statement stmt)
Print out the whole table. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Database()
Method Detail |
public static java.sql.Connection getConnection() throws java.sql.SQLException
java.sql.SQLException
public static void createTable(java.lang.String tableName, java.lang.String tableFormat, java.sql.Statement stmt) throws java.sql.SQLException
tableName
- tableFormat
- stmt
-
java.sql.SQLException
public static void insertIntoTable(java.lang.String tableName, java.lang.String values, java.sql.Statement stmt) throws java.sql.SQLException
tableName
- values
- stmt
-
java.sql.SQLException
public static void showTable(java.lang.String tableName, java.sql.Statement stmt) throws java.sql.SQLException
tableName
- stmt
-
java.sql.SQLException
|
CFEngine API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |