]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.db.testing/src/org/simantics/db/testing/common/ReadCommand.java
Minor fix and optimization for exporting TG and Pgraph with sharedlib
[simantics/platform.git] / bundles / org.simantics.db.testing / src / org / simantics / db / testing / common / ReadCommand.java
1 package org.simantics.db.testing.common;
2
3 import org.simantics.db.ReadGraph;
4 import org.simantics.db.common.request.ReadRequest;
5 import org.simantics.db.exception.DatabaseException;
6
7 abstract public class ReadCommand<T extends CommandSequenceEnvironment> extends Command<T> {
8
9         @Override
10         public void run(final T environment) throws Exception {
11                 environment.getSession().sync(new ReadRequest() {
12
13                         @Override
14                         public void run(ReadGraph graph) throws DatabaseException {
15                                 ReadCommand.this.run(graph, environment);
16                         }
17                         
18                 });
19         }
20         
21         protected void run(ReadGraph graph, T environment) throws DatabaseException {
22                 
23         }
24
25 }