This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
When defining collections, I've seen some developers prefer to use java.util.Collection, whilst others prefer more specialized types such as java.util.List and java.util.Set. When we use java.util.Collection, Hibernate uses PersistentBag as the implementation class, where as for List and Set, it uses PersistentList, PersistentSet respectively.
In my perspective, I think it's better to use types such as List / Set, because they define certain qualities such as guaranteed ordering, non-duplication, etc (Unless we need to have a Bag).
Same here. By going for a general Collections you will lose some specific methods that a detailed implementation provides. So I also feel you should use Collection type that is most suitable for your requirement