Package org.hibernate.search.jpa

Examples of org.hibernate.search.jpa.FullTextEntityManager.createQuery()


    }
    em.getTransaction().commit();
    em.clear();

    em.getTransaction().begin();
    assertEquals( 1000, em.createQuery( "delete from " + Clock.class.getName() ).executeUpdate() );
    em.getTransaction().commit();

    em.close();

  }
View Full Code Here


    em.getTransaction().commit();

    em.clear();

    em.getTransaction().begin();
    assertEquals( 1000, em.createQuery( "delete from " + Clock.class.getName() ).executeUpdate() );
    em.getTransaction().commit();

    em.close();
  }
View Full Code Here

    Assert.assertEquals( (Double) thirdResult[1], 11.1195, 0.0001 );
    Assert.assertEquals( (Double) fourthResult[1], 15.0636, 0.0001 );
    Assert.assertEquals( (Double) fifthResult[1], 22.239, 0.001 );
    Assert.assertEquals( (Double) sixthResult[1], 24.446, 0.001 );

    List<?> pois = em.createQuery( "from " + POI.class.getName() ).getResultList();
    for ( Object entity : pois ) {
      em.remove( entity );
    }
    em.getTransaction().commit();
    em.close();
View Full Code Here

    Assert.assertEquals( (Double) thirdResult[1], 11.1195, 0.0001 );
    Assert.assertEquals( (Double) fourthResult[1], 15.0636, 0.0001 );
    Assert.assertEquals( (Double) fifthResult[1], 22.239, 0.001 );
    Assert.assertEquals( (Double) sixthResult[1], 24.446, 0.001 );

    List<?> pois = em.createQuery( "from " + POI.class.getName() ).getResultList();
    for ( Object entity : pois ) {
      em.remove( entity );
    }
    em.getTransaction().commit();
    em.close();
View Full Code Here

          + centerLatitude + ", " + centerLongitude;

      Assert.assertThat( message, ( (Double) result[1] ).doubleValue(), is( not( 0.0 ) ) );
    }

    List<?> pois = em.createQuery( "from " + POI.class.getName() ).getResultList();
    for ( Object entity : pois ) {
      em.remove( entity );
    }
    em.getTransaction().commit();
    em.close();
View Full Code Here

    Object[] thirdResult = (Object[]) results.get( 2 );
    Assert.assertEquals( (Double) firstResult[1], 0.0, 0.0001 );
    Assert.assertEquals( (Double) secondResult[1], 10.1582, 0.0001 );
    Assert.assertEquals( (Double) thirdResult[1], 11.1195, 0.0001 );

    List<?> pois = em.createQuery( "from " + POI.class.getName() ).getResultList();
    for ( Object entity : pois ) {
      em.remove( entity );
    }
    em.getTransaction().commit();
    em.close();
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.