]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/request/IsActive.java
Merge "Allow loading databoard serialized files with type adapting" into release...
[simantics/platform.git] / bundles / org.simantics.db.layer0 / src / org / simantics / db / layer0 / request / IsActive.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.common.request.ResourceRead;
6 import org.simantics.db.exception.DatabaseException;
7 import org.simantics.operation.Layer0X;
8
9 public class IsActive extends ResourceRead<Boolean> {
10
11     public IsActive(Resource resource) {
12         super(resource);
13     }
14
15     @Override
16     public Boolean perform(ReadGraph graph) throws DatabaseException {
17         return graph.hasStatement(resource, Layer0X.getInstance(graph).IsActivatedBy);
18     }
19
20 }