ozone API

org.ozoneDB
Interface OzoneCompatible

All Superinterfaces:
OzoneCompatibleOrProxy, java.io.Serializable
All Known Implementing Classes:
OzoneObject

public interface OzoneCompatible
extends java.io.Serializable, OzoneCompatibleOrProxy

All objects that are stored in ozone have to implement this interface. The easiest way to build database objects is to extend the OzoneObject class, which implements OzoneCompatible already.

Version:
$Revision: 1.3 $Date: 2002/07/12 09:25:11 $
Author:
SMB

Method Summary
 org.ozoneDB.core.ObjectContainer container()
          Return the container of the receiver.
 OzoneInterface database()
          Return the database link
 void onCreate()
          This method will be automaticly called when this object is created using createObject().
 void onDelete()
          This method will be automaticly called when this object is deleted using deleteObject().
 OzoneProxy self()
          Return a proxy for the receiver.
 void setContainer(org.ozoneDB.core.ObjectContainer _container)
          Set the container of the receiver.
 boolean toXML(org.xml.sax.ContentHandler ch)
          This method is automatically called by the ozone server to get an idea of the size of this object.
 
Methods inherited from interface org.ozoneDB.OzoneCompatibleOrProxy
getObjectID
 

Method Detail

setContainer

public void setContainer(org.ozoneDB.core.ObjectContainer _container)
Set the container of the receiver. The member that holds the actual reference must be transient.


container

public org.ozoneDB.core.ObjectContainer container()
Return the container of the receiver.


self

public OzoneProxy self()
Return a proxy for the receiver.


database

public OzoneInterface database()
Return the database link


onCreate

public void onCreate()
              throws java.lang.Exception
This method will be automaticly called when this object is created using createObject().

java.lang.Exception

onDelete

public void onDelete()
              throws java.lang.Exception
This method will be automaticly called when this object is deleted using deleteObject(). It should delete all database objects that depend on it and that are not otherwise reachable. In other words, this is the persistent destructor of the object.

java.lang.Exception

toXML

public boolean toXML(org.xml.sax.ContentHandler ch)
              throws org.xml.sax.SAXException
This method is automatically called by the ozone server to get an idea of the size of this object. The method should not return the actual current size of the object but the size the object will probably reach during its life time.

Returns:
The to be expected size of the object or -1 if a default value should be used. public int size() throws Exception;
org.xml.sax.SAXException

ozone API

Copyright (C) The Ozone Database Project - www.ozone-db.org. All rights reserved.