1.1 --- a/java/sql-dk/src/info/globalcode/sql/dk/configuration/Properties.java Tue Dec 31 18:11:50 2013 +0100
1.2 +++ b/java/sql-dk/src/info/globalcode/sql/dk/configuration/Properties.java Wed Jan 01 01:06:38 2014 +0100
1.3 @@ -88,4 +88,22 @@
1.4 Collections.copy(clone, this);
1.5 return clone;
1.6 }
1.7 +
1.8 + /**
1.9 + * @return merged this and backing defaults as Java Properties
1.10 + */
1.11 + public java.util.Properties getJavaProperties() {
1.12 + java.util.Properties javaProperties = new java.util.Properties();
1.13 + if (defaults != null) {
1.14 + duplicateTo(javaProperties);
1.15 + }
1.16 + duplicateTo(javaProperties);
1.17 + return javaProperties;
1.18 + }
1.19 +
1.20 + private void duplicateTo(java.util.Properties javaProperties) {
1.21 + for (Property p : this) {
1.22 + javaProperties.setProperty(p.getName(), p.getValue());
1.23 + }
1.24 + }
1.25 }