]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.db/src/org/simantics/db/request/ReadInterface.java
Fail safe import fixes made by Antti
[simantics/platform.git] / bundles / org.simantics.db / src / org / simantics / db / request / ReadInterface.java
1 package org.simantics.db.request;
2
3 import org.simantics.db.AsyncRequestProcessor;
4 import org.simantics.db.ReadGraph;
5 import org.simantics.db.RequestProcessor;
6 import org.simantics.db.Session;
7 import org.simantics.db.exception.DatabaseException;
8 import org.simantics.db.procedure.AsyncListener;
9 import org.simantics.db.procedure.AsyncProcedure;
10 import org.simantics.db.procedure.Listener;
11 import org.simantics.db.procedure.Procedure;
12 import org.simantics.db.procedure.SyncListener;
13 import org.simantics.db.procedure.SyncProcedure;
14
15 /**
16  * 
17  * An interface representing a computation of a single result. Some standard implementations of ReadInterface and WriteInterface include
18  * <ul>
19  * <li>{@link ResourceRead} which is identified by a single resource
20  * <li>{@link ResourceRead2} which is identified by a pair of resources
21  * <li>{@link UnaryRead} which is identifier by a single object
22  * <li>{@link BinaryRead} which is identifier by a pair of objects
23  * <li>{@link UniqueRead} which is unique (not equal to anything but itself)
24  * <li>{@link ReadRequest} which does not report a result
25  * </ul>
26  * <p>
27  * 
28  * The client is not expected to implement this class but rather to extend one of the standard implementations.
29  * 
30  * @version 1.5
31  * @author Antti Villberg
32  * @see WriteInterface
33  * @see RequestProcessor
34  * @see ReadGraph
35  * @see Session
36  */
37
38 public interface ReadInterface<Result> {
39
40         Result request(RequestProcessor processor) throws DatabaseException;
41         void request(AsyncRequestProcessor processor, AsyncProcedure<Result> procedure);
42         void request(AsyncRequestProcessor processor, Procedure<Result> procedure);
43         void request(AsyncRequestProcessor processor, SyncProcedure<Result> procedure);
44         void request(AsyncRequestProcessor processor, AsyncListener<Result> procedure);
45         void request(AsyncRequestProcessor processor, Listener<Result> procedure);
46         void request(AsyncRequestProcessor processor, SyncListener<Result> procedure);
47         
48 }