org.apache.olingo.odata2.jpa.processor.api.exception
Class ODataJPARuntimeException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.apache.olingo.odata2.api.exception.ODataException
              extended by org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPAException
                  extended by org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPARuntimeException
All Implemented Interfaces:
Serializable

public class ODataJPARuntimeException
extends ODataJPAException

The exception is thrown for any unexpected errors raising while accessing data from Java Persistence Models. The exception object is created with localized error texts provided error texts are maintained in localized languages.

See Also:
Serialized Form

Field Summary
static MessageReference ENTITY_MANAGER_NOT_INITIALIZED
           
static MessageReference ERROR_JPA_BLOB_NULL
           
static MessageReference ERROR_JPA_CLOB_NULL
           
static MessageReference ERROR_JPQL_CREATE_REQUEST
           
static MessageReference ERROR_JPQL_DELETE_REQUEST
           
static MessageReference ERROR_JPQL_INTEGRITY_CONSTRAINT
           
static MessageReference ERROR_JPQL_KEY_VALUE
           
static MessageReference ERROR_JPQL_PARAM_VALUE
           
static MessageReference ERROR_JPQL_QUERY_CREATE
           
static MessageReference ERROR_JPQL_UNIQUE_CONSTRAINT
           
static MessageReference ERROR_JPQL_UPDATE_REQUEST
           
static MessageReference ERROR_JPQLCTXBLDR_CREATE
           
static MessageReference ERROR_ODATA_FILTER_CONDITION
           
static MessageReference GENERAL
           
static MessageReference INNER_EXCEPTION
           
static MessageReference JOIN_CLAUSE_EXPECTED
           
static MessageReference OPERATOR_EQ_NE_MISSING
           
static MessageReference RELATIONSHIP_INVALID
           
static MessageReference RESOURCE_NOT_FOUND
           
static MessageReference RESOURCE_X_NOT_FOUND
           
 
Fields inherited from class org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPAException
DEFAULT_LOCALE, messageReference, ODATA_JPACTX_NULL
 
Method Summary
static ODataJPARuntimeException throwException(MessageReference messageReference, Throwable e)
          The method creates an exception object of type ODataJPARuntimeException with localized error texts.
 
Methods inherited from class org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPAException
createMessageReference, getMessageReference
 
Methods inherited from class org.apache.olingo.odata2.api.exception.ODataException
getApplicationExceptionCause, getHttpExceptionCause, getMessageExceptionCause, isCausedByApplicationException, isCausedByHttpException, isCausedByMessageException
 
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
 

Field Detail

ENTITY_MANAGER_NOT_INITIALIZED

public static final MessageReference ENTITY_MANAGER_NOT_INITIALIZED

RESOURCE_NOT_FOUND

public static final MessageReference RESOURCE_NOT_FOUND

GENERAL

public static final MessageReference GENERAL

INNER_EXCEPTION

public static final MessageReference INNER_EXCEPTION

JOIN_CLAUSE_EXPECTED

public static final MessageReference JOIN_CLAUSE_EXPECTED

ERROR_JPQLCTXBLDR_CREATE

public static final MessageReference ERROR_JPQLCTXBLDR_CREATE

ERROR_ODATA_FILTER_CONDITION

public static final MessageReference ERROR_ODATA_FILTER_CONDITION

ERROR_JPQL_QUERY_CREATE

public static final MessageReference ERROR_JPQL_QUERY_CREATE

ERROR_JPQL_CREATE_REQUEST

public static final MessageReference ERROR_JPQL_CREATE_REQUEST

ERROR_JPQL_UPDATE_REQUEST

public static final MessageReference ERROR_JPQL_UPDATE_REQUEST

ERROR_JPQL_DELETE_REQUEST

public static final MessageReference ERROR_JPQL_DELETE_REQUEST

ERROR_JPQL_KEY_VALUE

public static final MessageReference ERROR_JPQL_KEY_VALUE

ERROR_JPQL_PARAM_VALUE

public static final MessageReference ERROR_JPQL_PARAM_VALUE

ERROR_JPQL_UNIQUE_CONSTRAINT

public static final MessageReference ERROR_JPQL_UNIQUE_CONSTRAINT

ERROR_JPQL_INTEGRITY_CONSTRAINT

public static final MessageReference ERROR_JPQL_INTEGRITY_CONSTRAINT

RELATIONSHIP_INVALID

public static final MessageReference RELATIONSHIP_INVALID

RESOURCE_X_NOT_FOUND

public static final MessageReference RESOURCE_X_NOT_FOUND

ERROR_JPA_BLOB_NULL

public static final MessageReference ERROR_JPA_BLOB_NULL

ERROR_JPA_CLOB_NULL

public static final MessageReference ERROR_JPA_CLOB_NULL

OPERATOR_EQ_NE_MISSING

public static final MessageReference OPERATOR_EQ_NE_MISSING
Method Detail

throwException

public static ODataJPARuntimeException throwException(MessageReference messageReference,
                                                      Throwable e)
The method creates an exception object of type ODataJPARuntimeException with localized error texts.

Parameters:
messageReference - is a mandatory parameter referring to a literal that could be translated to localized error texts.
e - is an optional parameter representing the previous exception in the call stack
Returns:
an instance of ODataJPARuntimeException which can be then raised.
Throws:
ODataJPARuntimeException


Copyright © 2013-2015 The Apache Software Foundation. All Rights Reserved.