/** * Converts a Titan vertex id of a given vertex to the user provided id as the inverse mapping of {@link #toVertexId(long)}. * * @param v Vertex * @return original user provided id */ public static final long fromVertexID(TitanVertex v) { Preconditions.checkArgument(v.hasId(), "Invalid vertex provided: %s", v); return fromVertexId(v.longId()); }
private static TitanVertex vInTx(TitanVertex v, TitanTransaction tx) { if (!v.hasId()) return v; else return tx.getVertex(v.longId()); }
public boolean isPartitionedVertex(TitanVertex vertex) { return vertex.hasId() && idInspector.isPartitionedVertex(vertex.longId()); }
private void verifyWriteAccess(TitanVertex... vertices) { if (config.isReadOnly()) throw new UnsupportedOperationException("Cannot create new entities in read-only transaction"); for (TitanVertex v : vertices) { if (v.hasId() && idInspector.isUnmodifiableVertex(v.longId()) && !v.isNew()) throw new SchemaViolationException("Cannot modify unmodifiable vertex: "+v); } verifyAccess(vertices); }
if (adjacentVertex.hasId()) constraintMap.put(ImplicitKey.ADJACENT_ID,new PointInterval(adjacentVertex.longId())); else isFitted=false;
int partition = -1; for (int vi = 0; vi < vPerTx; vi++) { assertTrue(vs[vi].hasId()); int pid = getPartitionID(vs[vi]); if (partition < 0) partition = pid;
/** * Converts a Titan vertex id of a given vertex to the user provided id as the inverse mapping of {@link #toVertexId(long)}. * * @param v Vertex * @return original user provided id */ public static final long fromVertexID(TitanVertex v) { Preconditions.checkArgument(v.hasId(), "Invalid vertex provided: %s", v); return fromVertexId(v.longId()); }
/** * Converts a Titan vertex id of a given vertex to the user provided id as the inverse mapping of {@link #toVertexId(long)}. * * @param v Vertex * @return original user provided id */ public static final long fromVertexID(TitanVertex v) { Preconditions.checkArgument(v.hasId(), "Invalid vertex provided: %s", v); return fromVertexId(v.getLongId()); }
public boolean isPartitionedVertex(TitanVertex vertex) { return vertex.hasId() && idInspector.isPartitionedVertex(vertex.getLongId()); }
public boolean isPartitionedVertex(TitanVertex vertex) { return vertex.hasId() && idInspector.isPartitionedVertex(vertex.longId()); }
private void verifyWriteAccess(TitanVertex... vertices) { if (config.isReadOnly()) throw new UnsupportedOperationException("Cannot create new entities in read-only transaction"); for (TitanVertex v : vertices) { if (v.hasId() && idInspector.isUnmodifiableVertex(v.getLongId()) && !v.isNew()) throw new SchemaViolationException("Cannot modify unmodifiable vertex: "+v); } verifyAccess(vertices); }
private void verifyWriteAccess(TitanVertex... vertices) { if (config.isReadOnly()) throw new UnsupportedOperationException("Cannot create new entities in read-only transaction"); for (TitanVertex v : vertices) { if (v.hasId() && idInspector.isUnmodifiableVertex(v.longId()) && !v.isNew()) throw new SchemaViolationException("Cannot modify unmodifiable vertex: "+v); } verifyAccess(vertices); }
if (adjacentVertex.hasId()) constraintMap.put(ImplicitKey.ADJACENT_ID,new PointInterval(adjacentVertex.longId())); else isFitted=false;
if (adjacentVertex.hasId()) constraintMap.put(ImplicitKey.ADJACENT_ID,new PointInterval(adjacentVertex.getLongId())); else isFitted=false;
assertEquals("group",g.getLabel()); assertEquals(names.size(),Iterables.size(g.getProperties("name"))); assertTrue(g.hasId()); gids[i]=g.getLongId(); if (i>0) { int partition = -1; for (int vi=0;vi<vPerTx;vi++) { assertTrue(vs[vi].hasId()); int pid = getPartitionID(vs[vi],idManager); if (partition<0) partition=pid;