X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.db.procore%2Fsrc%2Ffi%2Fvtt%2Fsimantics%2Fprocore%2Finternal%2FStatementHandleImpl.java;h=83a8ec72d2d7f074d6e4ea09d85f72c333a55453;hp=1630b12521637550f2d6357b51d221f2dd0145e4;hb=9f0fd59be54719b1fe9322d8fd37e4950857308c;hpb=969bd23cab98a79ca9101af33334000879fb60c5 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 index 1630b1252..83a8ec72d 100644 --- 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 @@ -1,36 +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); - - } - -} +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); + + } + +}