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:
java.io.Serializable
public class JPARSException extends EclipseLinkException
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.eclipse.persistence.exceptions.EclipseLinkException
CR, errorCode, hasBeenLogged, indentationString, internalException, session, shouldPrintInternalException
-
-
Constructor Summary
Constructors Constructor Description JPARSException()Instantiates a new JPARS exception.JPARSException(java.lang.String message)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JPARSExceptionattributeCouldNotBeFoundForEntity(java.lang.String attributeName, java.lang.String entityType, java.lang.String entityId, java.lang.String persistenceUnit)Attribute could not be found for entity.static JPARSExceptionattributeCouldNotBeUpdated(java.lang.String attributeName, java.lang.String entityType, java.lang.String entityId, java.lang.String persistenceUnit)Attribute could not be updated.static JPARSExceptionclassOrClassDescriptorCouldNotBeFoundForEntity(java.lang.String entityType, java.lang.String persistenceUnit)Class descriptor could not be found for entity.static JPARSExceptiondatabaseMappingCouldNotBeFoundForEntityAttribute(java.lang.String attributeName, java.lang.String entityType, java.lang.String entityId, java.lang.String persistenceUnit)Database mapping could not be found for entity attribute.static JPARSExceptionentityIsNotIdempotent(java.lang.String entityType, java.lang.String persistenceUnit)Entity is not idempotent.static JPARSExceptionentityNotFound(java.lang.String entityType, java.lang.String entityId, java.lang.String persistenceUnit)Entity not found.static JPARSExceptionexceptionOccurred(java.lang.Exception exception)Exception occurred.static JPARSExceptionfieldsFilteringBothParametersPresent()Both fields and excludeFields parameters are present in request.javax.ws.rs.core.Response.StatusgetHttpStatusCode()Gets the http status code.java.lang.StringgetMessage()PUBLIC: Return the exception error message.static JPARSExceptioninvalidConfiguration()Invalid configuration.static JPARSExceptioninvalidPagingRequest()Invalid paging request.static JPARSExceptioninvalidParameter(java.lang.String parameterName, java.lang.String invalidValue)Invalid paging request.static JPARSExceptioninvalidRemoveAttributeRequest(java.lang.String attributeName, java.lang.String entityType, java.lang.String entityId, java.lang.String persistenceUnit)Invalid remove attribute request.static JPARSExceptioninvalidServiceVersion(java.lang.String serviceVersion)Invalid service version.static JPARSExceptionjndiNamePassedIsInvalid(java.lang.String jndiName)Session bean lookup is invalid.static JPARSExceptionobjectReferredByLinkDoesNotExist(java.lang.String entityType, java.lang.Object entityId)Object referred by link does not exist.static JPARSExceptionpaginationParameterForNotPageableResource()Pagination parameters are used in non-pageable resource.static JPARSExceptionpersistenceContextCouldNotBeBootstrapped(java.lang.String persistenceUnit)Persistence context could not be bootstrapped.static JPARSExceptionresponseCouldNotBeBuiltForFindAttributeRequest(java.lang.String attributeName, java.lang.String entityType, java.lang.String entityId, java.lang.String persistenceUnit)Response could not be built for find attribute request.static JPARSExceptionresponseCouldNotBeBuiltForNamedQueryRequest(java.lang.String query, java.lang.String persistenceUnit)Response could not be built for named query request.static JPARSExceptionselectionQueryForAttributeCouldNotBeFoundForEntity(java.lang.String attributeName, java.lang.String entityType, java.lang.String entityId, java.lang.String persistenceUnit)Selection query for attribute could not be found for entity.static JPARSExceptionsessionBeanCouldNotBeFound(java.lang.String jndiName)Session bean lookup failed.voidsetHttpStatusCode(javax.ws.rs.core.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
-
-
-
-
Method Detail
-
getMessage
public java.lang.String getMessage()
Description copied from class:EclipseLinkExceptionPUBLIC: Return the exception error message. EclipseLink error messages are multi-line so that detail descriptions of the exception are given.- Overrides:
getMessagein classEclipseLinkException
-
getHttpStatusCode
public javax.ws.rs.core.Response.Status getHttpStatusCode()
Gets the http status code.- Returns:
- the http status code
-
setHttpStatusCode
public void setHttpStatusCode(javax.ws.rs.core.Response.Status httpStatusCode)
Sets the http status code.- Parameters:
httpStatusCode- the new http status code
-
entityNotFound
public static JPARSException entityNotFound(java.lang.String entityType, java.lang.String entityId, java.lang.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(java.lang.String entityType, java.lang.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(java.lang.String attributeName, java.lang.String entityType, java.lang.String entityId, java.lang.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(java.lang.String attributeName, java.lang.String entityType, java.lang.String entityId, java.lang.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
public static JPARSException invalidPagingRequest()
Invalid paging request.- Returns:
- the JPARS exception
-
invalidParameter
public static JPARSException invalidParameter(java.lang.String parameterName, java.lang.String invalidValue)
Invalid paging request.- Returns:
- the JPARS exception
-
paginationParameterForNotPageableResource
public static JPARSException paginationParameterForNotPageableResource()
Pagination parameters are used in non-pageable resource.- Returns:
- the JPARS exception
-
fieldsFilteringBothParametersPresent
public static JPARSException fieldsFilteringBothParametersPresent()
Both fields and excludeFields parameters are present in request.- Returns:
- the JPARS exception
-
databaseMappingCouldNotBeFoundForEntityAttribute
public static JPARSException databaseMappingCouldNotBeFoundForEntityAttribute(java.lang.String attributeName, java.lang.String entityType, java.lang.String entityId, java.lang.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(java.lang.String attributeName, java.lang.String entityType, java.lang.String entityId, java.lang.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
public static JPARSException invalidServiceVersion(java.lang.String serviceVersion)
Invalid service version.- Parameters:
serviceVersion- the service version- Returns:
- the JPARS exception
-
invalidRemoveAttributeRequest
public static JPARSException invalidRemoveAttributeRequest(java.lang.String attributeName, java.lang.String entityType, java.lang.String entityId, java.lang.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(java.lang.String attributeName, java.lang.String entityType, java.lang.String entityId, java.lang.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(java.lang.String query, java.lang.String persistenceUnit)
Response could not be built for named query request.- Parameters:
query- the querypersistenceUnit- the persistence unit- Returns:
- the JPARS exception
-
objectReferredByLinkDoesNotExist
public static JPARSException objectReferredByLinkDoesNotExist(java.lang.String entityType, java.lang.Object entityId)
Object referred by link does not exist.- Parameters:
entityType- the entity typeentityId- the entity id- Returns:
- the JPARS exception
-
jndiNamePassedIsInvalid
public static JPARSException jndiNamePassedIsInvalid(java.lang.String jndiName)
Session bean lookup is invalid.- Parameters:
jndiName- the jndi name- Returns:
- the JPARS exception
-
sessionBeanCouldNotBeFound
public static JPARSException sessionBeanCouldNotBeFound(java.lang.String jndiName)
Session bean lookup failed.- Parameters:
jndiName- the jndi name- Returns:
- the JPARS exception
-
invalidConfiguration
public static JPARSException invalidConfiguration()
Invalid configuration.- Returns:
- the JPARS exception
-
entityIsNotIdempotent
public static JPARSException entityIsNotIdempotent(java.lang.String entityType, java.lang.String persistenceUnit)
Entity is not idempotent.- Parameters:
entityType- the entity typepersistenceUnit- the persistence unit- Returns:
- the JPARS exception
-
persistenceContextCouldNotBeBootstrapped
public static JPARSException persistenceContextCouldNotBeBootstrapped(java.lang.String persistenceUnit)
Persistence context could not be bootstrapped.- Parameters:
persistenceUnit- the persistence unit- Returns:
- the JPARS exception
-
exceptionOccurred
public static JPARSException exceptionOccurred(java.lang.Exception exception)
Exception occurred.- Parameters:
exception- the exception- Returns:
- the JPARS exception
-
-