(Object obj)
| 68 | } |
| 69 | |
| 70 | public static Integer getInteger(Object obj) { |
| 71 | if (obj == null) { |
| 72 | return (null); |
| 73 | } |
| 74 | |
| 75 | if (obj instanceof Integer) { |
| 76 | return (Integer) obj; |
| 77 | } else if (obj instanceof Long) { |
| 78 | return ((Long) obj).intValue(); |
| 79 | } else if (obj instanceof BigDecimal) { |
| 80 | return ((BigDecimal) obj).intValue(); |
| 81 | } |
| 82 | |
| 83 | LOG.warn("BAD BAD BAD: returning null because getInteger does not support {}", obj.getClass()); |
| 84 | |
| 85 | return (null); |
| 86 | } |
| 87 | |
| 88 | /** |
| 89 | * Return a double from the given object Handles the different cases from the various DBMSs |
no test coverage detected