Interface CollectionPersister

  • All Superinterfaces:
    CollectionDefinition
    All Known Subinterfaces:
    QueryableCollection, SQLLoadableCollection
    All Known Implementing Classes:
    AbstractCollectionPersister, BasicCollectionPersister, OneToManyPersister

    public interface CollectionPersister
    extends CollectionDefinition
    A strategy for persisting a collection role. Defines a contract between the persistence strategy and the actual persistent collection framework and session. Does not define operations that are required for querying collections, or loading by outer join.

    Implements persistence of a collection instance while the instance is referenced in a particular role.

    This class is highly coupled to the PersistentCollection hierarchy, since double dispatch is used to load and update collection elements.

    May be considered an immutable view of the mapping object

    Unless a customer PersisterFactory is used, it is expected that implementations of CollectionDefinition define a constructor accepting the following arguments:

    1. Collection - The metadata about the collection to be handled by the persister
    2. CollectionDataAccess - the second level caching strategy for this collection
    3. PersisterCreationContext - access to additional information useful while constructing the persister.
    See Also:
    QueryableCollection, PersistentCollection