Examples of purgeAll()


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

   */
  private void cleanupStoredIndex() {
    FullTextSession fullTextSession = node.openFullTextSession();
    try {
      Transaction transaction = fullTextSession.beginTransaction();
      fullTextSession.purgeAll( SimpleEmail.class );
      transaction.commit();
    }
    finally {
      fullTextSession.close();
    }
View Full Code Here

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

      Transaction tx = s.beginTransaction();
      s.createSQLQuery( "delete from book_author where book_id < :id" ).setParameter( "id", initialOffset ).executeUpdate();
      s.createSQLQuery( "delete from book where id < :id" ).setParameter( "id", initialOffset ).executeUpdate();
      s.createSQLQuery( "delete from author where id < :id" ).setParameter( "id", initialOffset ).executeUpdate();

      s.purgeAll( Book.class );
      s.flush();
      s.flushToIndexes();
      tx.commit();
    }
    finally {
View Full Code Here

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

  private void purgeAll() {
    FullTextSession fullTextSession = builder.openFullTextSession();
    try {
      Transaction tx = fullTextSession.beginTransaction();
      fullTextSession.purgeAll( Object.class );
      tx.commit();
    }
    finally {
      fullTextSession.close();
    }
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

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

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

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

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

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

    assertNumberOfAnimals( s, 5 );
    tx.commit();

    tx = s.beginTransaction();
    try {
      s.purgeAll( String.class );
      tx.commit();
      fail();
    }
    catch (IllegalArgumentException iae) {
      log.debug( "Success" );
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()

    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
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.