An unordered collection that can contain duplicates
A set is a collection in which no element is repeated, which may be able to enumerate its elements according to an ordering criterion (an "ordered set") or retain no order (an "unordered set").
If your elements are drawn from a small finite set can only be compared for equality then your bag gets much more expensive and i m pretty sure you end up with something like o nk instead
Find all elements that appear more than n/4 times in linear time
Take into account that lazy mappings will be disabled so it may be useful to evaluate what will be need to be set to fetchtype.eager with fetchmode.subselect if more than 1 bag is needed to be initialized with it
Spring 3.1.3 + Hibernate Configuration with annotations and with (Dynamic) AbstractRoutingDataSource