biz.c24.io.api.data
Class ValidationException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by biz.c24.io.api.data.ValidationException
All Implemented Interfaces:
Serializable

public class ValidationException
extends Exception

Signals that some exception has occurred during the validation of a data object.

This exception contains references to the context and particular field which were being validated. It also provides a validation result which can be used to distinguish between the possible resons for the exception.

See Also:
Serialized Form

Method Summary
 DataComponent getComponent()
           
 ComplexDataObject getContext()
          Returns the containing object of the field which failed validation.
 String getFieldName()
          Returns the name of the field which failed validation.
 Object getObject()
           
 String getReason()
          Returns the reason for the failure.
 ValidationEvent getUnderlyingEvent()
           
 ValidationResultEnum getValidationResult()
          Returns the validation result.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getUnderlyingEvent

public ValidationEvent getUnderlyingEvent()

getObject

public Object getObject()

getComponent

public DataComponent getComponent()

getContext

public ComplexDataObject getContext()
Returns the containing object of the field which failed validation.

Returns:
The containing object.

getValidationResult

public ValidationResultEnum getValidationResult()
Returns the validation result.

Returns:
The reason for this exception.

getFieldName

public String getFieldName()
Returns the name of the field which failed validation.

Returns:
The field name.

getReason

public String getReason()
Returns the reason for the failure.

Returns:
The reason.


C24 Technologies © 2002-2012: All Rights Reserved.