-
Type: Improvement
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.11.2
-
Component/s: API
-
None
-
Minor Change
In our code, we'd like to have the ability to make a "DBCollection" class that would delegate all operations to the real DBCollection that we get from the Mongo driver and centralize operations around our db operations (ie: logging) in one place. However, DBCollection is an abstract class and not an interface.
Would it be possible to add the public methods of the current DBCollection to a DBCollection interface and change the current class to be called DBCollectionAbstract, which implements DBCollection? It would allow this paradigm we want to use, allowing existing libraries to make use of custom DBCollections, and should only break driver users who have extended DBCollection and made their own. I'd be happy to contribute code for this as well.
Thanks!
- duplicates
-
JAVA-303 Convert Mongo/DB/DBCollection to interfaces
- Closed