Package org.hibernate.search.test.query

Examples of org.hibernate.search.test.query.ProjectionToMapResultTransformer


    FullTextQuery fullTextQuery = fullTextSession.createFullTextQuery( query, Value.class );
    fullTextQuery.setProjection(
        "id",
        "value"
    );
    fullTextQuery.setResultTransformer( new ProjectionToMapResultTransformer() );
    List mappedResults = fullTextQuery.list();
    assertTrue( "Wrong result size", mappedResults.size() == 1 );

    Map map = (Map) mappedResults.get( 0 );
    Integer id = (Integer) map.get( "id" );
View Full Code Here


    FullTextQuery fullTextQuery = fullTextSession.createFullTextQuery( query, Value.class );
    fullTextQuery.setProjection(
        FullTextQuery.DOCUMENT
    );
    fullTextQuery.setResultTransformer( new ProjectionToMapResultTransformer() );
    List mappedResults = fullTextQuery.list();
    assertTrue( "Wrong result size", mappedResults.size() == 1 );

    Map map = (Map) mappedResults.get( 0 );
    Document document = (Document) map.get( FullTextQuery.DOCUMENT );
View Full Code Here

    fullTextQuery.setProjection(
        "id",
        "value",
        FullTextQuery.DOCUMENT
    );
    fullTextQuery.setResultTransformer( new ProjectionToMapResultTransformer() );
    List mappedResults = fullTextQuery.list();
    assertTrue( "Wrong result size", mappedResults.size() == 1 );

    Map map = (Map) mappedResults.get( 0 );
    Integer id = (Integer) map.get( "id" );
View Full Code Here

TOP

Related Classes of org.hibernate.search.test.query.ProjectionToMapResultTransformer

Copyright © 2018 www.massapicom. 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.