Holger's Java API

## 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`

Nested Class Summary

Nested classes/interfaces inherited from class java.util.ResourceBundle
`ResourceBundle.Control`

Field Summary
`protected Connection` `con`
`protected String` `keyFieldName`
`protected String` `tableName`
`protected String` `valueFieldName`

Fields inherited from class java.util.ResourceBundle
`parent`

Constructor Summary
`TableListResourceBundle(Connection con, String tableName, String keyFieldName, String valueFieldName)`

Method Summary
`Connection` `getConnection()`
`protected Object[][]` `getContents()`
`protected Object[][]` `loadData()` refreshes the resources w/ the database content
`void` `refreshContent()` refreshes the embedded content

Methods inherited from class java.util.ListResourceBundle
`getKeys, handleGetObject, handleKeySet`

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`

Field Detail

### con

    protected Connection con

### tableName

    protected String tableName

### keyFieldName

    protected String keyFieldName

### valueFieldName

    protected String valueFieldName

Constructor Detail

### TableListResourceBundle

    public TableListResourceBundle(Connection con,
                                   String tableName,
                                   String keyFieldName,
                                   String valueFieldName)
                            throws InstantiationException

Throws:
  `InstantiationException`

Method Detail

### 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