Examples of purgeAll()


Examples of org.hibernate.search.FullTextSession.purgeAll()

    assertThat( numDocs ).isGreaterThan( 0 );
  }

  private void purgeAll(Class<?> entityType) {
    FullTextSession session = Search.getFullTextSession( openSession() );
    session.purgeAll( entityType );
    session.flushToIndexes();
    int numDocs = session.getSearchFactory().getIndexReaderAccessor().open( entityType ).numDocs();
    session.close();
    assertThat( numDocs ).isEqualTo( 0 );
  }
View Full Code Here

Examples of org.hibernate.search.FullTextSession.purgeAll()

    }
  }

  private void purge() {
    FullTextSession ftSession = org.hibernate.search.Search.getFullTextSession( ( Session ) em.getDelegate() );
    ftSession.purgeAll( Book.class );
    ftSession.flushToIndexes();
  }

  private List<Book> search(String searchQuery) throws ParseException {
    Query query = searchQuery( searchQuery );
View Full Code Here

Examples of org.hibernate.search.FullTextSession.purgeAll()

    SessionFactory factory = getSessionFactory();
    Session session = factory.openSession();
    FullTextSession fullTextSession = Search.getFullTextSession( session );
    fullTextSession.beginTransaction();
    fullTextSession.purgeAll( clazz );
    fullTextSession.getTransaction().commit();
    session.close();
  }

  private Class<?> getEntityClass(String entity) {
View Full Code Here

Examples of org.hibernate.search.FullTextSession.purgeAll()

    SessionFactory factory = getSessionFactory();
    Session session = factory.openSession();
    FullTextSession fullTextSession = Search.getFullTextSession( session );
    fullTextSession.beginTransaction();
    fullTextSession.purgeAll( clazz );
    fullTextSession.getTransaction().commit();
    session.close();
  }

  private Class<?> getEntityClass(String entity) {
View Full Code Here

Examples of org.hibernate.search.FullTextSession.purgeAll()

    ftSession.flushToIndexes();
    }

    private void purge() {
        FullTextSession ftSession = org.hibernate.search.Search.getFullTextSession((Session) em.getDelegate());
        ftSession.purgeAll(Book.class);
    }

    private List<Book> search(String searchQuery) throws ParseException {
        Query query = searchQuery(searchQuery);
View Full Code Here

Examples of org.hibernate.search.FullTextSession.purgeAll()

    SessionFactory factory = getSessionFactory();
    Session session = factory.openSession();
    FullTextSession fullTextSession = Search.getFullTextSession( session );
    fullTextSession.beginTransaction();
    fullTextSession.purgeAll( clazz );
    fullTextSession.getTransaction().commit();
    session.close();
  }

  private Class<?> getEntityClass(String entity) {
View Full Code Here

Examples of org.hibernate.search.FullTextSession.purgeAll()

    }
  }

  private void purge() {
    FullTextSession ftSession = org.hibernate.search.Search.getFullTextSession( (Session) em.getDelegate() );
    ftSession.purgeAll( Book.class );
    ftSession.flushToIndexes();
    ftSession.close();
    emf.close();
  }
View Full Code Here

Examples of org.hibernate.search.FullTextSession.purgeAll()

    SessionFactory factory = getSessionFactory();
    Session session = factory.openSession();
    FullTextSession fullTextSession = Search.getFullTextSession( session );
    fullTextSession.beginTransaction();
    fullTextSession.purgeAll( clazz );
    fullTextSession.getTransaction().commit();
    session.close();
  }

  private Class<?> getEntityClass(String entity) {
View Full Code Here

Examples of org.hibernate.search.FullTextSession.purgeAll()

    Transaction tx = s.beginTransaction();
    assertNumberOfAnimals( s, 5 );
    tx.commit();

    tx = s.beginTransaction();
    s.purgeAll( Serializable.class );
    tx.commit();

    tx = s.beginTransaction();
    assertNumberOfAnimals( s, 3 );
    tx.commit();
View Full Code Here

Examples of org.hibernate.search.FullTextSession.purgeAll()

    tx = s.beginTransaction();
    assertNumberOfAnimals( s, 3 );
    tx.commit();

    tx = s.beginTransaction();
    s.purgeAll( Bird.class );
    tx.commit();

    tx = s.beginTransaction();
    assertNumberOfAnimals( s, 1 );
    tx.commit();
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.