Module org.eclipse.persistence.core
Class DynamicException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.eclipse.persistence.exceptions.EclipseLinkException
org.eclipse.persistence.exceptions.DynamicException
- All Implemented Interfaces:
Serializable
Custom exception type that provides information about failure cases
encountered when using a GenericEntity with TopLink. Any failures that are
not specific to GenericEntity use will still involve the standard TopLink
exceptions.
- Since:
- EclipseLink 1.2
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class org.eclipse.persistence.exceptions.EclipseLinkException
CR, errorCode, hasBeenLogged, indentationString, internalException, session, shouldPrintInternalException -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDynamicException(String message) protectedDynamicException(String message, Throwable throwable) -
Method Summary
Modifier and TypeMethodDescriptionstatic DynamicExceptionentityHasNullType(DynamicEntity entity) TheDynamicEntityhas a null type indicating an illegal state of the entity.static DynamicExceptionentityNotFoundException(String message) ADynamicEntitycould not be foundstatic DynamicExceptionillegalDynamicClassWriter(DynamicClassLoader loader, String parentClassName) ADynamicClassWriterwas attempted to be instantiated with a null loader or invalid parentClassName.static DynamicExceptionillegalParentClassName(String parentClassName) A null or empty string was provided as the parent class for a dynamic class being registered for creation.static DynamicExceptionincompatibleDuplicateWriters(String className, EclipseLinkClassWriter existingWriter, EclipseLinkClassWriter writer) A call toDynamicClassLoader.addClass(String, org.eclipse.persistence.dynamic.EclipseLinkClassWriter)orDynamicClassLoader.createDynamicClass(String, DynamicClassWriter)was invoked with a className that already had aDynamicClassWriterthat is not compatible with the provided writer.static DynamicExceptioninvalidGetPropertyType(DatabaseMapping mapping, ClassCastException cce) A request to get a persistent value from a DynamicEntity was made providing a propertyName that does exist but the provided return type failed when casting.static DynamicExceptioninvalidPropertyIndex(DynamicType type, int propertyIndex) Exception throw when attempting to access a dynamic property by index which does not have an associated mapping.static DynamicExceptioninvalidPropertyName(DynamicType type, String propertyName) A request to get a persistent value from a DynamicEntity was made providing a propertyName that does not correspond to any mappings in the underlying descriptor.static DynamicExceptioninvalidSetPropertyType(DatabaseMapping mapping, Object value) Invalid value attempted to be set into aDynamicEntity's property.Methods inherited from class org.eclipse.persistence.exceptions.EclipseLinkException
cr, getErrorCode, getIndentationString, getInternalException, getMessage, getSession, getUnformattedMessage, hasBeenLogged, printStackTrace, printStackTrace, printStackTrace, setErrorCode, setHasBeenLogged, setIndentationString, setInternalException, setSession, setShouldPrintInternalException, shouldPrintInternalException, toStringMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, setStackTrace
-
Field Details
-
INVALID_PROPERTY_NAME
public static final int INVALID_PROPERTY_NAME- See Also:
-
INVALID_PROPERTY_GET_WRONG_TYPE
public static final int INVALID_PROPERTY_GET_WRONG_TYPE- See Also:
-
INVALID_PROPERTY_SET_WRONG_TYPE
public static final int INVALID_PROPERTY_SET_WRONG_TYPE- See Also:
-
INVALID_PROPERTY_INDEX
public static final int INVALID_PROPERTY_INDEX- See Also:
-
ILLEGAL_DYNAMIC_CLASSWRITER
public static final int ILLEGAL_DYNAMIC_CLASSWRITER- See Also:
-
DYNAMIC_ENTITY_NOT_FOUND
public static final int DYNAMIC_ENTITY_NOT_FOUND- See Also:
-
DYNAMIC_ENTITY_HAS_NULL_TYPE
public static final int DYNAMIC_ENTITY_HAS_NULL_TYPE- See Also:
-
ILLEGAL_PARENT_CLASSNAME
public static final int ILLEGAL_PARENT_CLASSNAME- See Also:
-
INCOMPATIBLE_DYNAMIC_CLASSWRITERS
public static final int INCOMPATIBLE_DYNAMIC_CLASSWRITERS- See Also:
-
-
Constructor Details
-
DynamicException
-
DynamicException
-
-
Method Details
-
invalidPropertyName
A request to get a persistent value from a DynamicEntity was made providing a propertyName that does not correspond to any mappings in the underlying descriptor.- See Also:
-
invalidGetPropertyType
public static DynamicException invalidGetPropertyType(DatabaseMapping mapping, ClassCastException cce) A request to get a persistent value from a DynamicEntity was made providing a propertyName that does exist but the provided return type failed when casting. The generic type specified on the get method must be supported by the underlying value stored in the dynamic entity.- See Also:
-
invalidSetPropertyType
Invalid value attempted to be set into aDynamicEntity's property. This could be caused by:- Putting null into an property which is classified as primitive or a collection
- Putting a value into a property that cannot be assigned to the configured classification
-
invalidPropertyIndex
Exception throw when attempting to access a dynamic property by index which does not have an associated mapping. Make sure the index used is less thenDynamicType.getNumberOfProperties().- See Also:
-
illegalDynamicClassWriter
public static DynamicException illegalDynamicClassWriter(DynamicClassLoader loader, String parentClassName) ADynamicClassWriterwas attempted to be instantiated with a null loader or invalid parentClassName. The parentClassName must not be null or an empty string. -
entityNotFoundException
ADynamicEntitycould not be found -
entityHasNullType
TheDynamicEntityhas a null type indicating an illegal state of the entity.- See Also:
-
illegalParentClassName
A null or empty string was provided as the parent class for a dynamic class being registered for creation.- See Also:
-
incompatibleDuplicateWriters
public static DynamicException incompatibleDuplicateWriters(String className, EclipseLinkClassWriter existingWriter, EclipseLinkClassWriter writer) A call toDynamicClassLoader.addClass(String, org.eclipse.persistence.dynamic.EclipseLinkClassWriter)orDynamicClassLoader.createDynamicClass(String, DynamicClassWriter)was invoked with a className that already had aDynamicClassWriterthat is not compatible with the provided writer.
-