org.eclipse.stardust.common.error
Class ObjectNotFoundException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.eclipse.stardust.common.error.ApplicationException
                  extended by org.eclipse.stardust.common.error.PublicException
                      extended by org.eclipse.stardust.common.error.ObjectNotFoundException
All Implemented Interfaces:
Serializable

public class ObjectNotFoundException
extends PublicException

Thrown when an object was not found.

See Also:
Serialized Form

Constructor Summary
ObjectNotFoundException(boolean s, ErrorCase errorCase, Serializable identifier)
          Creates the exception with the provided message.
ObjectNotFoundException(boolean s, ErrorCase errorCase, String message, Serializable identifier)
          Creates the exception with the provided message.
ObjectNotFoundException(ErrorCase errorCase)
          Creates the exception with the provided error code.
ObjectNotFoundException(ErrorCase errorCase, long oid)
          Creates the exception with the provided error code and the OID of the object.
ObjectNotFoundException(ErrorCase errorCase, Serializable identifier)
          Creates the exception with the provided error code and the identifier of the object.
ObjectNotFoundException(String message)
          Deprecated. Use of error codes is strongly recommended.
ObjectNotFoundException(String message, long oid)
          Deprecated. Use of error codes is strongly recommended.
ObjectNotFoundException(String message, Serializable identifier)
          Deprecated. Use of error codes is strongly recommended.
 
Method Summary
 Serializable getIdentifier()
          Gets the identifier of the object.
 
Methods inherited from class org.eclipse.stardust.common.error.ApplicationException
getError, getInner, getLocalizedMessage, isLogged, setLogged, setResourceBundle
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ObjectNotFoundException

public ObjectNotFoundException(ErrorCase errorCase)
Creates the exception with the provided error code.

Parameters:
errorCase - the error code.

ObjectNotFoundException

public ObjectNotFoundException(String message)
Deprecated. Use of error codes is strongly recommended.

Creates the exception with the provided message.

Parameters:
message - the exception message.

ObjectNotFoundException

public ObjectNotFoundException(ErrorCase errorCase,
                               long oid)
Creates the exception with the provided error code and the OID of the object. The OID will be appended to the message.

Parameters:
errorCase - the error code.
oid - the OID of the object.

ObjectNotFoundException

public ObjectNotFoundException(String message,
                               long oid)
Deprecated. Use of error codes is strongly recommended.

Creates the exception with the provided message and the OID of the object. The OID will be appended to the message.

Parameters:
message - the root message
oid - the OID of the object.

ObjectNotFoundException

public ObjectNotFoundException(ErrorCase errorCase,
                               Serializable identifier)
Creates the exception with the provided error code and the identifier of the object. The identifier will be appended to the message.

Parameters:
errorCase - the error code.
identifier - the identifier, such as an ID or an OID.

ObjectNotFoundException

public ObjectNotFoundException(String message,
                               Serializable identifier)
Deprecated. Use of error codes is strongly recommended.

Creates the exception with the provided message and the identifier of the object. The identifier will be appended to the message.

Parameters:
message - the root message.
identifier - the identifier, such as an ID or an OID.

ObjectNotFoundException

public ObjectNotFoundException(boolean s,
                               ErrorCase errorCase,
                               Serializable identifier)
Creates the exception with the provided message.

Parameters:
errorCase - the error code.
identifier - the identifier, such as an ID or an OID.

ObjectNotFoundException

public ObjectNotFoundException(boolean s,
                               ErrorCase errorCase,
                               String message,
                               Serializable identifier)
Creates the exception with the provided message.

Parameters:
message - the exception message.
Method Detail

getIdentifier

public Serializable getIdentifier()
Gets the identifier of the object. It can be the OID, the elementOID or the ID of the object.

Returns:
a String in case of an ID, or a Long in case of an OID or elementOID, identifying the object or null if no identifier was provided.


Copyright © 2017 Eclipse Stardust. All Rights Reserved.