org.hibernate.property

Class PropertyAccessorFactory


public final class PropertyAccessorFactory
extends java.lang.Object

A factory for building/retrieving PropertyAccessor instances.
Authors:
Gavin King
Steve Ebersole

Method Summary

static PropertyAccessor
getDom4jPropertyAccessor(String nodeName, Type type, SessionFactoryImplementor factory)
static PropertyAccessor
getDynamicMapPropertyAccessor()
static PropertyAccessor
getPropertyAccessor(Class optionalClass, String type)
static PropertyAccessor
getPropertyAccessor(String type)
static PropertyAccessor
getPropertyAccessor(Property property, EntityMode mode)
Retrieves a PropertyAccessor instance based on the given property definition and entity mode.

Method Details

getDom4jPropertyAccessor

public static PropertyAccessor getDom4jPropertyAccessor(String nodeName,
                                                        Type type,
                                                        SessionFactoryImplementor factory)
            throws MappingException

getDynamicMapPropertyAccessor

public static PropertyAccessor getDynamicMapPropertyAccessor()
            throws MappingException

getPropertyAccessor

public static PropertyAccessor getPropertyAccessor(Class optionalClass,
                                                   String type)
            throws MappingException

getPropertyAccessor

public static PropertyAccessor getPropertyAccessor(String type)
            throws MappingException

getPropertyAccessor

public static PropertyAccessor getPropertyAccessor(Property property,
                                                   EntityMode mode)
            throws MappingException
Retrieves a PropertyAccessor instance based on the given property definition and entity mode.
Parameters:
property - The property for which to retrieve an accessor.
mode - The mode for the resulting entity.
Returns:
An appropriate accessor.