use of com.querydsl.core.types.dsl.StringPath in project querydsl by querydsl.
the class TermElementTest method test.
@Test
public void test() {
StringPath title = Expressions.stringPath("title");
LuceneSerializer serializer = new LuceneSerializer(false, true);
QueryMetadata metadata = new DefaultQueryMetadata();
assertEquals("title:\"Hello World\"", serializer.toQuery(title.eq("Hello World"), metadata).toString());
assertEquals("title:Hello World", serializer.toQuery(title.eq(new TermElement("Hello World")), metadata).toString());
}
use of com.querydsl.core.types.dsl.StringPath in project querydsl by querydsl.
the class LuceneSerializerNotTokenizedTest method multiple_field_search_from_movies.
@Test
public void multiple_field_search_from_movies() throws Exception {
StringPath movie = Expressions.stringPath("movie");
testQuery(movie.in("Interview with the Vampire"), "movie:Interview with the Vampire", 1);
testQuery(movie.eq("Up in the Air"), "movie:Up in the Air", 1);
}
use of com.querydsl.core.types.dsl.StringPath in project querydsl by querydsl.
the class TermElementTest method test.
@Test
public void test() {
StringPath title = Expressions.stringPath("title");
LuceneSerializer serializer = new LuceneSerializer(false, true);
QueryMetadata metadata = new DefaultQueryMetadata();
assertEquals("title:\"Hello World\"", serializer.toQuery(title.eq("Hello World"), metadata).toString());
assertEquals("title:Hello World", serializer.toQuery(title.eq(new TermElement("Hello World")), metadata).toString());
}
use of com.querydsl.core.types.dsl.StringPath in project querydsl by querydsl.
the class LuceneSerializerNotTokenizedTest method multiple_field_search_from_movies.
@Test
public void multiple_field_search_from_movies() throws Exception {
StringPath movie = Expressions.stringPath("movie");
testQuery(movie.in("Interview with the Vampire"), "movie:Interview with the Vampire", 1);
testQuery(movie.eq("Up in the Air"), "movie:Up in the Air", 1);
}
use of com.querydsl.core.types.dsl.StringPath in project querydsl by querydsl.
the class PhraseElementTest method test.
@Test
public void test() {
StringPath title = Expressions.stringPath("title");
LuceneSerializer serializer = new LuceneSerializer(false, false);
QueryMetadata metadata = new DefaultQueryMetadata();
assertEquals("title:Hello World", serializer.toQuery(title.eq("Hello World"), metadata).toString());
assertEquals("title:\"Hello World\"", serializer.toQuery(title.eq(new PhraseElement("Hello World")), metadata).toString());
}
Aggregations