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

## org.apache.cayenne.validation
Class SimpleValidationFailure

    java.lang.Object
      org.apache.cayenne.validation.SimpleValidationFailure

All Implemented Interfaces:
  java.io.Serializable, ValidationFailure

Direct Known Subclasses:
  BeanValidationFailure

    public class SimpleValidationFailure

extends java.lang.Object
implements ValidationFailure

Represents a generic validation failure that contains failed object and a message describing the failure.

Since:
  1.1
See Also:
  Serialized Form

Field Summary
`protected java.lang.Object` | `error`
`protected java.lang.Object` | `source`

Constructor Summary
`SimpleValidationFailure(java.lang.Object source, java.lang.Object error)`

Method Summary
`java.lang.String` | `getDescription()` Returns the error converted to String.
`java.lang.Object` | `getError()` Returns an user defined error object.
`java.lang.Object` | `getSource()` Returns object that failed the validation.
`java.lang.String` | `toString()` Returns a String representation of the failure.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### source

    protected java.lang.Object source

### error

    protected java.lang.Object error

Constructor Detail

### SimpleValidationFailure

    public SimpleValidationFailure(java.lang.Object source,
                                   java.lang.Object error)

Method Detail

### getDescription

    public java.lang.String getDescription()

  Returns the error converted to String.

  Specified by:
    `getDescription` in interface `ValidationFailure`

### getSource

    public java.lang.Object getSource()

  Returns object that failed the validation.

  Specified by:
    `getSource` in interface `ValidationFailure`
  Returns:
    the failure's source or null in case a source cannot be defined.

### getError

    public java.lang.Object getError()

  Description copied from interface: `ValidationFailure`
  Returns an user defined error object.

  Specified by:
    `getError` in interface `ValidationFailure`

### toString

    public java.lang.String toString()

  Returns a String representation of the failure.

  Overrides:
    `toString` in class `java.lang.Object`

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

Copyright © 2001-2012 Apache Cayenne. All Rights Reserved.