org.hibernate.validation.metadata
Interface BeanMetaData<T>

All Known Implementing Classes:
BeanMetaDataImpl

public interface BeanMetaData<T>

Interface defining the meta data about the constraints defined in a given bean.

Author:
Hardy Ferentschik

Method Summary
 boolean defaultGroupSequenceIsRedefined()
           
 java.util.List<MetaConstraint<T,? extends java.lang.annotation.Annotation>> geMetaConstraintsAsList()
           
 java.util.Map<java.lang.Class<?>,java.util.List<MetaConstraint<T,? extends java.lang.annotation.Annotation>>> geMetaConstraintsAsMap()
           
 java.lang.Class<T> getBeanClass()
           
 javax.validation.metadata.BeanDescriptor getBeanDescriptor()
           
 java.util.List<java.lang.reflect.Member> getCascadedMembers()
           
 java.util.Set<javax.validation.metadata.PropertyDescriptor> getConstrainedProperties()
           
 java.util.List<java.lang.Class<?>> getDefaultGroupSequence()
           
 javax.validation.metadata.PropertyDescriptor getPropertyDescriptor(java.lang.String property)
          Return PropertyDescriptor for the given property.
 

Method Detail

getBeanClass

java.lang.Class<T> getBeanClass()
Returns:
the class of the bean.

getBeanDescriptor

javax.validation.metadata.BeanDescriptor getBeanDescriptor()
Returns:
an instance of ElementDescriptor describing the bean this meta data applies for.

getCascadedMembers

java.util.List<java.lang.reflect.Member> getCascadedMembers()
Returns:
A list of all cascaded methods and fields (methods/fields annotated with @Valid).

getDefaultGroupSequence

java.util.List<java.lang.Class<?>> getDefaultGroupSequence()
Returns:
A map mapping defined group sequences to a list of groups.

defaultGroupSequenceIsRedefined

boolean defaultGroupSequenceIsRedefined()
Returns:
true if the entity redefines the default group sequence, false otherwise.

geMetaConstraintsAsMap

java.util.Map<java.lang.Class<?>,java.util.List<MetaConstraint<T,? extends java.lang.annotation.Annotation>>> geMetaConstraintsAsMap()
Returns:
A map of MetaConstraint instances encapsulating the information of all the constraints defined on the bean mapped to the class in which the constraints is defined.

geMetaConstraintsAsList

java.util.List<MetaConstraint<T,? extends java.lang.annotation.Annotation>> geMetaConstraintsAsList()
Returns:
A list of MetaConstraint instances encapsulating the information of all the constraints defined on the bean.

getPropertyDescriptor

javax.validation.metadata.PropertyDescriptor getPropertyDescriptor(java.lang.String property)
Return PropertyDescriptor for the given property.

Parameters:
property - the property for which to retrieve the descriptor.
Returns:
Returns the PropertyDescriptor for the given property or null in case the property does not have a descriptor.

getConstrainedProperties

java.util.Set<javax.validation.metadata.PropertyDescriptor> getConstrainedProperties()
Returns:
the property descriptors having at least one constraint defined or which are marked as cascaded (@Valid).


Copyright © 2007-2009. All Rights Reserved.