MCPcopy Create free account
hub / github.com/cmu-db/benchbase / getLong

Method getLong

src/main/java/com/oltpbenchmark/util/SQLUtil.java:52–68  ·  view source on GitHub ↗

Return a long from the given object Handles the different cases from the various DBMSs @param obj @return

(Object obj)

Source from the content-addressed store, hash-verified

50 * @return
51 */
52 public static Long getLong(Object obj) {
53 if (obj == null) {
54 return (null);
55 }
56
57 if (obj instanceof Long) {
58 return (Long) obj;
59 } else if (obj instanceof Integer) {
60 return ((Integer) obj).longValue();
61 } else if (obj instanceof BigDecimal) {
62 return ((BigDecimal) obj).longValue();
63 }
64
65 LOG.warn("BAD BAD BAD: returning null because getLong does not support {}", obj.getClass());
66
67 return (null);
68 }
69
70 public static Integer getInteger(Object obj) {
71 if (obj == null) {

Callers 15

processItemRecordMethod · 0.95
executeGetUserInfoMethod · 0.95
executeNewCommentMethod · 0.95
loadConfigProfileMethod · 0.95
loadConfigHistogramsMethod · 0.95
loadCodeXrefMethod · 0.95
getTimestampMethod · 0.95
mainMethod · 0.80
runMethod · 0.80
runMethod · 0.80

Calls 1

getClassMethod · 0.80

Tested by

no test coverage detected