rmrs.persist
Class PersistException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--rmrs.persist.PersistException

public class PersistException
extends java.lang.Exception

We only have a single exception class that can represent several exceptions. This is just more convenient that cluttering up the namespace with different exceoption classes.

Version:
$Id: PersistException.java,v 1.1 1999/12/06 19:25:44 schadow Exp SCHADOW_G $
Author:
Gunther Schadow
See Also:
Serialized Form

Field Summary
static int CLASS_NOT_CONFORMANT
          The class found in the persistent store is not assignable to the class requested.
static int CLASS_NOT_FOUND
          Thrown if a java class can not be found.
static int CLASS_NOT_INSTANTIABLE
          Class is not instantiable for strange reasons.
static int CONSTRUCTOR_EXCEPTION
          An exception was thrown when the object was initialized for retrieval.
static int DUPLICATE_JAVA_OBJECT
          This is an internal error that should never occur: the same persistent object was instantiated twice in a JVM.
static int FIELD_NOT_FOUND
          The initialization tables mention a field that apparently doesn't exist (any more?)
static int INVALID_CONSTRUCTOR
          If there is no useful constructor that can be called by the broker when retrieving an object.
static int MISC_EXCEPTION
          A catch-all for unclassified or unpredictable exceptions.
static int NO_ACCESS_TO_FIELD
          Thrown if we can't access a field of a persistent object.
static int NO_BROKER
          Thrown if save, load or query is tried without a broker.
static int NO_INLINE
          If a field was designated for inline storage but contains a persistent object.
static int OBJECT_VIEW_EXPECTED
           
static int OID_NOT_FOUND
          The OID could not be found in the realm of the persistence broker used to load an object
static int OTHER_BROKER
          Thrown if one tries to reassign a broker to a real object that already has a broker assigned.
static int QUERY_EXAMPLE_EXPECTED
          A query example was expected, yet a real object (or object view) was provided.
static int REAL_OBJECT_EXPECTED
           
static int SQL_EXCEPTION
          Exceptions from the underlying JDBC work.
static int WRITE_PROTECTED
          Save was tried on an object that is write protected.
 
Constructor Summary
PersistException(int type)
          Raise a PersistException of specified type.
PersistException(int type, java.lang.String arg)
          Raise a PersistException of specified type with a string argument.
PersistException(int type, java.lang.String arg, java.lang.Throwable ex)
          This variant is called if we forward another exception just caught.
 
Method Summary
 java.lang.String getArg()
           
 java.lang.Throwable getException()
           
 int getType()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MISC_EXCEPTION

public static final int MISC_EXCEPTION
A catch-all for unclassified or unpredictable exceptions.

NO_BROKER

public static final int NO_BROKER
Thrown if save, load or query is tried without a broker.

OTHER_BROKER

public static final int OTHER_BROKER
Thrown if one tries to reassign a broker to a real object that already has a broker assigned.

WRITE_PROTECTED

public static final int WRITE_PROTECTED
Save was tried on an object that is write protected. An object is write protected if it is not a real object or if a real object was checked out as write protected.

SQL_EXCEPTION

public static final int SQL_EXCEPTION
Exceptions from the underlying JDBC work.

INVALID_CONSTRUCTOR

public static final int INVALID_CONSTRUCTOR
If there is no useful constructor that can be called by the broker when retrieving an object.

NO_INLINE

public static final int NO_INLINE
If a field was designated for inline storage but contains a persistent object. Persistent object may never be stored inline. Only composite values without identity can be inlined.

CLASS_NOT_INSTANTIABLE

public static final int CLASS_NOT_INSTANTIABLE
Class is not instantiable for strange reasons.

NO_ACCESS_TO_FIELD

public static final int NO_ACCESS_TO_FIELD
Thrown if we can't access a field of a persistent object. Should not normally occur, unless someone has constrained some security policy?

CLASS_NOT_FOUND

public static final int CLASS_NOT_FOUND
Thrown if a java class can not be found. Should not occur dynamically but only when reading the initialization tables

FIELD_NOT_FOUND

public static final int FIELD_NOT_FOUND
The initialization tables mention a field that apparently doesn't exist (any more?)

DUPLICATE_JAVA_OBJECT

public static final int DUPLICATE_JAVA_OBJECT
This is an internal error that should never occur: the same persistent object was instantiated twice in a JVM.

OID_NOT_FOUND

public static final int OID_NOT_FOUND
The OID could not be found in the realm of the persistence broker used to load an object

CLASS_NOT_CONFORMANT

public static final int CLASS_NOT_CONFORMANT
The class found in the persistent store is not assignable to the class requested.

CONSTRUCTOR_EXCEPTION

public static final int CONSTRUCTOR_EXCEPTION
An exception was thrown when the object was initialized for retrieval.

QUERY_EXAMPLE_EXPECTED

public static final int QUERY_EXAMPLE_EXPECTED
A query example was expected, yet a real object (or object view) was provided.

OBJECT_VIEW_EXPECTED

public static final int OBJECT_VIEW_EXPECTED

REAL_OBJECT_EXPECTED

public static final int REAL_OBJECT_EXPECTED
Constructor Detail

PersistException

public PersistException(int type)
Raise a PersistException of specified type.

PersistException

public PersistException(int type,
                        java.lang.String arg)
Raise a PersistException of specified type with a string argument.

PersistException

public PersistException(int type,
                        java.lang.String arg,
                        java.lang.Throwable ex)
This variant is called if we forward another exception just caught.
Method Detail

getType

public int getType()

getArg

public java.lang.String getArg()

getException

public java.lang.Throwable getException()