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

## Class ODataJPAModelException

- 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
        - - org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPAModelException

- All Implemented Interfaces:
    Serializable

      public class ODataJPAModelException
      extends ODataJPAException

  The exception is thrown for any unexpected errors raising while accessing/transforming Java Persistence Models.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static MessageReference` | `BUILDER_NULL`
    `static MessageReference` | `FUNC_ENTITYSET_EXP`
    `static MessageReference` | `FUNC_PARAM_NAME_EXP`
    `static MessageReference` | `FUNC_RETURN_TYPE_ENTITY_NOT_FOUND`
    `static MessageReference` | `FUNC_RETURN_TYPE_EXP`
    `static MessageReference` | `GENERAL`
    `static MessageReference` | `INNER_EXCEPTION`
    `static MessageReference` | `INVALID_ASSOCIATION`
    `static MessageReference` | `INVALID_ASSOCIATION_SET`
    `static MessageReference` | `INVALID_COMPLEX_TYPE`
    `static MessageReference` | `INVALID_ENTITY_TYPE`
    `static MessageReference` | `INVALID_ENTITYCONTAINER`
    `static MessageReference` | `INVALID_ENTITYSET`
    `static MessageReference` | `INVALID_FUNC_IMPORT`
    `static MessageReference` | `REF_ATTRIBUTE_NOT_FOUND`
    `static MessageReference` | `TYPE_NOT_SUPPORTED`

    - ### Fields inherited from class org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPAException

      `DEFAULT_LOCALE, messageReference, ODATA_JPACTX_NULL`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static ODataJPAModelException` | `throwException(MessageReference messageReference, Throwable e)` The method creates an exception object of type ODataJPAModelException 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

      `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

    - #### INVALID_ENTITY_TYPE

          public static final MessageReference INVALID_ENTITY_TYPE

    - #### INVALID_COMPLEX_TYPE

          public static final MessageReference INVALID_COMPLEX_TYPE

    - #### INVALID_ASSOCIATION

          public static final MessageReference INVALID_ASSOCIATION

    - #### INVALID_ENTITYSET

          public static final MessageReference INVALID_ENTITYSET

    - #### INVALID_ENTITYCONTAINER

          public static final MessageReference INVALID_ENTITYCONTAINER

    - #### INVALID_ASSOCIATION_SET

          public static final MessageReference INVALID_ASSOCIATION_SET

    - #### INVALID_FUNC_IMPORT

          public static final MessageReference INVALID_FUNC_IMPORT

    - #### BUILDER_NULL

          public static final MessageReference BUILDER_NULL

    - #### TYPE_NOT_SUPPORTED

          public static final MessageReference TYPE_NOT_SUPPORTED

    - #### FUNC_ENTITYSET_EXP

          public static final MessageReference FUNC_ENTITYSET_EXP

    - #### FUNC_RETURN_TYPE_EXP

          public static final MessageReference FUNC_RETURN_TYPE_EXP

    - #### FUNC_RETURN_TYPE_ENTITY_NOT_FOUND

          public static final MessageReference FUNC_RETURN_TYPE_ENTITY_NOT_FOUND

    - #### GENERAL

          public static final MessageReference GENERAL

    - #### INNER_EXCEPTION

          public static final MessageReference INNER_EXCEPTION

    - #### FUNC_PARAM_NAME_EXP

          public static final MessageReference FUNC_PARAM_NAME_EXP

    - #### REF_ATTRIBUTE_NOT_FOUND

          public static final MessageReference REF_ATTRIBUTE_NOT_FOUND

  - ### Method Detail

    - #### throwException

          public static ODataJPAModelException throwException(MessageReference messageReference,
                                                              Throwable e)

      The method creates an exception object of type ODataJPAModelException 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 ODataJPAModelException which can be then raised.
      Throws:
        `ODataJPARuntimeException`

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