Skip to content

Commit

Permalink
add SysConfigManager.getBigDecimal
Browse files Browse the repository at this point in the history
  • Loading branch information
ar committed Apr 4, 2024
1 parent 98e346b commit 48de2cd
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

package org.jpos.ee;

import java.math.BigDecimal;
import java.util.*;

import org.hibernate.query.NativeQuery;
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 48de2cd

Please # to comment.