org.oreodata
Class DataException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--org.oreodata.DataException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
DuplicateRecordException, InvalidDataException, MangledDataException, MissingContextException, MissingDataException, MissingRecordException, ModifiedRecordException, TransactionException

public class DataException
extends java.io.IOException

The base exception for Oreo data. This object optionally encapsulates a Record instance which is the data record relevant to the exception thrown.

Author:
Jonathan Revusky
See Also:
Serialized Form

Constructor Summary
DataException(Record record, java.lang.Exception nestedException)
           
DataException(Record record, java.lang.String message)
           
 
Method Summary
 java.util.Locale getLocale()
           
 java.lang.String getLocalizedMessage()
          Currently, this method is rather half-baked.
 java.lang.Exception getNestedException()
           
 Record getRecord()
           
 void setLocale(java.util.Locale locale)
           
 void setRecord(Record record)
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, 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
 

Constructor Detail

DataException

public DataException(Record record,
                     java.lang.String message)

DataException

public DataException(Record record,
                     java.lang.Exception nestedException)
Method Detail

getRecord

public final Record getRecord()

setRecord

public void setRecord(Record record)

getLocale

public java.util.Locale getLocale()

setLocale

public void setLocale(java.util.Locale locale)

getLocalizedMessage

public java.lang.String getLocalizedMessage()
Currently, this method is rather half-baked. It only replaces the field name in a message by its localized equivalent. TODO: Some disposition for getting the localized message pattern, i.e. "Le champ %1 est obligatoire." for the French pattern of saying that a given field is required.

Overrides:
getLocalizedMessage in class java.lang.Throwable

getNestedException

public java.lang.Exception getNestedException()