diff --git a/modules/sysconfig/src/main/java/org/jpos/ee/SysConfigManager.java b/modules/sysconfig/src/main/java/org/jpos/ee/SysConfigManager.java index 57b05add29..cbad6ece06 100644 --- a/modules/sysconfig/src/main/java/org/jpos/ee/SysConfigManager.java +++ b/modules/sysconfig/src/main/java/org/jpos/ee/SysConfigManager.java @@ -18,6 +18,7 @@ package org.jpos.ee; +import java.math.BigDecimal; import java.util.*; import org.hibernate.query.NativeQuery; @@ -223,6 +224,14 @@ public boolean getBoolean (String name, boolean def) { return v.length() == 0 ? def : (v.equalsIgnoreCase("true") || v.equalsIgnoreCase("yes")); } + + public BigDecimal getBigDecimal (String name, BigDecimal def) { + String v = get (name); + return v != null ? new BigDecimal(v.trim()) : def; + } + public BigDecimal getBigDecimal (String name) { + return getBigDecimal (name, BigDecimal.ZERO); + } public int getMaxIdLength() { String queryString = "select max(length(id)) as maxidlen from sysconfig"; if (prefix != null)