Holger's
Java API

com.antelmann.sql
Class JDBCResourceBundle

java.lang.Object
  extended by java.util.ResourceBundle
      extended by java.util.ListResourceBundle
          extended by com.antelmann.sql.JDBCResourceBundle

public class JDBCResourceBundle
extends ListResourceBundle

a ResourceBundle that gets its content from a JDBC source

Author:
Holger Antelmann

Field Summary
protected  Connection con
           
protected  String keyFieldName
           
protected  String tableName
           
protected  String valueFieldName
           
 
Fields inherited from class java.util.ResourceBundle
parent
 
Constructor Summary
JDBCResourceBundle(Connection con, String tableName, String keyFieldName, String valueFieldName)
           
 
Method Summary
 Connection getConnection()
           
protected  Object[][] getContents()
           
 void refresh()
          refreshes the resources w/ the database content
 
Methods inherited from class java.util.ListResourceBundle
getKeys, handleGetObject
 
Methods inherited from class java.util.ResourceBundle
getBundle, getBundle, getBundle, getLocale, getObject, getString, getStringArray, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

con

protected Connection con

tableName

protected String tableName

keyFieldName

protected String keyFieldName

valueFieldName

protected String valueFieldName
Constructor Detail

JDBCResourceBundle

public JDBCResourceBundle(Connection con,
                          String tableName,
                          String keyFieldName,
                          String valueFieldName)
                   throws SQLException,
                          IOException
Throws:
SQLException
IOException
Method Detail

refresh

public void refresh()
             throws SQLException,
                    IOException
refreshes the resources w/ the database content

Throws:
SQLException
IOException

getConnection

public Connection getConnection()

getContents

protected Object[][] getContents()
Specified by:
getContents in class ListResourceBundle


(c) 2001-2006 Holger Antelmann - all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads