接口 CollectionPersister

  • 所有超级接口:
    CollectionDefinition
    所有已知子接口:
    QueryableCollection, SQLLoadableCollection
    所有已知实现类:
    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.
    作者:
    Gavin King
    另请参阅:
    QueryableCollection, PersistentCollection