org.jafer.zclient.operations
Class PresentException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.jafer.exception.JaferException
              extended by org.jafer.zclient.operations.PresentException
All Implemented Interfaces:
java.io.Serializable

public class PresentException
extends JaferException

Exception thrown if problems retrieving records

See Also:
Serialized Form

Field Summary
private  Diagnostic[] diagnostics
          Stores a reference to the diagnostics that were reported
private  int numberOfRecordsReturned
          Stores a reference to the number of records that the search returned
private  int status
          Stores a reference to ststus of this execptin
static int STATUS_ORIGIN_FAILURE
          Stores a reference to the status code of 3 for STATUS_ORIGIN_FAILURE
static int STATUS_REQUEST_TERMINATED
          Stores a reference to the status code of 1 for STATUS_REQUEST_TERMINATED
static int STATUS_TARGET_FAILURE
          Stores a reference to the status code of 4 for STATUS_TARGET_FAILURE
static int STATUS_TERMINAL_FAILURE
          Stores a reference to the status code of 5 for STATUS_TERMINAL_FAILURE
static int STATUS_TO_MANY_RECORDS
          Stores a reference to the status code of 2 for STATUS_TO_MANY_RECORDS
 
Constructor Summary
PresentException(int status, int numberOfRecordsReturned, Diagnostic[] diagnostics, java.lang.String message)
          Constructor
PresentException(int status, int numberOfRecordsReturned, java.lang.String message)
          Constructor
PresentException(int status, int numberOfRecordsReturned, java.lang.String message, java.lang.Throwable cause)
          Constructor
 
Method Summary
 Diagnostic[] getDiagnostics()
          Returns the diagnostics for this execption
 int getNumberOfRecordsReturned()
          Returns the number of records that were returned by the search
 int getStatus()
          Returns the status of this execption
 boolean hasDiagnostics()
          Returns a boolean to indicate if this exception has diagnostic information
 
Methods inherited from class org.jafer.exception.JaferException
getAddInfo, getDiagCondition, getDiagnostic, hasDiagnostic
 
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
 

Field Detail

STATUS_REQUEST_TERMINATED

public static final int STATUS_REQUEST_TERMINATED
Stores a reference to the status code of 1 for STATUS_REQUEST_TERMINATED

See Also:
Constant Field Values

STATUS_TO_MANY_RECORDS

public static final int STATUS_TO_MANY_RECORDS
Stores a reference to the status code of 2 for STATUS_TO_MANY_RECORDS

See Also:
Constant Field Values

STATUS_ORIGIN_FAILURE

public static final int STATUS_ORIGIN_FAILURE
Stores a reference to the status code of 3 for STATUS_ORIGIN_FAILURE

See Also:
Constant Field Values

STATUS_TARGET_FAILURE

public static final int STATUS_TARGET_FAILURE
Stores a reference to the status code of 4 for STATUS_TARGET_FAILURE

See Also:
Constant Field Values

STATUS_TERMINAL_FAILURE

public static final int STATUS_TERMINAL_FAILURE
Stores a reference to the status code of 5 for STATUS_TERMINAL_FAILURE

See Also:
Constant Field Values

status

private int status
Stores a reference to ststus of this execptin


numberOfRecordsReturned

private int numberOfRecordsReturned
Stores a reference to the number of records that the search returned


diagnostics

private Diagnostic[] diagnostics
Stores a reference to the diagnostics that were reported

Constructor Detail

PresentException

public PresentException(int status,
                        int numberOfRecordsReturned,
                        Diagnostic[] diagnostics,
                        java.lang.String message)
Constructor

Parameters:
status - the status number for this execption
numberOfRecordsReturned - The number of records that were returned
diagnostics - The diagnostics that were returned
message - The detailed message string for the execption

PresentException

public PresentException(int status,
                        int numberOfRecordsReturned,
                        java.lang.String message)
Constructor

Parameters:
status - the status number for this execption
numberOfRecordsReturned - The number of records that were returned
message - The detailed message string for the execption

PresentException

public PresentException(int status,
                        int numberOfRecordsReturned,
                        java.lang.String message,
                        java.lang.Throwable cause)
Constructor

Parameters:
status - the status number for this execption
numberOfRecordsReturned - The number of records that were returned
message - The detailed message string for the execption
cause - The exception that caused this PresentException to be created
Method Detail

getStatus

public int getStatus()
Returns the status of this execption

Returns:
The status code that matches the ststus constants

getNumberOfRecordsReturned

public int getNumberOfRecordsReturned()
Returns the number of records that were returned by the search

Returns:

getDiagnostics

public Diagnostic[] getDiagnostics()
Returns the diagnostics for this execption

Returns:
An array of diagnostics

hasDiagnostics

public boolean hasDiagnostics()
Returns a boolean to indicate if this exception has diagnostic information

Returns:
true if diagnostics are contained in this execption