[JAVA-934] Change Mongo/DB/DBCollection to interfaces Created: 22/Aug/13  Updated: 02/Jun/16  Resolved: 04/Sep/13

Status: Closed
Project: Java Driver
Component/s: API
Affects Version/s: 2.11.2
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Michael Braun Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates JAVA-303 Convert Mongo/DB/DBCollection to inte... Closed
Backwards Compatibility: Minor Change

 Description   

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!



 Comments   
Comment by Jeffrey Yemin [ 04/Sep/13 ]

Closing as a duplicate of JAVA-303.

Generated at Thu Feb 08 08:53:25 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.