getCollection

fun <T : Any> getCollection(collectionName: String, resultClass: Class<T>): MongoCollection<T>

Gets a collection.

Return

the collection

Parameters

T

the default class to covert documents returned from the collection into.

collectionName

the name of the collection to return

resultClass

the target document type for the collection


inline fun <T : Any> getCollection(collectionName: String): MongoCollection<T>

Gets a collection.

Return

the collection

Parameters

T

the default class to covert documents returned from the collection into.

collectionName

the name of the collection to return