Sophie

Sophie

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

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

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


<p>The evaluation API consists of two interfaces, <i>Evaluation</i> and <i>Candidate</i>. Evaluation implementations are implemented by the user and injected into a query. During a query, they will be called from db4o with a candidate instance in order to decide whether to include it into the current (sub-)result.</p>

<p>The Evaluation interface contains a single method only:</p>



<span name="cs_wiki_filter" csw_filters="net">

<p>.NET: <code>public void Evaluate(Candidate candidate)</code> </p>

</span>

<p>This will be called by db4o to check whether the object encapsulated by this candidate should be included into the current candidate set.</p>

<p>
The Candidate interface provides three methods:</p>



<p><span name="cs_wiki_filter" csw_filters="net"></p>
<p>.NET:</p><p><code>public Object GetObject()
</p><p>public void Include(bool flag)
</p><p>public ObjectContainer ObjectContainer() </code>
</span></p>

<p>An Evaluation implementation may call getObject() to retrieve the actual object instance to be evaluated, it may call include() to instruct db4o whether or not to include this object in the current candidate set, and finally it may access the current database directly by calling objectContainer().</p></div>
    </div>
    <div id="footer">
					This revision (6) was last Modified 2006-11-13T15:31:52 by Tetyana.
				</div>
  </body>
</html>