X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.db.procore%2Fsrc%2Ffi%2Fvtt%2Fsimantics%2Fprocore%2Finternal%2FStatementHandleImpl.java;fp=bundles%2Forg.simantics.db.procore%2Fsrc%2Ffi%2Fvtt%2Fsimantics%2Fprocore%2Finternal%2FStatementHandleImpl.java;h=1630b12521637550f2d6357b51d221f2dd0145e4;hb=969bd23cab98a79ca9101af33334000879fb60c5;hp=0000000000000000000000000000000000000000;hpb=866dba5cd5a3929bbeae85991796acb212338a08;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/StatementHandleImpl.java b/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/StatementHandleImpl.java new file mode 100644 index 000000000..1630b1252 --- /dev/null +++ b/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/StatementHandleImpl.java @@ -0,0 +1,36 @@ +package fi.vtt.simantics.procore.internal; + +import org.simantics.db.procore.cluster.ClusterImpl; +import org.simantics.db.service.ClusterUID; +import org.simantics.db.service.ClusterBuilder.StatementHandle; + +final public class StatementHandleImpl implements StatementHandle { + + final int pKey; + final int oKey; + final byte pForeign; + final byte oForeign; + final ClusterUID pClusterUID; + final ClusterUID oClusterUID; + + public StatementHandleImpl(int pKey, byte pForeign, int oKey, byte oForeign, + ClusterUID pClusterUID, ClusterUID oClusterUID) { + this.pKey = pKey; + this.oKey = oKey; + this.pForeign = pForeign; + this.oForeign = oForeign; + this.pClusterUID = pClusterUID; + this.oClusterUID = oClusterUID; + } + + public void apply(Object cluster) { + + ClusterImpl impl = (ClusterImpl)cluster; + Change change = impl.change; + + change.addStatementIndex1(pKey, pClusterUID, pForeign, impl.foreignLookup); + change.addStatementIndex2(oKey, oClusterUID, oForeign, impl.foreignLookup); + + } + +}