package Ġcom . fre tron . vehicle Manager . di . modules Ċ Ċ import Ġcom . fre tron . vehicle Manager . App Constants Ċ import Ġcom . fre tron . vehicle Manager . App Constants . KEY _ VE H IC LE _ COLLECTION _ NAME Ċ import Ġcom . mongodb . Mongo Client Ċ import Ġcom . mongodb . client . Mongo Database Ċ import Ġdagger . Module Ċ import Ġdagger . Provides Ċ import Ġjavax . inject . Named Ċ import Ġjavax . inject . Singleton Ċ Ċ @ Module Ċ open Ġclass ĠDatabase Module Ġ{ ĊĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġfun Ġprovide Mongo Client (): ĠMongo Client Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠMongo Client ( App Constants . DB _ HOST , ĠApp Constants . DB _ PORT ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġfun Ġprovide Database ( ĊĠĠĠĠĠĠĠ Ġmongo Client : ĠMongo Client , ĊĠĠĠĠĠĠĠ Ġ@ Named ( KEY _ VE H IC LE _ COLLECTION _ NAME ) Ġcollection Name : ĠString ĊĠĠĠ Ġ): ĠMongo Database Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġmongo Client . get Database ( collection Name ) ĊĠĠĠ Ġ} Ċ Ċ }