com.antelmann.sql
Class TableListResourceBundle
java.lang.Object
java.util.ResourceBundle
java.util.ListResourceBundle
com.antelmann.sql.TableListResourceBundle
- All Implemented Interfaces:
- Refreshable
public class TableListResourceBundle
- extends ListResourceBundle
- implements Refreshable
a ResourceBundle that initially obtains its content from a JDBC source
and caches it as a ListResourceBundle
- Author:
- Holger Antelmann
- See Also:
JDBCResourceBundle
| Methods inherited from class java.util.ResourceBundle |
clearCache, clearCache, containsKey, getBundle, getBundle, getBundle, getBundle, getBundle, getBundle, getLocale, getObject, getString, getStringArray, keySet, setParent |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
con
protected Connection con
tableName
protected String tableName
keyFieldName
protected String keyFieldName
valueFieldName
protected String valueFieldName
TableListResourceBundle
public TableListResourceBundle(Connection con,
String tableName,
String keyFieldName,
String valueFieldName)
throws InstantiationException
- Throws:
InstantiationException
refreshContent
public void refreshContent()
throws IOException
- Description copied from interface:
Refreshable
- refreshes the embedded content
- Specified by:
refreshContent in interface Refreshable
- Throws:
IOException - if the refresh failed
loadData
protected Object[][] loadData()
throws SQLException
- refreshes the resources w/ the database content
- Throws:
SQLException
getConnection
public Connection getConnection()
getContents
protected Object[][] getContents()
- Specified by:
getContents in class ListResourceBundle
(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads