org.hibernate.cfg
Class PropertyInferredData

java.lang.Object
  extended by org.hibernate.cfg.PropertyInferredData

public class PropertyInferredData
extends Object

Retrieve all inferred data from an annnoted element Currently support field and getter processing. An exception is thrown when the annoted element does not fit. The calculation is lazied until the first access to a public getter. This prevent useless reflection.

Author:
Emmanuel Bernard

Constructor Summary
PropertyInferredData(AnnotatedElement annotedElt, Class rootEntity, String propertyAccessor)
          Take the annoted element for lazy process
PropertyInferredData(String defaultAccess, String propertyName, Class returnedClass)
           
 
Method Summary
 Class getCollectionType()
           
 String getDefaultAccess()
           
 String getPropertyName()
           
 Class getReturnedClass()
          Return the class itself
 String getReturnedClassName()
          Returns the returned class name itself
 Class getReturnedClassOrElement()
          Returns the returned class itself or the element type if an array
 String getReturnedClassOrElementName()
          Returns the returned class name itself or the element type if an array
 boolean isArray()
           
 boolean skip()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyInferredData

public PropertyInferredData(String defaultAccess,
                            String propertyName,
                            Class returnedClass)

PropertyInferredData

public PropertyInferredData(AnnotatedElement annotedElt,
                            Class rootEntity,
                            String propertyAccessor)
Take the annoted element for lazy process

Parameters:
annotedElt - element to process
propertyAccessor -
Method Detail

skip

public boolean skip()

getDefaultAccess

public String getDefaultAccess()
                        throws org.hibernate.MappingException
Returns:
default member access (whether field or property)
Throws:
org.hibernate.MappingException - No getter or field found or wrong JavaBean spec usage

getPropertyName

public String getPropertyName()
                       throws org.hibernate.MappingException
Returns:
property name
Throws:
org.hibernate.MappingException - No getter or field found or wrong JavaBean spec usage

getReturnedClassOrElement

public Class getReturnedClassOrElement()
                                throws org.hibernate.MappingException
Returns the returned class itself or the element type if an array

Throws:
org.hibernate.MappingException

getReturnedClass

public Class getReturnedClass()
                       throws org.hibernate.MappingException
Return the class itself

Throws:
org.hibernate.MappingException

getReturnedClassOrElementName

public String getReturnedClassOrElementName()
                                     throws org.hibernate.MappingException
Returns the returned class name itself or the element type if an array

Throws:
org.hibernate.MappingException

getReturnedClassName

public String getReturnedClassName()
                            throws org.hibernate.MappingException
Returns the returned class name itself

Throws:
org.hibernate.MappingException

getCollectionType

public Class getCollectionType()
Returns:
collection type if any, or null otherwise

isArray

public boolean isArray()