@Nonnull public static BsonNumber<?> getNumeric(BsonDocument doc, String fieldId) throws TypesMismatchException, NoSuchKeyException { return getNumeric(getEntry(doc, fieldId), fieldId); }
@Nonnull public static String getString(BsonDocument doc, String fieldId) throws TypesMismatchException, NoSuchKeyException { return getString(getEntry(doc, fieldId)); }
@Nonnull public static HostAndPort getHostAndPort(BsonDocument doc, String fieldName) throws TypesMismatchException, NoSuchKeyException { return getHostAndPort(getEntry(doc, fieldName)); }
@Nonnull public static BsonObjectId getObjectId(BsonDocument doc, String fieldId) throws TypesMismatchException, NoSuchKeyException { return getObjectId(getEntry(doc, fieldId), fieldId); }
@Nonnull public static BsonDocument getDocument(BsonDocument doc, String fieldId) throws TypesMismatchException, NoSuchKeyException { return getDocument(getEntry(doc, fieldId)); }
@Nonnull public static BsonArray getArray(BsonDocument doc, String fieldId) throws TypesMismatchException, NoSuchKeyException { return getArray(getEntry(doc, fieldId), fieldId); }
@Nonnull public static Instant getInstant(BsonDocument doc, String fieldId) throws TypesMismatchException, NoSuchKeyException { return getInstant(getEntry(doc, fieldId), fieldId); }
@Nullable public static Entry<?> getEntry(BsonDocument doc, BsonField field, Entry<?> defaultValue) { return getEntry(doc, field.getFieldName(), defaultValue); }
public static long getLong(BsonDocument doc, String fieldId) throws TypesMismatchException, NoSuchKeyException { return getLong(getEntry(doc, fieldId), fieldId); }
public static double getDouble(BsonDocument doc, String fieldId) throws TypesMismatchException, NoSuchKeyException { return getDouble(getEntry(doc, fieldId), fieldId); }
@Nonnull public static Entry<?> getEntry(BsonDocument doc, BsonField field) throws NoSuchKeyException { return getEntry(doc, field.getFieldName()); }
public static boolean getBoolean(BsonDocument doc, String fieldId) throws TypesMismatchException, NoSuchKeyException { return getBoolean(getEntry(doc, fieldId), fieldId); }
public static BsonTimestamp getTimestampFromDateTime(BsonDocument doc, DateTimeField field) throws NoSuchKeyException, TypesMismatchException { return getTimestampFromDateTime(getEntry(doc, field)); }