WebObjects 5.2

com.webobjects.eoaccess
Class EOAccessFaultHandler

java.lang.Object
  |
  +--com.webobjects.eocontrol.EOFaultHandler
        |
        +--com.webobjects.eoaccess.EOAccessGenericFaultHandler
              |
              +--com.webobjects.eoaccess.EOAccessFaultHandler

public class EOAccessFaultHandler
extends EOAccessGenericFaultHandler

EOAccessFaultHandler is a subclass of EOAccessGenericFaultHandler that implements an object fault for Enterprise Objects.


Constructor Summary
EOAccessFaultHandler(EOKeyGlobalID globalID, EODatabaseContext dbcontext, EOEditingContext ec)
          Returns a new fault handler with all of the information necessary to fetch the object when the fault is fired.
 
Method Summary
 void completeInitializationOfObject(Object object)
          Asks the receiver's database context to fetch the object if it is not already in memory.
 String descriptionForObject(Object object)
          Returns a string naming the original class of the receiver's fault and giving the fault's id, also noting that it's a fault.
 EOKeyGlobalID globalID()
          Returns the receiver's globalID.
 String toString()
          Returns a string representation of the fault handler.
 
Methods inherited from class com.webobjects.eoaccess.EOAccessGenericFaultHandler
databaseContext, editingContext, faultWillFire, generation, linkAfterHandler, next, previous, processQueue, setContext
 
Methods inherited from class com.webobjects.eocontrol.EOFaultHandler
clearFault, createFaultForDeferredFault, eoShallowDescription, handlerForFault, isFault, makeObjectIntoFault, targetClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EOAccessFaultHandler

public EOAccessFaultHandler(EOKeyGlobalID globalID,
                            EODatabaseContext dbcontext,
                            EOEditingContext ec)
Returns a new fault handler with all of the information necessary to fetch the object when the fault is fired.
Parameters:
globalID - The EOKeyGlobalID for the object to be faulted in.
dbcontext - The EODatabaseContext that should be used to load the object to be faulted in.
ec - The EOEditingContext in which the faulted object should be recorded.
Method Detail

completeInitializationOfObject

public void completeInitializationOfObject(Object object)
Asks the receiver's database context to fetch the object if it is not already in memory. This method is called when the fault is fired and uses the EOObjectStore interface to get the information from the receiver's editing context. Throws an exception if the fault was fired while there was another fetch in progress and there were no database channels available to process this fault.
Overrides:
completeInitializationOfObject in class EOAccessGenericFaultHandler
Parameters:
object - The fault object.
Throws:
IllegalStateException - if there are no database channels available to process this fault.

descriptionForObject

public String descriptionForObject(Object object)
Returns a string naming the original class of the receiver's fault and giving the fault's id, also noting that it's a fault. For example: "<Employee (Fault 0x3a07)>". (The fault must be passed as a parameter because EOFaultHandlers don't store back pointers to their faults.)
Overrides:
descriptionForObject in class EOFaultHandler
Parameters:
object - The fault object.
Returns:
A string describing the receiver's fault.

globalID

public EOKeyGlobalID globalID()
Returns the receiver's globalID.
Returns:
The receiver's globalID.

toString

public String toString()
Returns a string representation of the fault handler.
Overrides:
toString in class EOFaultHandler
Returns:
The string representation of the fault handler.

Last updated Fri Feb 21 13:15:00 PST 2003.

Copyright © 2003 Apple Computer, Inc.