1 package fi.vtt.simantics.procore.internal;
3 import org.simantics.db.procore.cluster.ClusterImpl;
4 import org.simantics.db.service.ClusterUID;
5 import org.simantics.db.service.ClusterBuilder.StatementHandle;
7 final public class StatementHandleImpl implements StatementHandle {
13 final ClusterUID pClusterUID;
14 final ClusterUID oClusterUID;
16 public StatementHandleImpl(int pKey, byte pForeign, int oKey, byte oForeign,
17 ClusterUID pClusterUID, ClusterUID oClusterUID) {
20 this.pForeign = pForeign;
21 this.oForeign = oForeign;
22 this.pClusterUID = pClusterUID;
23 this.oClusterUID = oClusterUID;
26 public void apply(Object cluster) {
28 ClusterImpl impl = (ClusterImpl)cluster;
29 Change change = impl.change;
31 change.addStatementIndex1(pKey, pClusterUID, pForeign, impl.foreignLookup);
32 change.addStatementIndex2(oKey, oClusterUID, oForeign, impl.foreignLookup);