Spring Data Core

org.springframework.data.mapping.model
Class MappingInstantiationException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.springframework.data.mapping.model.MappingInstantiationException
All Implemented Interfaces:
Serializable

public class MappingInstantiationException
extends RuntimeException

Exception being thrown in case an entity could not be instantiated in the process of a to-object-mapping.

Author:
Oliver Gierke, Jon Brisbin
See Also:
Serialized Form

Constructor Summary
MappingInstantiationException(PersistentEntity<?,?> entity, List<Object> arguments, Exception cause)
          Creates a new MappingInstantiationException for the given PersistentEntity, constructor arguments and the causing exception.
MappingInstantiationException(String message, Exception cause)
          Deprecated. use MappingInstantiationException(PersistentEntity, List, String, Exception) instead.
 
Method Summary
 Constructor<?> getConstructor()
          The constructor used during the instantiation attempt.
 List<Object> getConstructorArguments()
          The constructor arguments used to invoke the constructor.
 Class<?> getEntityType()
          Returns the type of the entity that was attempted to instantiate.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MappingInstantiationException

@Deprecated
public MappingInstantiationException(String message,
                                                Exception cause)
Deprecated. use MappingInstantiationException(PersistentEntity, List, String, Exception) instead.

Creates a MappingInstantiationException using the given message and cause.

Parameters:
message -
cause -

MappingInstantiationException

public MappingInstantiationException(PersistentEntity<?,?> entity,
                                     List<Object> arguments,
                                     Exception cause)
Creates a new MappingInstantiationException for the given PersistentEntity, constructor arguments and the causing exception.

Parameters:
entity -
arguments -
cause -
Method Detail

getEntityType

public Class<?> getEntityType()
Returns the type of the entity that was attempted to instantiate.

Returns:
the entityType

getConstructor

public Constructor<?> getConstructor()
The constructor used during the instantiation attempt.

Returns:
the constructor

getConstructorArguments

public List<Object> getConstructorArguments()
The constructor arguments used to invoke the constructor.

Returns:
the constructorArguments

Spring Data Core

Copyright © 2011-2013-2013 Pivotal. All Rights Reserved.