Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 864d1c3c3cd8df4e3a2692faf8776e05 > files > 596

db4o-doc-7.4-2.fc13.i686.rpm

<html>
  <head>
    <META http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Object Callbacks</title>
    <link rel="stylesheet" type="text/css" href="../../style.css">
  </head>
  <body>
    <div class="CommonContent">
      <div class="CommonContentArea">
        <h1>Object Callbacks</h1>

<p>Callback methods are automatically called on persistent objects by db4o during certain database events.</p>
<p>For a complete list of the signatures of all available methods see the com.db4o.ext.ObjectCallbacks interface.</p>
<p>You do not have to implement this interface. db4o recognizes the presence of individual methods by their signature, using reflection. You can simply add one or more of the methods to your persistent classes and they will be called.</p>
<p>Returning false to the <code>#objectCanXxxx()</code> methods will prevent the current action from being taken.</p>
<p>In a client/server environment callback methods will be called on the client with two exceptions: </p><code>objectOnDelete(), objectCanDelete()</code>
<p>Some possible usecases for callback methods:</p><ul><li>
setting default values after refactorings <br></li><li>checking object integrity before storing objects <br></li><li>setting transient fields <br></li><li>restoring connected state (of GUI, files, connections) <br></li><li>cascading activation <br></li><li>cascading updates <br></li><li>creating special indexes
</li></ul></div>
    </div>
    <div id="footer">
					This revision (3) was last Modified 2006-11-13T11:06:05 by Tetyana.
				</div>
  </body>
</html>