Provides interfaces for the data layer which contains classes for typed data values, data collections, and handlers. A {@link com.vaadin.data.Property Property} is a simple typed data value; an {@link com.vaadin.data.Item Item} is a collection of Properties, each corresponding to a unique identifier; a {@link com.vaadin.data.Container Container} is a collection of identified Items with special constraints; a {@link com.vaadin.data.Buffered Buffered} class is able to track its changes and to commit or discard them later.

Package Specification

The package contains a three-tiered structure for typed data objects and collections of them:

In addition to these interfaces the package contains the {@link com.vaadin.data.Buffered Buffered} interface, which defines the methods to make an object buffered, that is, track the changes to an object and allow committing or discarding them at a later time.

Provides interfaces for the validation framework. The framework defines two interfaces; one for classes that need to support external validation, and another one for the validators themselves.

Validation

The most important method defined by the {@link com.vaadin.data.Validatable Validatable} interface is {@link com.vaadin.data.Validatable#isValid() isValid()}. It asks all registered validators to verify if the object's value is valid or not. Note that it depends on the validators registered for a object which values are valid and which are not. For example, a null value can be valid value for one validator but invalid for another.

In addition to isValid(), Validatable defines methods to add, remove and list validators of a validatable object.

{@link com.vaadin.data.Validator Validator} defines the interface for an external validator. These validators may be added to any Validatable object, and their task is to check, when requested, that the object which they are attached to contains a valid value. The actual validation logic is hidden in the {@link com.vaadin.data.Validator#validate(Object) validate(Object)} method.

In addition to check(Object), Validator defines the InvalidValueException which is used to signal that a checked value is invalid, and the {@link com.vaadin.data.Validator.Suggestive Suggestive} subinterface which includes functionality to suggest a valid value for the validated object.