com.antelmann.sql
Class JDBCResourceControl
java.lang.Object
java.util.ResourceBundle.Control
com.antelmann.sql.JDBCResourceControl
public class JDBCResourceControl
- extends ResourceBundle.Control
allows to conveniently store language in a jdbc table, where column names correspond to the locale
- Since:
- 9. März 2007, 16:44
- Author:
- Holger Antelmann
- See Also:
JDBCResourceBundle,
TableListResourceBundle,
JDBCResourceBundle
|
Constructor Summary |
JDBCResourceControl(Connection con,
String keyColumn,
String valueBaseColumn,
boolean useCaching)
if useCaching is true, a TableResourceBundle is used; otherwise, a JDBCResourceBundle is used. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JDBCResourceControl
public JDBCResourceControl(Connection con,
String keyColumn,
String valueBaseColumn,
boolean useCaching)
- if useCaching is true, a TableResourceBundle is used; otherwise, a JDBCResourceBundle is used.
getFallbackLocale
public Locale getFallbackLocale(String baseName,
Locale l)
- always returns null, so that instead of defaulting to the default locale of the system,
this control uses the root locale.
- Overrides:
getFallbackLocale in class ResourceBundle.Control
getFormats
public List<String> getFormats(String baseName)
- Overrides:
getFormats in class ResourceBundle.Control
newBundle
public ResourceBundle newBundle(String baseName,
Locale locale,
String format,
ClassLoader loader,
boolean reload)
throws IllegalAccessException,
InstantiationException,
IOException
- returns either a JDBCResourceBundle or a TableResourceBundle, depending on
whether caching is used (see constructor).
- Overrides:
newBundle in class ResourceBundle.Control
- Throws:
IllegalAccessException
InstantiationException
IOException
(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads