Top Description Methods
org.hibernate.persister.spi

public Interface PersisterClassResolver

extends Service
Known Direct Implementers
org.hibernate.persister.internal.StandardPersisterClassResolver
Imports
org.hibernate.mapping.Collection, .PersistentClass, org.hibernate.persister.collection.CollectionPersister, org.hibernate.persister.entity.EntityPersister, org.hibernate.service.Service

Given an entity or collection mapping, resolve the appropriate persister class to use.

The persister class is chosen according to the following rules:

  1. the persister class defined explicitly via annotation or XML
  2. the persister class returned by the installed PersisterClassResolver
  3. the default provider as chosen by Hibernate Core (best choice most of the time)
Authors
Emmanuel Bernard, Steve Ebersole

Method Summary

Modifier and TypeMethod and Description
public Class<? extends CollectionPersister>

Returns:

The collection persister class to use
getCollectionPersisterClass
(Collection
The collection metadata
metadata
)

Returns the collection persister class for a given collection role or null if the collection persister class should be the default.

public Class<? extends EntityPersister>

Returns:

The entity persister class to use
getEntityPersisterClass
(PersistentClass
The entity metadata
metadata
)

Returns the entity persister class for a given entityName or null if the entity persister class should be the default.

Method Detail

getCollectionPersisterClassback to summary
public Class<? extends CollectionPersister> getCollectionPersisterClass(Collection metadata)

Returns the collection persister class for a given collection role or null if the collection persister class should be the default.

Parameters
metadata:Collection

The collection metadata

Returns:Class<? extends CollectionPersister>

The collection persister class to use

getEntityPersisterClassback to summary
public Class<? extends EntityPersister> getEntityPersisterClass(PersistentClass metadata)

Returns the entity persister class for a given entityName or null if the entity persister class should be the default.

Parameters
metadata:PersistentClass

The entity metadata

Returns:Class<? extends EntityPersister>

The entity persister class to use