public Vertex getVertex(final Object id) { if (null == id) throw ExceptionFactory.vertexIdCanNotBeNull(); String idString = id.toString(); return this.vertices.get(idString); }
public Vertex getVertex(final Object id) { if (null == id) throw ExceptionFactory.vertexIdCanNotBeNull(); return createVertex(id.toString()); }
public Vertex getVertex(final Object id) { if (null == id) throw ExceptionFactory.vertexIdCanNotBeNull(); try { final Long longId; if (id instanceof Long) longId = (Long) id; else longId = Double.valueOf(id.toString()).longValue(); if (rawGraph.nodeExists(longId)) { return new Neo4jBatchVertex(this, longId); } else { return null; } } catch (NumberFormatException e) { return null; } }
public Vertex getVertex(final Object id) { if (null == id) throw ExceptionFactory.vertexIdCanNotBeNull(); try { final Long longId; if (id instanceof Long) longId = (Long) id; else longId = Double.valueOf(id.toString()).longValue(); if (rawGraph.nodeExists(longId)) { return new Neo4j2BatchVertex(this, longId); } else { return null; } } catch (NumberFormatException e) { return null; } }
@Override public TitanVertex getVertex(final Object id) { if (null == id) throw ExceptionFactory.vertexIdCanNotBeNull(); if (id instanceof Vertex) //allows vertices to be "re-attached" to the current transaction return getVertex(((Vertex) id).getId()); final long longId; if (id instanceof Long) { longId = (Long) id; } else if (id instanceof Number) { longId = ((Number) id).longValue(); } else { try { longId = Long.valueOf(id.toString()).longValue(); } catch (NumberFormatException e) { return null; } } return getVertex(longId); }
public Neo4j2Vertex getVertex(final Object id) { this.autoStartTransaction(false); if (null == id) throw ExceptionFactory.vertexIdCanNotBeNull(); try { final Long longId; if (id instanceof Long) longId = (Long) id; else if (id instanceof Number) longId = ((Number) id).longValue(); else longId = Double.valueOf(id.toString()).longValue(); return new Neo4j2Vertex(this.rawGraph.getNodeById(longId), this); } catch (NotFoundException e) { return null; } catch (NumberFormatException e) { return null; } }
public Vertex getVertex(final Object id) { if (null == id) throw ExceptionFactory.vertexIdCanNotBeNull(); try { return new RexsterVertex(RestHelper.getResultObject(this.graphURI + RexsterTokens.SLASH_VERTICES_SLASH + RestHelper.encode(id)), this); } catch (Exception e) { return null; } }
@Override public Vertex getVertex(final Object id) { if (id == null) { throw ExceptionFactory.vertexIdCanNotBeNull(); } try { final Long longId = Double.valueOf(id.toString()).longValue(); autoStartTransaction(false); com.sparsity.sparksee.gdb.Graph rawGraph = getRawGraph(); final int type = rawGraph.getObjectType(longId); if (type != com.sparsity.sparksee.gdb.Type.InvalidType) { return new SparkseeVertex(this, longId); } } catch (Exception e) { // If any exception was thrown (Number format or sparksee exceptions are not handled) or // the object type is InvalidType return null } return null; }
throw ExceptionFactory.vertexIdCanNotBeNull();
public OrientVertex getVertex(final Object id) { if (null == id) throw ExceptionFactory.vertexIdCanNotBeNull(); if (id instanceof OrientVertex) return (OrientVertex) id; else if (id instanceof ODocument) return new OrientVertex(this, (OIdentifiable) id); setCurrentGraphInThreadLocal(); ORID rid; if (id instanceof OIdentifiable) rid = ((OIdentifiable) id).getIdentity(); else { try { rid = new ORecordId(id.toString()); } catch (IllegalArgumentException iae) { // orientdb throws IllegalArgumentException: Argument 'xxxx' is // not a RecordId in form of string. Format must be: // <cluster-id>:<cluster-position> return null; } } if (!rid.isValid()) return null; final ODocument doc = rid.getRecord(); if (doc == null) return null; return new OrientVertex(this, doc); }
public Vertex addVertex(final Object id, final Object... properties) { if (id == null) throw ExceptionFactory.vertexIdCanNotBeNull(); if (retrieveFromCache(id) != null) throw ExceptionFactory.vertexWithIdAlreadyExists(id); nextElement(); Vertex v = baseGraph.addVertex(id); if (vertexIdKey != null) { v.setProperty(vertexIdKey, id); } cache.set(v, id); final BatchVertex newVertex = new BatchVertex(id); setProperties(newVertex, properties); return newVertex; }
@Override public Vertex getVertex(Object id) { if (id == null) { throw ExceptionFactory.vertexIdCanNotBeNull();
@Override public Vertex getVertex(Object id) { if (id == null) { throw ExceptionFactory.vertexIdCanNotBeNull();
throw ExceptionFactory.vertexIdCanNotBeNull();