public static String getStringId(GenericModel<?> hasId) { String stringId = null; if (hasId != null) { Long id = hasId.getId(); stringId = getStringId(id); } return stringId; }