Tabnine Logo
ArangoCursor.hasNext
Code IndexAdd Tabnine to your IDE (free)

How to use
hasNext
method
in
com.arangodb.ArangoCursor

Best Java code snippets using com.arangodb.ArangoCursor.hasNext (Showing top 13 results out of 315)

origin: brianfrankcooper/YCSB

while (cursor.hasNext()) {
 VPackSlice aDocument = cursor.next();
 HashMap<String, ByteIterator> aMap = new HashMap<String, ByteIterator>(aDocument.size());
origin: ArangoDB-Community/arangodb-tinkerpop-provider

@Override
public boolean hasNext() {
  return delegate.hasNext();
}
origin: ArangoDB-Community/arangodb-tinkerpop-provider

@Override
public boolean hasNext() {
  return delegate.hasNext();
}
origin: arangodb/spring-data

  private Object getNext(final ArangoCursor<?> cursor) {
    return cursor.hasNext() ? cursor.next() : null;
  }
}
origin: com.arangodb/arangodb-spring-data

  private Object getNext(final ArangoCursor<?> cursor) {
    return cursor.hasNext() ? cursor.next() : null;
  }
}
origin: com.arangodb/arangodb-spring-data

/**
 * Finds one document which matches the given example object
 *
 * @param example
 *            example object to construct query with
 * @param <S>
 * @return An object representing the example if it exists, else null
 */
@Override
public <S extends T> Optional<S> findOne(final Example<S> example) {
  final ArangoCursor cursor = findAllInternal((Pageable) null, example, new HashMap());
  return cursor.hasNext() ? Optional.ofNullable((S) cursor.next()) : Optional.empty();
}
origin: arangodb/spring-data

/**
 * Finds one document which matches the given example object
 *
 * @param example
 *            example object to construct query with
 * @param <S>
 * @return An object representing the example if it exists, else null
 */
@Override
public <S extends T> Optional<S> findOne(final Example<S> example) {
  final ArangoCursor cursor = findAllInternal((Pageable) null, example, new HashMap());
  return cursor.hasNext() ? Optional.ofNullable((S) cursor.next()) : Optional.empty();
}
origin: ArangoDB-Community/arangodb-tinkerpop-provider

@Override
public Variables variables() {
  ArangoCursor<ArangoDBGraphVariables> iter = client.getGraphVariables(this.name, variables_id);
  if (iter.hasNext()) {
    ArangoDBGraphVariables v = iter.next();
    v.graph(this);
    return v;
  }
  else {
    throw new ArangoDBGraphException("Existing graph does not have a Variables collection");
  }
}
origin: ArangoDB-Community/arangodb-tinkerpop-provider

ArangoDBUtil.checkGraphForErrors(vertexCollections, edgeCollections, relations, graph, options);
ArangoCursor<String> iter = client.getGraphVariablesId(this.name);
if (iter.hasNext()) {
  this.variables_id = iter.next();
origin: com.arangodb/arangodb-spring-data

private Object convertResult(final ArangoCursor<?> result, final ArangoParameterAccessor accessor) {
  if (isExistsQuery()) {
    if (!result.hasNext()) {
      return false;
    }
    return (Integer) result.next() > 0;
  }
  final ArangoResultConverter resultConverter = new ArangoResultConverter(accessor, result, operations,
      domainClass);
  return resultConverter.convertResult(method.getReturnType().getType());
}
origin: arangodb/spring-data

private Object convertResult(final ArangoCursor<?> result, final ArangoParameterAccessor accessor) {
  if (isExistsQuery()) {
    if (!result.hasNext()) {
      return false;
    }
    return (Integer) result.next() > 0;
  }
  final ArangoResultConverter resultConverter = new ArangoResultConverter(accessor, result, operations,
      domainClass);
  return resultConverter.convertResult(method.getReturnType().getType());
}
origin: arangodb/spring-data

/**
 * Build a GeoResult from the given ArangoCursor
 *
 * @param cursor
 *            query result from driver
 * @return GeoResult object
 */
private GeoResult<?> buildGeoResult(final ArangoCursor<?> cursor) {
  GeoResult<?> geoResult = null;
  while (cursor.hasNext() && geoResult == null) {
    final Object object = cursor.next();
    if (!(object instanceof VPackSlice)) {
      continue;
    }
    final VPackSlice slice = (VPackSlice) object;
    final VPackSlice distSlice = slice.get("_distance");
    final Double distanceInMeters = distSlice.isDouble() ? distSlice.getAsDouble() : null;
    if (distanceInMeters == null) {
      continue;
    }
    final Object entity = operations.getConverter().read(domainClass, slice);
    final Distance distance = new Distance(distanceInMeters / 1000, Metrics.KILOMETERS);
    geoResult = new GeoResult<>(entity, distance);
  }
  return geoResult;
}
origin: com.arangodb/arangodb-spring-data

/**
 * Build a GeoResult from the given ArangoCursor
 *
 * @param cursor
 *            query result from driver
 * @return GeoResult object
 */
private GeoResult<?> buildGeoResult(final ArangoCursor<?> cursor) {
  GeoResult<?> geoResult = null;
  while (cursor.hasNext() && geoResult == null) {
    final Object object = cursor.next();
    if (!(object instanceof VPackSlice)) {
      continue;
    }
    final VPackSlice slice = (VPackSlice) object;
    final VPackSlice distSlice = slice.get("_distance");
    final Double distanceInMeters = distSlice.isDouble() ? distSlice.getAsDouble() : null;
    if (distanceInMeters == null) {
      continue;
    }
    final Object entity = operations.getConverter().read(domainClass, slice);
    final Distance distance = new Distance(distanceInMeters / 1000, Metrics.KILOMETERS);
    geoResult = new GeoResult<>(entity, distance);
  }
  return geoResult;
}
com.arangodbArangoCursorhasNext

Popular methods of ArangoCursor

  • next
  • asListRemaining
  • close
  • first
  • forEachRemaining
  • getId
  • getStats
  • getType
  • getWarnings
  • spliterator

Popular in Java

  • Reading from database using SQL prepared statement
  • putExtra (Intent)
  • getApplicationContext (Context)
  • onRequestPermissionsResult (Fragment)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Permission (java.security)
    Legacy security code; do not use.
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now