Package org.hibernate.search

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


    log( "starting clean up phase" );

    FullTextSession s = Search.getFullTextSession( sf.openSession() );
    try {
      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();
View Full Code Here


    FullTextSession s = Search.getFullTextSession( sf.openSession() );
    try {
      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();
View Full Code Here

    FullTextSession s = Search.getFullTextSession( sf.openSession() );
    try {
      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();
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.