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

## Class ODataJPAException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - org.apache.olingo.odata2.api.exception.ODataException
      - - org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPAException

- All Implemented Interfaces:
    Serializable
  Direct Known Subclasses:
    ODataJPAModelException, ODataJPARuntimeException

      public abstract class ODataJPAException
      extends ODataException

  The exception class is the base of OData JPA exceptions. The class also provides non localized error texts that can be used for raising OData JPA exceptions with non localized error texts.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static Locale` | `DEFAULT_LOCALE`
    `protected MessageReference` | `messageReference`
    `static String` | `ODATA_JPACTX_NULL`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `ODataJPAException(String localizedMessage, Throwable e, MessageReference msgRef)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected static MessageReference` | `createMessageReference(Class<? extends ODataJPAException> clazz, String messageReferenceKey)` The method creates a Reference to Message Object `MessageReference` .
    `MessageReference` | `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

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, 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

    - #### messageReference

          protected MessageReference messageReference

    - #### ODATA_JPACTX_NULL

          public static final String ODATA_JPACTX_NULL

      See Also:
        Constant Field Values

    - #### DEFAULT_LOCALE

          protected static final Locale DEFAULT_LOCALE

  - ### Constructor Detail

    - #### ODataJPAException

          protected ODataJPAException(String localizedMessage,
                                      Throwable e,
                                      MessageReference msgRef)

  - ### Method Detail

    - #### createMessageReference

          protected static MessageReference createMessageReference(Class<? extends ODataJPAException> clazz,
                                                                   String messageReferenceKey)

      The method creates a Reference to Message Object `MessageReference` . The message text key is derived out of parameters clazz.messageReferenceKey.
      Parameters:
        `clazz` - is name of the class extending `ODataJPAException`
        `messageReferenceKey` - is the key of the message
      Returns:
        an instance of type `MessageReference`

    - #### getMessageReference

          public MessageReference getMessageReference()

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