Top Description Methods
org.hibernate.validator.cfg.context

public Interface PropertyTarget

Known Direct Subinterfaces
org.hibernate.validator.cfg.context.TypeConstraintMappingContext, org.hibernate.validator.cfg.context.ContainerElementConstraintMappingContext, org.hibernate.validator.cfg.context.PropertyConstraintMappingContext
Imports
java.lang.annotation.ElementType

Facet of a constraint mapping creational context which allows to select the bean property to which the next operations shall apply.
Authors
Kevin Pollet <[email protected]> (C) 2011 SERLI, Gunnar Morling

Method Summary

Modifier and TypeMethod and Description
public PropertyConstraintMappingContext

Returns:

A creational context representing the selected field property.
field
(String
The field name that represents a property on which to apply the following constraints.
property
)

Deprecated as a consequence of PropertyConstraintMappingContext being deprecated.
Selects a field to which the next operations shall apply.
public PropertyConstraintMappingContext

Returns:

A creational context representing the selected getter property.
getter
(String
The getter property name (using the Java Bean notation, e.g. name to address getName()) that represents a property on which to apply the following constraints.
property
)

Deprecated as a consequence of PropertyConstraintMappingContext being deprecated.
Selects a getter to which the next operations shall apply.
public PropertyConstraintMappingContext

Returns:

A creational context representing the selected property.
property
(String
The property on which to apply the following constraints (Java Bean notation).
property
,
ElementType
The access type (field/property).
type
)

Deprecated Since 6.1.
Selects a property to which the next operations shall apply.

Method Detail

fieldback to summary
public PropertyConstraintMappingContext field(String property)

Deprecated

as a consequence of PropertyConstraintMappingContext being deprecated. See corresponding docs for further information.

Selects a field to which the next operations shall apply.

Until this method is called constraints apply on class level. After calling this method constraints apply on the specified field property.

A given field may only be configured once.

Parameters
property:String

The field name that represents a property on which to apply the following constraints.

Returns:PropertyConstraintMappingContext

A creational context representing the selected field property.

getterback to summary
public PropertyConstraintMappingContext getter(String property)

Deprecated

as a consequence of PropertyConstraintMappingContext being deprecated. See corresponding docs for further information.

Selects a getter to which the next operations shall apply.

Until this method is called constraints apply on class level. After calling this method constraints apply on the specified getter property.

A given getter may only be configured once.

Parameters
property:String

The getter property name (using the Java Bean notation, e.g. name to address getName()) that represents a property on which to apply the following constraints.

Returns:PropertyConstraintMappingContext

A creational context representing the selected getter property.

propertyback to summary
public PropertyConstraintMappingContext property(String property, ElementType type)

Deprecated

Since 6.1. Planned for removal. Use either PropertyTarget#field(String) or PropertyTarget#getter(String) instead.

Selects a property to which the next operations shall apply.

Until this method is called constraints apply on class level. After calling this method constraints apply on the specified property with the given access type.

A given property may only be configured once.

Parameters
property:String

The property on which to apply the following constraints (Java Bean notation).

type:ElementType

The access type (field/property).

Returns:PropertyConstraintMappingContext

A creational context representing the selected property.

Annotations
@Deprecated