com.caucho.ejb
Class DuplicateKeyWrapper

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by javax.ejb.CreateException
              extended by javax.ejb.DuplicateKeyException
                  extended by com.caucho.ejb.DuplicateKeyWrapper
All Implemented Interfaces:
ExceptionWrapper, java.io.Serializable

public class DuplicateKeyWrapper
extends DuplicateKeyException
implements ExceptionWrapper

Wraps the actual exception with an EJB exception

See Also:
Serialized Form

Constructor Summary
DuplicateKeyWrapper(java.lang.String msg)
          Create a basic DuplicateKeyWrapper with a message.
DuplicateKeyWrapper(java.lang.Throwable rootCause)
          Create a DuplicateKeyWrapper wrapping a root exception.
 
Method Summary
 java.lang.String getMessage()
          Returns the appropriate exception message.
 java.lang.Throwable getRootCause()
          Returns the root exception if it exists.
 java.lang.String toString()
          Print the exception as a string.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DuplicateKeyWrapper

public DuplicateKeyWrapper(java.lang.String msg)
Create a basic DuplicateKeyWrapper with a message.

Parameters:
msg - the exception message.

DuplicateKeyWrapper

public DuplicateKeyWrapper(java.lang.Throwable rootCause)
Create a DuplicateKeyWrapper wrapping a root exception.

Parameters:
rootCause - the underlying wrapped exception.
Method Detail

getRootCause

public java.lang.Throwable getRootCause()
Returns the root exception if it exists.

Specified by:
getRootCause in interface ExceptionWrapper
Returns:
the underlying wrapped exception.

getMessage

public java.lang.String getMessage()
Returns the appropriate exception message.

Overrides:
getMessage in class java.lang.Throwable

toString

public java.lang.String toString()
Print the exception as a string.

Overrides:
toString in class java.lang.Throwable