Objectivity for Java Reference

com.objy.db.iapp
Interface Persistent

All Known Subinterfaces:
IooObj, PersistentEvents

public interface Persistent

Defines the behavior shared by all persistent objects.

The Persistent interface provides implicit persistence behavior. Its methods give access to an object's persistor; Objectivity for Java uses the persistor to perform persistent operations on the object.

Defining a Persistence-Capable Class Using Persistent

To define a persistence-capable class with the minimal public API, you define a class that implements the Persistent interface. Your class must provide a mechanism for getting and setting an object's persistor.

If you desire, you can also implement public or private methods to perform persistence operations explicitly; see Providing Explicit Persistence Behavior.

Related Classes and Interfaces

Alternative ways to define a persistence-capable class are:

For additional information, see Defining Persistence-Capable Classes.


Method Summary
 PooObj getPersistor()
          Gets the object providing persistence behavior for this object.
 void setPersistor(PooObj persistor)
          Sets the object providing persistence behavior for this object.
 

Method Detail

getPersistor

public PooObj getPersistor()
Gets the object providing persistence behavior for this object.

Returns:
This object's persistor.

setPersistor

public void setPersistor(PooObj persistor)
Sets the object providing persistence behavior for this object.

Parameters:
persistor - The object providing persistence behavior for this object.

You should not call this method directly.


Objectivity for Java Reference

Copyright © 2000 Objectivity, Inc. All rights reserved.