Class Database
server

abstract public class Database
This is simply the start on a useful Helper-style class...
See Also:  Node Documentation

Field Summary
private Connection
private String
Constructor Summary
Database(Connection connection)
Method Summary
void
protected void
delete(int id)
protected void
delete(String whereClause)
protected void
executeUpdate(String query)
protected Object
get(String[] columnNames)
protected Object
get(String[] columnNames)
private String
getColumnNameString(String[] columnNames)
protected abstract Object
protected String
getDBDate(java.util.Date date)
protected String
getDBString(String str)
protected IDString
getIDString(int id)
protected IDString
getIDString(String idColumn)
protected IDString
getIDString(ResultSet rs)
private IDString
protected Vector
protected Vector
getIDStringList(String idColumnName)
protected Vector
getIDStringList(String idColumnName)
protected Vector
getStringList(String textColumnName)
protected Vector
getStringList(String textColumnName)
protected String
protected void
insert(String[] columnNames)
void
protected CustResultSet
select(String query)
protected Vector
selectList(String[] columnNames)
protected Vector
selectList(String[] columnNames)
protected void
setTableName(String tableName)
protected void
update(String[] columnNames)
Field Detail
connection
private Connection connection = null

tableName
private String tableName = ""
Constructor Detail
Database
protected Database(Connection connection)
Method Detail
getIDStringList
protected Vector getIDStringList()
                          throws SQLException

getIDStringList
protected Vector getIDStringList(String idColumnName)
                          throws SQLException

getIDStringList
protected Vector getIDStringList(String idColumnName)
                          throws SQLException

select
protected CustResultSet select(String query)
                        throws SQLException

getStringList
protected Vector getStringList(String textColumnName)
                        throws SQLException

getStringList
protected Vector getStringList(String textColumnName)
                        throws SQLException

delete
protected void delete(int id)
               throws SQLException

delete
protected void delete(String whereClause)
               throws SQLException

executeUpdate
protected void executeUpdate(String query)
                      throws SQLException

getData
protected abstract Object getData(CustResultSet rs)
                           throws SQLException

selectList
protected Vector selectList(String[] columnNames)
                     throws SQLException

selectList
protected Vector selectList(String[] columnNames)
                     throws SQLException

get
protected Object get(String[] columnNames)
              throws SQLException

get
protected Object get(String[] columnNames)
              throws SQLException

getIDString
protected IDString getIDString(int id)
                        throws SQLException

getIDString
protected IDString getIDString(String idColumn)
                        throws SQLException

insert
protected void insert(String[] columnNames)
               throws SQLException

update
protected void update(String[] columnNames)
               throws SQLException

getColumnNameString
private String getColumnNameString(String[] columnNames)

getDBString
protected String getDBString(String str)

getDBDate
protected String getDBDate(java.util.Date date)

getIDString
private IDString getIDString(CustResultSet rs)
                      throws SQLException

getIDString
protected IDString getIDString(ResultSet rs)
                        throws SQLException

commit
public void commit()
            throws SQLException

rollback
public void rollback()
              throws SQLException

getTableName
protected String getTableName()

setTableName
protected void setTableName(String tableName)