@Override public boolean isIdProperty() { return isIdProperty.get(); }
@Override public void close() { stream.close(); } };
@Override public boolean hasNext() { return stream.hasNext(); }
private boolean isGeoNearQuery(Method method) { Class<?> returnType = method.getReturnType(); for (Class<?> type : GEO_NEAR_RESULTS) { if (type.isAssignableFrom(returnType)) { return true; } } if (Iterable.class.isAssignableFrom(returnType)) { TypeInformation<?> from = ClassTypeInformation.fromReturnTypeOf(method); return GeoResult.class.equals(from.getRequiredComponentType().getType()); } return false; }
private static boolean isListOfGeoResult(TypeInformation<?> returnType) { if (!returnType.getType().equals(List.class)) { return false; } TypeInformation<?> componentType = returnType.getComponentType(); return componentType != null && GeoResult.class.equals(componentType.getType()); } }
/** * Returns whether the given type is managed by one of the underlying {@link Metamodel} instances. * * @param type must not be {@literal null}. * @return */ public boolean isMetamodelManagedType(TypeInformation<?> type) { return isMetamodelManagedType(type.getType()); }
/** * Find and create {@link IndexDefinition}s for properties of given {@link TypeInformation}. {@link IndexDefinition}s * are created for properties and types with {@link Indexed}, {@link CompoundIndexes} or {@link GeoSpatialIndexed}. * * @param entityType * @return Empty {@link Iterable} in case no {@link IndexDefinition} could be resolved for type. * @see 2.2 */ default Iterable<? extends IndexDefinition> resolveIndexFor(Class<?> entityType) { return resolveIndexFor(ClassTypeInformation.from(entityType)); }
TypeInformation<?> getReturnType() { return ClassTypeInformation.fromReturnTypeOf(method); }
@Override public Stream<T> stream() { return StreamUtils.createStreamFromIterator(doStream()); }
/** * Require a specific Redis version. * * @param version must not be {@literal null} or empty. * @return */ public RequiresRedisServer atLeast(String version) { Assert.hasText(version, "Version must not be empty!"); return new RequiresRedisServer(host, port, Version.parse(version)); }
/** * @return {@literal true} if no arguments set. */ boolean isEmpty() { return !Optionals.isAnyPresent(getValidator(), getValidationAction(), getValidationLevel()); } }
/** * Create a {@link CassandraKeyspace} test rule to provide a running Cassandra instance on {@code localhost:9042} with * a keyspace {@code example}. Reuses a running Cassandra instance if available or starts an embedded instance. * * @return the {@link CassandraKeyspace} rule. */ public static CassandraKeyspace onLocalhost() { return new CassandraKeyspace("localhost", ProtocolOptions.DEFAULT_PORT, "example", Cassandra.embeddedIfNotRunning("localhost", ProtocolOptions.DEFAULT_PORT), new Version(0, 0, 0)); }
@Override public K next() { return stream.next(); }
private boolean isGeoNearQuery(Method method) { if (ReactiveWrappers.supports(method.getReturnType())) { TypeInformation<?> from = ClassTypeInformation.fromReturnTypeOf(method); return GeoResult.class.equals(from.getRequiredComponentType().getType()); } return false; }
@Override public Class<?> getActualType() { return associationTargetType != null ? associationTargetType.getType() : super.getActualType(); }
public <S extends Object> S read(Class<S> clazz, final Bson bson) { return read(ClassTypeInformation.from(clazz), bson); }
@Override public boolean isAssociation() { return isAssociation.get(); }
@Override public boolean isEntity() { return isEntity.get(); }