]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/request/PossibleSessionUser.java
Speeding up platform startup time
[simantics/platform.git] / bundles / org.simantics.db.layer0 / src / org / simantics / db / layer0 / request / PossibleSessionUser.java
1 package org.simantics.db.layer0.request;
2
3 import org.simantics.db.ReadGraph;
4 import org.simantics.db.Resource;
5 import org.simantics.db.SessionModel;
6 import org.simantics.db.exception.DatabaseException;
7 import org.simantics.db.request.Read;
8 import org.simantics.operation.Layer0X;
9
10 public class PossibleSessionUser implements Read<Resource> {
11
12     @Override
13     public Resource perform(ReadGraph graph) throws DatabaseException {
14         Layer0X L0X = Layer0X.getInstance(graph);
15         Resource session = graph.getService(SessionModel.class).getResource();
16         return graph.getPossibleObject(session, L0X.Session_HasUser);
17     }
18     
19 }