org.axonframework.repository
Class AggregateNotFoundException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.axonframework.common.AxonException
                  extended by org.axonframework.common.AxonNonTransientException
                      extended by org.axonframework.repository.AggregateNotFoundException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AggregateDeletedException

public class AggregateNotFoundException
extends AxonNonTransientException

Exception indicating that the an aggregate could not be found in the repository.

Since:
0.4
Author:
Allard Buijze
See Also:
Serialized Form

Constructor Summary
AggregateNotFoundException(Object aggregateIdentifier, String message)
          Initialize a AggregateNotFoundException for an aggregate identifier by given aggregateIdentifier and given message.
AggregateNotFoundException(Object aggregateIdentifier, String message, Throwable cause)
          Initialize a AggregateNotFoundException for an aggregate identifier by given aggregateIdentifier and with the given message and cause.
 
Method Summary
 Object getAggregateIdentifier()
          Returns the identifier of the aggregate that could not be found.
 
Methods inherited from class org.axonframework.common.AxonNonTransientException
isCauseOf
 
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

AggregateNotFoundException

public AggregateNotFoundException(Object aggregateIdentifier,
                                  String message)
Initialize a AggregateNotFoundException for an aggregate identifier by given aggregateIdentifier and given message.

Parameters:
aggregateIdentifier - The identifier of the aggregate that could not be found
message - The message describing the cause of the exception

AggregateNotFoundException

public AggregateNotFoundException(Object aggregateIdentifier,
                                  String message,
                                  Throwable cause)
Initialize a AggregateNotFoundException for an aggregate identifier by given aggregateIdentifier and with the given message and cause.

Parameters:
aggregateIdentifier - The identifier of the aggregate that could not be found
message - The message describing the cause of the exception
cause - The underlying cause of the exception
Method Detail

getAggregateIdentifier

public Object getAggregateIdentifier()
Returns the identifier of the aggregate that could not be found.

Returns:
the identifier of the aggregate that could not be found


Copyright © 2010-2016. All Rights Reserved.