Examples of range()


Examples of org.hibernate.search.query.dsl.QueryBuilder.range()

    Transaction transaction = fullTextSession.beginTransaction();
    final QueryBuilder monthQb = fullTextSession.getSearchFactory()
        .buildQueryBuilder().forEntity( Month.class ).get();

    //inclusive
    Query query = monthQb
        .range()
          .onField( "raindropInMm" )
          .below( 0.435d )
          .createQuery();
View Full Code Here

Examples of org.hibernate.search.query.dsl.QueryBuilder.range()

    List<?> results = fullTextSession.createFullTextQuery( query, Month.class ).list();
    assertThat( results ).onProperty( "name" ).containsOnly( "January", "February", "March" );

    //exclusive
    query = monthQb
        .range()
          .onField( "raindropInMm" )
          .below( 0.435d )
          .excludeLimit()
          .createQuery();
View Full Code Here

Examples of org.hibernate.search.query.dsl.QueryBuilder.range()

        double radius = 25.0d;
        Rectangle boundingBox = Rectangle.fromBoundingCircle( center, radius );

        query = queryBuilder.bool()
            .must(
                queryBuilder.range()
                    .onField( "latitude" )
                    .from( boundingBox.getLowerLeft().getLatitude() )
                    .to( boundingBox.getUpperRight().getLatitude() )
                    .createQuery()
            )
View Full Code Here

Examples of org.internna.iwebmvc.metadata.ui.EntityFilter.range()

    private static EntityFilterImpl createEntityFilter(Field field) throws NoSuchMethodException, IllegalArgumentException, IllegalAccessException, IllegalAccessException, InvocationTargetException {
        EntityFilterImpl filter = new EntityFilterImpl();
        filter.setEmbeddedClass(field.getDeclaringClass());
        filter.setPath(field.getName());
        EntityFilter entityFilter = field.getAnnotation(EntityFilter.class);
        filter.setRange(entityFilter.range());
        filter.setType(entityFilter.type());
        if (EntityFilter.WIDGET_TYPE.EMBEDDED.equals(filter.getType())) filter.setSubfilters(getSubFilters(field));
        filter.setHelp(entityFilter.help());
        String[] values = entityFilter.values();
        if ((values != null) && (values.length > 0)) filter.setValues(Arrays.asList(values));
View Full Code Here

Examples of org.jclouds.aws.s3.commands.options.GetObjectOptions.range()

    private S3Object getS3Object( CloudStoreObject object )
    {
  try
  {
      GetObjectOptions opts = new GetObjectOptions( );
      opts.range( 0, 0 );
      return _connection.getObject( _bucket, object.getPath( )
        .getAbsolutePath( ) ).get( );
  }
  catch ( Exception e )
  {
View Full Code Here

Examples of org.jclouds.blobstore.options.GetOptions.range()

        } finally {
            Closeables.closeQuietly(payload);
        }

        GetOptions getOptionsFragment = new GetOptions();
        getOptionsFragment.range(4, 6);
        Blob blobFragment = blobStore.getBlob(CONTAINER_NAME, blob.getMetadata().getName(), getOptionsFragment);
        payload = blobFragment.getPayload();
        try {
            assertEquals(input.substring(4, 7), Strings2.toString(payload));
        } finally {
View Full Code Here

Examples of org.jclouds.blobstore.options.GetOptions.range()

        } finally {
            Closeables2.closeQuietly(payload);
        }

        GetOptions getOptionsFragment = new GetOptions();
        getOptionsFragment.range(4, 6);
        Blob blobFragment = blobStore.getBlob(CONTAINER_NAME, blob.getMetadata().getName(), getOptionsFragment);
        payload = blobFragment.getPayload();
        try {
            assertEquals(input.substring(4, 7), Strings2.toString(payload));
        } finally {
View Full Code Here

Examples of org.jclouds.blobstore.options.GetOptions.range()

        } finally {
            Closeables.closeQuietly(payload);
        }

        GetOptions getOptionsFragment = new GetOptions();
        getOptionsFragment.range(4, 6);
        Blob blobFragment = blobStore.getBlob(CONTAINER_NAME, blob.getMetadata().getName(), getOptionsFragment);
        payload = blobFragment.getPayload();
        try {
            assertEquals(input.substring(4, 7), Strings2.toString(payload));
        } finally {
View Full Code Here

Examples of org.jclouds.blobstore.options.GetOptions.range()

        } finally {
            Closeables.closeQuietly(payload);
        }

        GetOptions getOptionsFragment = new GetOptions();
        getOptionsFragment.range(4, 6);
        Blob blobFragment = blobStore.getBlob(CONTAINER_NAME, blob.getMetadata().getName(), getOptionsFragment);
        payload = blobFragment.getPayload();
        try {
            assertEquals(input.substring(4, 7), Strings2.toString(payload));
        } finally {
View Full Code Here

Examples of org.jclouds.http.options.GetOptions.range()

      org.jclouds.blobstore.options.GetOptions in = new org.jclouds.blobstore.options.GetOptions();
      in.range(0,1024);
      in.startAt(2048);
     
      GetOptions expected = new GetOptions();
      expected.range(0,1024);
      expected.startAt(2048);

      assertEquals(fn.apply(in), expected);

   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.