01: /*
02: Copyright (C) 2007 Mobixess Inc. http://www.java-objects-database.com
03:
04: This file is part of the JODB (Java Objects Database) open source project.
05:
06: JODB is free software; you can redistribute it and/or modify it under
07: the terms of version 2 of the GNU General Public License as published
08: by the Free Software Foundation.
09:
10: JODB is distributed in the hope that it will be useful, but WITHOUT ANY
11: WARRANTY; without even the implied warranty of MERCHANTABILITY or
12: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13: for more details.
14:
15: You should have received a copy of the GNU General Public License along
16: with this program; if not, write to the Free Software Foundation, Inc.,
17: 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18: */
19: package com.mobixess.jodb.soda.api;
20:
21: /**
22: * candidate for {@link Evaluation} callbacks.
23: * <br><br>
24: * During {@linkplain Query#execute query execution} all registered
25: * {@link Evaluation} callback handlers are called with
26: * {@link Candidate} proxies that represent the persistent objects
27: * that meet all other {@link Query} criteria.
28: * <br><br>
29: * A {@link Candidate} provides access to the persistent object it
30: * represents and allows to specify, whether it is to be included in the
31: * {@link ObjectSet} resultset.
32: */
33: public interface Candidate {
34:
35: /**
36: * specify whether the Candidate is to be included in the
37: * {@link ObjectSet} resultset.
38: * <br><br>
39: * This method may be called multiple times. The last call prevails.
40: * @param flag inclusion.
41: */
42: public void include(boolean flag);
43:
44: /**
45: * returns the persistent object that is represented by this query
46: * {@link Candidate}.
47: * @return Object the persistent object.
48: */
49: public Object getObject();
50:
51: }
|