org.loom.exception
Class EntityNotFoundException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by javax.persistence.PersistenceException
                  extended by org.loom.exception.EntityNotFoundException
All Implemented Interfaces:
java.io.Serializable, HttpThrowable

public class EntityNotFoundException
extends javax.persistence.PersistenceException
implements HttpThrowable

An error produced when a persitent entity could not be found. It will be delivered to the browser as a 404 error

See Also:
Serialized Form

Constructor Summary
EntityNotFoundException(java.lang.Class<?> entityClass, java.lang.Object entityId)
           
EntityNotFoundException(java.lang.Class<?> entityClass, java.lang.Object entityId, java.lang.String message)
           
EntityNotFoundException(java.lang.Class<?> entityClass, java.lang.Object entityId, java.lang.String message, java.lang.Throwable cause)
           
EntityNotFoundException(java.lang.Class<?> entityClass, java.lang.Object entityId, java.lang.Throwable cause)
           
 
Method Summary
 int getHttpError()
          Entity not found is typically presented as a 404 error
 
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
 
Methods inherited from interface org.loom.exception.HttpThrowable
getCause
 

Constructor Detail

EntityNotFoundException

public EntityNotFoundException(java.lang.Class<?> entityClass,
                               java.lang.Object entityId)

EntityNotFoundException

public EntityNotFoundException(java.lang.Class<?> entityClass,
                               java.lang.Object entityId,
                               java.lang.Throwable cause)

EntityNotFoundException

public EntityNotFoundException(java.lang.Class<?> entityClass,
                               java.lang.Object entityId,
                               java.lang.String message)

EntityNotFoundException

public EntityNotFoundException(java.lang.Class<?> entityClass,
                               java.lang.Object entityId,
                               java.lang.String message,
                               java.lang.Throwable cause)
Method Detail

getHttpError

public int getHttpError()
Entity not found is typically presented as a 404 error

Specified by:
getHttpError in interface HttpThrowable
Returns:
the HTTP error code that should be returned to the browser for this error.