Class PersistentBag<E>

  • All Implemented Interfaces:
    Serializable, Iterable<E>, Collection<E>, List<E>, LazyInitializable, PersistentCollection<E>

    public class PersistentBag<E>
    extends AbstractPersistentCollection<E>
    implements List<E>
    An unordered, unkeyed collection that can contain the same element multiple times. The Java collections API, curiously, has no Bag. Most developers seem to use Lists to represent bag semantics, so Hibernate follows this practice.
    See Also:
    Serialized Form
    "API Note:"
    Incubating in terms of making this non-internal. These contracts will be getting cleaned up in following releases.