Class JPARSException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.eclipse.persistence.exceptions.EclipseLinkException
org.eclipse.persistence.jpa.rs.exceptions.JPARSException
- All Implemented Interfaces:
Serializable
- See Also:
-
Field Summary
Fields inherited from class org.eclipse.persistence.exceptions.EclipseLinkException
CR, errorCode, hasBeenLogged, indentationString, internalException, session, shouldPrintInternalException
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic JPARSException
attributeCouldNotBeFoundForEntity
(String attributeName, String entityType, String entityId, String persistenceUnit) Attribute could not be found for entity.static JPARSException
attributeCouldNotBeUpdated
(String attributeName, String entityType, String entityId, String persistenceUnit) Attribute could not be updated.static JPARSException
classOrClassDescriptorCouldNotBeFoundForEntity
(String entityType, String persistenceUnit) Class descriptor could not be found for entity.static JPARSException
databaseMappingCouldNotBeFoundForEntityAttribute
(String attributeName, String entityType, String entityId, String persistenceUnit) Database mapping could not be found for entity attribute.static JPARSException
entityIsNotIdempotent
(String entityType, String persistenceUnit) Entity is not idempotent.static JPARSException
entityNotFound
(String entityType, String entityId, String persistenceUnit) Entity not found.static JPARSException
exceptionOccurred
(Exception exception) Exception occurred.static JPARSException
Both fields and excludeFields parameters are present in request.Gets the http status code.PUBLIC: Return the exception error message.static JPARSException
Invalid configuration.static JPARSException
Invalid paging request.static JPARSException
invalidParameter
(String parameterName, String invalidValue) Invalid paging request.static JPARSException
invalidRemoveAttributeRequest
(String attributeName, String entityType, String entityId, String persistenceUnit) Invalid remove attribute request.static JPARSException
invalidServiceVersion
(String serviceVersion) Invalid service version.static JPARSException
jndiNamePassedIsInvalid
(String jndiName) Session bean lookup is invalid.static JPARSException
objectReferredByLinkDoesNotExist
(String entityType, Object entityId) Object referred by link does not exist.static JPARSException
Pagination parameters are used in non-pageable resource.static JPARSException
persistenceContextCouldNotBeBootstrapped
(String persistenceUnit) Persistence context could not be bootstrapped.static JPARSException
responseCouldNotBeBuiltForFindAttributeRequest
(String attributeName, String entityType, String entityId, String persistenceUnit) Response could not be built for find attribute request.static JPARSException
responseCouldNotBeBuiltForNamedQueryRequest
(String query, String persistenceUnit) Response could not be built for named query request.static JPARSException
selectionQueryForAttributeCouldNotBeFoundForEntity
(String attributeName, String entityType, String entityId, String persistenceUnit) Selection query for attribute could not be found for entity.static JPARSException
sessionBeanCouldNotBeFound
(String jndiName) Session bean lookup failed.void
setHttpStatusCode
(Response.Status httpStatusCode) Sets the http status code.Methods inherited from class org.eclipse.persistence.exceptions.EclipseLinkException
cr, getErrorCode, getIndentationString, getInternalException, getSession, getUnformattedMessage, hasBeenLogged, printStackTrace, printStackTrace, printStackTrace, setErrorCode, setHasBeenLogged, setIndentationString, setInternalException, setSession, setShouldPrintInternalException, shouldPrintInternalException, toString
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, setStackTrace
-
Constructor Details
-
JPARSException
public JPARSException()Instantiates a new JPARS exception. -
JPARSException
-
-
Method Details
-
getMessage
Description copied from class:EclipseLinkException
PUBLIC: Return the exception error message. EclipseLink error messages are multi-line so that detail descriptions of the exception are given.- Overrides:
getMessage
in classEclipseLinkException
-
getHttpStatusCode
Gets the http status code.- Returns:
- the http status code
-
setHttpStatusCode
Sets the http status code.- Parameters:
httpStatusCode
- the new http status code
-
entityNotFound
public static JPARSException entityNotFound(String entityType, String entityId, String persistenceUnit) Entity not found.- Parameters:
entityType
- the entity typeentityId
- the entity idpersistenceUnit
- the persistence unit- Returns:
- the JPARS exception
-
classOrClassDescriptorCouldNotBeFoundForEntity
public static JPARSException classOrClassDescriptorCouldNotBeFoundForEntity(String entityType, String persistenceUnit) Class descriptor could not be found for entity.- Parameters:
entityType
- the entity typepersistenceUnit
- the persistence unit- Returns:
- the JPARS exception
-
attributeCouldNotBeFoundForEntity
public static JPARSException attributeCouldNotBeFoundForEntity(String attributeName, String entityType, String entityId, String persistenceUnit) Attribute could not be found for entity.- Parameters:
attributeName
- the attribute nameentityType
- the entity typeentityId
- the entity idpersistenceUnit
- the persistence unit- Returns:
- the JPARS exception
-
selectionQueryForAttributeCouldNotBeFoundForEntity
public static JPARSException selectionQueryForAttributeCouldNotBeFoundForEntity(String attributeName, String entityType, String entityId, String persistenceUnit) Selection query for attribute could not be found for entity.- Parameters:
attributeName
- the attribute nameentityType
- the entity typeentityId
- the entity idpersistenceUnit
- the persistence unit- Returns:
- the JPARS exception
-
invalidPagingRequest
Invalid paging request.- Returns:
- the JPARS exception
-
invalidParameter
Invalid paging request.- Returns:
- the JPARS exception
-
paginationParameterForNotPageableResource
Pagination parameters are used in non-pageable resource.- Returns:
- the JPARS exception
-
fieldsFilteringBothParametersPresent
Both fields and excludeFields parameters are present in request.- Returns:
- the JPARS exception
-
databaseMappingCouldNotBeFoundForEntityAttribute
public static JPARSException databaseMappingCouldNotBeFoundForEntityAttribute(String attributeName, String entityType, String entityId, String persistenceUnit) Database mapping could not be found for entity attribute.- Parameters:
attributeName
- the attribute nameentityType
- the entity typeentityId
- the entity idpersistenceUnit
- the persistence unit- Returns:
- the JPARS exception
-
attributeCouldNotBeUpdated
public static JPARSException attributeCouldNotBeUpdated(String attributeName, String entityType, String entityId, String persistenceUnit) Attribute could not be updated.- Parameters:
attributeName
- the attribute nameentityType
- the entity typeentityId
- the entity idpersistenceUnit
- the persistence unit- Returns:
- the JPARS exception
-
invalidServiceVersion
Invalid service version.- Parameters:
serviceVersion
- the service version- Returns:
- the JPARS exception
-
invalidRemoveAttributeRequest
public static JPARSException invalidRemoveAttributeRequest(String attributeName, String entityType, String entityId, String persistenceUnit) Invalid remove attribute request.- Parameters:
attributeName
- the attribute nameentityType
- the entity typeentityId
- the entity idpersistenceUnit
- the persistence unit- Returns:
- the JPARS exception
-
responseCouldNotBeBuiltForFindAttributeRequest
public static JPARSException responseCouldNotBeBuiltForFindAttributeRequest(String attributeName, String entityType, String entityId, String persistenceUnit) Response could not be built for find attribute request.- Parameters:
attributeName
- the attribute nameentityType
- the entity typeentityId
- the entity idpersistenceUnit
- the persistence unit- Returns:
- the JPARS exception
-
responseCouldNotBeBuiltForNamedQueryRequest
public static JPARSException responseCouldNotBeBuiltForNamedQueryRequest(String query, String persistenceUnit) Response could not be built for named query request.- Parameters:
query
- the querypersistenceUnit
- the persistence unit- Returns:
- the JPARS exception
-
objectReferredByLinkDoesNotExist
Object referred by link does not exist.- Parameters:
entityType
- the entity typeentityId
- the entity id- Returns:
- the JPARS exception
-
jndiNamePassedIsInvalid
Session bean lookup is invalid.- Parameters:
jndiName
- the jndi name- Returns:
- the JPARS exception
-
sessionBeanCouldNotBeFound
Session bean lookup failed.- Parameters:
jndiName
- the jndi name- Returns:
- the JPARS exception
-
invalidConfiguration
Invalid configuration.- Returns:
- the JPARS exception
-
entityIsNotIdempotent
Entity is not idempotent.- Parameters:
entityType
- the entity typepersistenceUnit
- the persistence unit- Returns:
- the JPARS exception
-
persistenceContextCouldNotBeBootstrapped
Persistence context could not be bootstrapped.- Parameters:
persistenceUnit
- the persistence unit- Returns:
- the JPARS exception
-
exceptionOccurred
Exception occurred.- Parameters:
exception
- the exception- Returns:
- the JPARS exception
-