Top Description Fields Constructors Methods
org.hibernate.cfg

pack-priv Class PropertyContainer

extends Object
Class Inheritance
Imports
java.util.Collection, .Collections, .List, .Map, .TreeMap, javax.persistence.Access, .ManyToMany, .ManyToOne, .OneToMany, .OneToOne, .Transient, org.slf4j.Logger, .LoggerFactory, org.hibernate.AnnotationException, .MappingException, org.hibernate.annotations.ManyToAny, .Target, .Type, org.hibernate.annotations.common.reflection.XClass, .XProperty, org.hibernate.util.StringHelper

A helper class to keep the XPropertys of a class ordered by access type.
Author
Hardy Ferentschik

Field Summary

Modifier and TypeField and Description
private final XClass
private final AccessType
private final TreeMap<String, XProperty>
fieldAccessMap

Constains the properties which must be returned in case the class is accessed via AccessType.FIELD.

private static final Logger
private final TreeMap<String, XProperty>
propertyAccessMap

Constains the properties which must be returned in case the class is accessed via AccessType.Property.

private final XClass
xClass

The class for which this container is created.

Constructor Summary

AccessConstructor and Description
pack-priv
PropertyContainer(XClass clazz, XClass entityAtStake)

Method Summary

Modifier and TypeMethod and Description
private void
private void
private AccessType
private static boolean
public XClass
public XClass
public AccessType
public Collection<XProperty>
public boolean
private TreeMap<String, XProperty>

Returns:

A maps of the properties with the given access type keyed against their property name
initProperties
(AccessType
The access type - AccessType.FIELD or AccessType.Property
access
)

Retrieves all properties from the xClass with the specified access type.

private static boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

entityAtStakeback to summary
private final XClass entityAtStake
explicitClassDefinedAccessTypeback to summary
private final AccessType explicitClassDefinedAccessType
fieldAccessMapback to summary
private final TreeMap<String, XProperty> fieldAccessMap

Constains the properties which must be returned in case the class is accessed via AccessType.FIELD. Note, this does not mean that all XPropertys in this map are fields. Due to JPA access rules single properties can have different access type than the overall class access type.

logback to summary
private static final Logger log
propertyAccessMapback to summary
private final TreeMap<String, XProperty> propertyAccessMap

Constains the properties which must be returned in case the class is accessed via AccessType.Property. Note, this does not mean that all XPropertys in this map are properties/methods. Due to JPA access rules single properties can have different access type than the overall class access type.

xClassback to summary
private final XClass xClass

The class for which this container is created.

Constructor Detail

PropertyContainerback to summary
pack-priv PropertyContainer(XClass clazz, XClass entityAtStake)

Method Detail

assertTypesAreResolvableback to summary
private void assertTypesAreResolvable(AccessType access)
considerExplicitFieldAndPropertyAccessback to summary
private void considerExplicitFieldAndPropertyAccess()
determineClassDefinedAccessStrategyback to summary
private AccessType determineClassDefinedAccessStrategy()
discoverTypeWithoutReflectionback to summary
private static boolean discoverTypeWithoutReflection(XProperty p)
getDeclaringClassback to summary
public XClass getDeclaringClass()
getEntityAtStakeback to summary
public XClass getEntityAtStake()
getExplicitAccessStrategyback to summary
public AccessType getExplicitAccessStrategy()
getPropertiesback to summary
public Collection<XProperty> getProperties(AccessType accessType)
hasExplicitAccessStrategyback to summary
public boolean hasExplicitAccessStrategy()
initPropertiesback to summary
private TreeMap<String, XProperty> initProperties(AccessType access)

Retrieves all properties from the xClass with the specified access type. This method does not take any jpa access rules/annotations into account yet.

Parameters
access:AccessType

The access type - AccessType.FIELD or AccessType.Property

Returns:TreeMap<String, XProperty>

A maps of the properties with the given access type keyed against their property name

mustBeSkippedback to summary
private static boolean mustBeSkipped(XProperty property)