oracle.cle.persistence
Class Handler

java.lang.Object
  |
  +--oracle.cle.persistence.DeploymentConnector
        |
        +--oracle.cle.persistence.DeploymentAutoConnector
              |
              +--oracle.cle.persistence.Handler
All Implemented Interfaces:
HandlerDefinition, java.io.Serializable
Direct Known Subclasses:
BC4JHandler, MessageLogHandler, TOPLink3TierHandler, UserHandler, UserProfileHandler

public abstract class Handler
extends DeploymentAutoConnector
implements HandlerDefinition, java.io.Serializable

The superclass for classes that handle persistence queries for a specific resource.

See Also:
Serialized Form

Constructor Summary
Handler()
           
 
Method Summary
 void commitChanges(java.lang.Object sessionId, boolean commitAndResume)
          Empty Implementation
 java.lang.Object createObject(java.util.Map defaultValues)
          Make a new instance of the specified Object for which this Handler is being constructed.
 java.lang.Object createObject(java.util.Map defaultValues, java.lang.Object sessionId)
          Make a new instance of the specified Object for which this Handler is being constructed.
 void deleteObject(java.lang.Object key)
          Delete the Resource with the specified key.
 void deleteObject(java.lang.Object key, java.lang.Object sessionId)
          Delete the Resource with the specified key.
 void deleteObject(Resource aResource, java.lang.Object sessionId)
          Deprecated. Use deleteObject(Object, Object) instead. Handler will now work against any business object interface, not only those extending Resource. Resource is deprecated.
 java.lang.Object findObject(java.lang.Object key)
          Get the Object for the specified key
 java.lang.Object findObject(java.lang.Object key, java.lang.Object sessionId)
          Get the Object for the specified key
 java.util.Vector getAllObjects()
          Returns all the objects of the Resource for which this Handler was built.
 java.util.Vector getAllObjects(java.lang.Object sessionId)
          Returns all the objects of the Resource for which this Handler was built.
 Resource getObject(java.lang.Object key, java.lang.Object sessionId)
          Deprecated. Use findObject instead. Handler will now work against any business object interface, not only those extending Resource. Resource is deprecated.
 Resource newObject(java.lang.Object sessionId)
          Deprecated. Use createObject instead. Handler will now work against any business object interface, not only those extending Resource. Resource ise deprecated.
 java.lang.Object registerForChanges(Resource anObject, java.lang.Object sessionId)
          Deprecated.  
 java.util.Vector registerForChanges(java.util.Vector objects, java.lang.Object sessionId)
          Implements a loop for registering registering multiple objects for changes.
 void startTransaction(java.lang.Object sessionId)
          Empty Implementation
 void startTransaction(java.lang.Object sessionId, java.util.Vector readOnlyClasses)
          Empty Implementation
 
Methods inherited from class oracle.cle.persistence.DeploymentAutoConnector
getConnection, getConnection, getConnection, getConnection, getConnection, getConnection, getConnection, getConnection, getReferenceClass, releaseConnection, releaseConnection, releaseConnection, releaseConnection
 
Methods inherited from class oracle.cle.persistence.DeploymentConnector
deploymentKeyNotFound, getConnection, getConnection, getConnection, getConnection, getConnection, getConnection, getConnection, getConnection, getConnection, getConnection, getConnection, getConnection, getConnection, getDeploymentKey, getDeploymentKey, getDeploymentKey, getProvider, getProvider, providerNotSupported, releaseConnection, releaseConnection, releaseConnection, releaseConnection, releaseConnection, releaseConnection, releaseConnection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Handler

public Handler()
Method Detail

createObject

public java.lang.Object createObject(java.util.Map defaultValues,
                                     java.lang.Object sessionId)
                              throws java.lang.Exception
Make a new instance of the specified Object for which this Handler is being constructed. If the object requires default values, they can be passed via the Map provided.

If this method is not implemented for a given concrete Handler, then it will throw an UnsupportedOperationException

Specified by:
createObject in interface HandlerDefinition
Throws:
java.lang.Exception -  

createObject

public java.lang.Object createObject(java.util.Map defaultValues)
                              throws java.lang.Exception
Make a new instance of the specified Object for which this Handler is being constructed. If the object requires default values, they can be passed via the Map provided.

If this method is not implemented for a given concrete Handler, then it will throw an UnsupportedOperationException

Specified by:
createObject in interface HandlerDefinition
Throws:
java.lang.Exception -  

newObject

public Resource newObject(java.lang.Object sessionId)
                   throws java.lang.Exception
Deprecated. Use createObject instead. Handler will now work against any business object interface, not only those extending Resource. Resource ise deprecated.

If this method is not implemented for a given concrete Handler, then it will throw an UnsupportedOperationException

Specified by:
newObject in interface HandlerDefinition

getAllObjects

public java.util.Vector getAllObjects(java.lang.Object sessionId)
                               throws java.lang.Exception
Returns all the objects of the Resource for which this Handler was built. If this is an EmployeeHandler, for example, this method will return all the Employees in the system.

If this method is not implemented for a given concrete Handler, then it will throw an UnsupportedOperationException

Specified by:
getAllObjects in interface HandlerDefinition
Following copied from interface: oracle.cle.persistence.HandlerDefinition
Returns:
vector of objects

getAllObjects

public java.util.Vector getAllObjects()
                               throws java.lang.Exception
Returns all the objects of the Resource for which this Handler was built. If this is an EmployeeHandler, for example, this method will return all the Employees in the system.

If this method is not implemented for a given concrete Handler, then it will throw an UnsupportedOperationException

Specified by:
getAllObjects in interface HandlerDefinition
Following copied from interface: oracle.cle.persistence.HandlerDefinition
Returns:
vector of objects

findObject

public java.lang.Object findObject(java.lang.Object key,
                                   java.lang.Object sessionId)
                            throws java.lang.Exception
Get the Object for the specified key

If this method is not implemented for a given concrete Handler, then it will throw an UnsupportedOperationException

Specified by:
findObject in interface HandlerDefinition

findObject

public java.lang.Object findObject(java.lang.Object key)
                            throws java.lang.Exception
Get the Object for the specified key

If this method is not implemented for a given concrete Handler, then it will throw an UnsupportedOperationException

Specified by:
findObject in interface HandlerDefinition

getObject

public Resource getObject(java.lang.Object key,
                          java.lang.Object sessionId)
                   throws java.lang.Exception
Deprecated. Use findObject instead. Handler will now work against any business object interface, not only those extending Resource. Resource is deprecated.

Get the Resource for the specified key

If this method is not implemented for a given concrete Handler, then it will throw an UnsupportedOperationException

Specified by:
getObject in interface HandlerDefinition

deleteObject

public void deleteObject(java.lang.Object key,
                         java.lang.Object sessionId)
                  throws java.lang.Exception
Delete the Resource with the specified key. Default implementation...

If this method is not implemented for a given concrete Handler, then it will throw an UnsupportedOperationException

Specified by:
deleteObject in interface HandlerDefinition

deleteObject

public void deleteObject(java.lang.Object key)
                  throws java.lang.Exception
Delete the Resource with the specified key. Default implementation...

If this method is not implemented for a given concrete Handler, then it will throw an UnsupportedOperationException

Specified by:
deleteObject in interface HandlerDefinition

deleteObject

public void deleteObject(Resource aResource,
                         java.lang.Object sessionId)
                  throws java.lang.Exception
Deprecated. Use deleteObject(Object, Object) instead. Handler will now work against any business object interface, not only those extending Resource. Resource is deprecated.

Delete the specified Resource

If this method is not implemented for a given concrete Handler, then it will throw an UnsupportedOperationException

Specified by:
deleteObject in interface HandlerDefinition

startTransaction

public void startTransaction(java.lang.Object sessionId)
                      throws java.lang.Exception
Empty Implementation
Throws:
java.lang.Exception -  

startTransaction

public void startTransaction(java.lang.Object sessionId,
                             java.util.Vector readOnlyClasses)
                      throws java.lang.Exception
Empty Implementation
Throws:
java.lang.Exception -  

registerForChanges

public java.lang.Object registerForChanges(Resource anObject,
                                           java.lang.Object sessionId)
                                    throws java.lang.Exception
Deprecated.  

Empty Implementation
Throws:
java.lang.Exception -  

registerForChanges

public java.util.Vector registerForChanges(java.util.Vector objects,
                                           java.lang.Object sessionId)
                                    throws java.lang.Exception
Implements a loop for registering registering multiple objects for changes. Vector elements must be Resources.
Throws:
java.lang.Exception -  

commitChanges

public void commitChanges(java.lang.Object sessionId,
                          boolean commitAndResume)
                   throws java.lang.Exception
Empty Implementation
Throws:
java.lang.Exception -  


Copyright © 2003 ORACLE Corp. All Rights Reserved.