Merge "Testing SonarQube with Simantics Platform SDK"
[simantics/platform.git] / bundles / org.simantics.db.procore / src / fi / vtt / simantics / procore / internal / ClusterBuilderFactoryImpl.java
1 package fi.vtt.simantics.procore.internal;\r
2 \r
3 import org.simantics.db.VirtualGraph;\r
4 import org.simantics.db.service.ClusterBuilder2;\r
5 import org.simantics.db.service.ClusterBuilderFactory;\r
6 \r
7 public class ClusterBuilderFactoryImpl implements ClusterBuilderFactory {\r
8 \r
9     final private SessionImplSocket session;\r
10     \r
11     ClusterBuilderFactoryImpl(SessionImplSocket session) {\r
12         this.session = session;\r
13     }\r
14     \r
15     @Override\r
16     public ClusterBuilder2 create(VirtualGraph vg, boolean allowImmutables) {\r
17         if(vg != null)\r
18                 return new VirtualClusterBuilderImpl2(session, vg, allowImmutables);\r
19         else\r
20                 return new ClusterBuilderImpl2(session, allowImmutables);\r
21     }\r
22 \r
23     \r
24 }\r