comm.setLong(2, Utility.durationToTimeInMS(policy.getDataTTL())); if (policy.getLocation() != null) { comm.setDouble(3, policy.getLocation().getLatitude()); comm.setDouble(4, policy.getLocation().getLongitude()); } else { comm.setNull(3, Types.DOUBLE);