EclipseLink 2.0.0, build 'v20091009-r5515' API Reference

org.eclipse.persistence.exceptions
Class DynamicException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.eclipse.persistence.exceptions.EclipseLinkException
                  extended by org.eclipse.persistence.exceptions.DynamicException
All Implemented Interfaces:
java.io.Serializable

public class DynamicException
extends EclipseLinkException

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.

See Also:
Serialized Form
Author:
dclarke, mnorman
Since:
EclipseLink 1.2

Field Summary
 
Fields inherited from class org.eclipse.persistence.exceptions.EclipseLinkException
CR, errorCode, hasBeenLogged, indentationString, internalException, session, shouldPrintInternalException
 
Constructor Summary
protected DynamicException(java.lang.String message)
           
protected DynamicException(java.lang.String message, java.lang.Throwable throwable)
           
 
Method Summary
static DynamicException entityHasNullType(org.eclipse.persistence.internal.dynamic.DynamicEntityImpl entity)
          The DynamicEntityImpl has a null type indicating an illegal state of the entity.
static DynamicException entityNotFoundException(java.lang.String message)
          A DynamicEntity could not be found
static DynamicException illegalDynamicClassWriter(DynamicClassLoader loader, java.lang.String parentClassName)
          A DynamicClassWriter was attempted to be instantiated with a null loader or invalid parentClassName.
static DynamicException illegalParentClassName(java.lang.String parentClassName)
          A null or empty string was provided as the parent class for a dynamic class being registered for creation.
static DynamicException incompatibleDuplicateWriters(java.lang.String className, DynamicClassWriter existingWriter, DynamicClassWriter writer)
          A call to DynamicClassLoader.addClass(String, DynamicClassWriter) or DynamicClassLoader#creatDynamicClass(String, DynamicClassWriter) was invoked with a className that already had a DynamicClassWriter that is not compatible with the provided writer.
static DynamicException invalidGetPropertyType(DatabaseMapping mapping, java.lang.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 DynamicException invalidPropertyIndex(DynamicType type, int propertyIndex)
          Exception throw when attempting to access a dynamic property by index which does not have an associated mapping.
static DynamicException invalidPropertyName(DynamicType type, java.lang.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 DynamicException invalidSetPropertyType(DatabaseMapping mapping, java.lang.Object value)
          TODO
 
Methods inherited from class org.eclipse.persistence.exceptions.EclipseLinkException
cr, getErrorCode, getIndentationString, getInternalException, getMessage, getSession, hasBeenLogged, printStackTrace, printStackTrace, printStackTrace, setErrorCode, setHasBeenLogged, setIndentationString, setInternalException, setSession, setShouldPrintInternalException, shouldPrintInternalException, toString
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DynamicException

protected DynamicException(java.lang.String message)

DynamicException

protected DynamicException(java.lang.String message,
                           java.lang.Throwable throwable)
Method Detail

invalidPropertyName

public static DynamicException invalidPropertyName(DynamicType type,
                                                   java.lang.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.

See Also:
DynamicEntityImpl.get(String)

invalidGetPropertyType

public static DynamicException invalidGetPropertyType(DatabaseMapping mapping,
                                                      java.lang.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:
DynamicEntityImpl.get(String)

invalidSetPropertyType

public static DynamicException invalidSetPropertyType(DatabaseMapping mapping,
                                                      java.lang.Object value)
TODO

Parameters:
mapping -
value -
Returns:

invalidPropertyIndex

public static DynamicException invalidPropertyIndex(DynamicType type,
                                                    int propertyIndex)
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 then DynamicType.getNumberOfProperties().

See Also:
DynamicTypeImpl.getMapping(int)

illegalDynamicClassWriter

public static DynamicException illegalDynamicClassWriter(DynamicClassLoader loader,
                                                         java.lang.String parentClassName)
A DynamicClassWriter was attempted to be instantiated with a null loader or invalid parentClassName. The parentClassName must not be null or an empty string.


entityNotFoundException

public static DynamicException entityNotFoundException(java.lang.String message)
A DynamicEntity could not be found


entityHasNullType

public static DynamicException entityHasNullType(org.eclipse.persistence.internal.dynamic.DynamicEntityImpl entity)
The DynamicEntityImpl has a null type indicating an illegal state of the entity.

See Also:
DynamicEntityImpl.getType()

illegalParentClassName

public static DynamicException illegalParentClassName(java.lang.String parentClassName)
A null or empty string was provided as the parent class for a dynamic class being registered for creation.

See Also:
DynamicClassWriter(String)

incompatibleDuplicateWriters

public static DynamicException incompatibleDuplicateWriters(java.lang.String className,
                                                            DynamicClassWriter existingWriter,
                                                            DynamicClassWriter writer)
A call to DynamicClassLoader.addClass(String, DynamicClassWriter) or DynamicClassLoader#creatDynamicClass(String, DynamicClassWriter) was invoked with a className that already had a DynamicClassWriter that is not compatible with the provided writer.


EclipseLink 2.0.0, build 'v20091009-r5515' API Reference