using afIocusing afIocConfigusing afMongo** (Service) - ** The main entry point into Morphia.constmixin Morphia {** The MongoDB database this 'Morphia' instance wraps. ** By default the database is taken from the [MongoUrl]`MorphiaConfigIds.mongoUrl`. abstract Database database()** Convenience / shorthand notation for 'datastore(entityType, database)' @Operatorabstract Datastore get(Type entityType, Database? database := null)** Returns a 'Datastore' instance for the given entity type.** ** If 'database' is null, the default database from the Mongo connection url is used.abstract Datastore datastore(Type entityType, Database? database := null)** Converts the given Mongo document to a Fantom entity instance.** ** Convenience for 'Converters.toFantom(...)'abstract Obj fromMongoDoc(Type entityType, Str:Obj? mongoDoc)** Converts the given entity instance to a Mongo document.** ** Convenience for '(Str:Obj?) Converters.toMongo(...)' - note the cast.abstract Str:Obj? toMongoDoc(Obj entity)}internalconstclass MorphiaImpl : Morphia {overrideconst Database database @Inject privateconst Converters converters @Inject privateconst Registry registryprivatenew make(Database database, |This|in){ in(this)this.database = database} @Operatoroverride Datastore get(Type entityType, Database? database := null){ datastore(entityType, database)}override Datastore datastore(Type entityType, Database? database := null){ registry.autobuild(Datastore#, [entityType, database ?: this.database])}override Obj fromMongoDoc(Type entityType, Str:Obj? mongoDoc){ converters.toFantom(entityType, mongoDoc)}override Str:Obj? toMongoDoc(Obj entity){ converters.toMongo(entity)}}