Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cayenne.validation
Interface ValidationFailure

All Superinterfaces:
  java.io.Serializable

All Known Implementing Classes:
  BeanValidationFailure, SimpleValidationFailure

    public interface ValidationFailure

extends java.io.Serializable

Definea a single failure during the validation process. Implementing classes may store any extra information to help callers to identify the source and reasons for the failure.

Since:
  1.1
Author:
  Fabricio Voznika
See Also:
  `BeanValidationFailure`

Method Summary
`java.lang.String` | `getDescription()` Returns a String representation of the error object.
`java.lang.Object` | `getError()` Returns an user defined error object.
`java.lang.Object` | `getSource()` Returns the object that has generated the failure.

Method Detail

### getSource

    java.lang.Object getSource()

  Returns the object that has generated the failure. For example, if a `Person` must have a name and a `ValidationFailure` is created when the user attempts to save it, the `Person` object would be the failure source.

  Returns:
    the failure's source or null in case a source cannot be defined.

### getError

    java.lang.Object getError()

  Returns an user defined error object.

### getDescription

    java.lang.String getDescription()

  Returns a String representation of the error object. This is used in log messages and exceptions.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2006 Apache.org All Rights Reserved.