Package org.springframework.data.elasticsearch.entities

Examples of org.springframework.data.elasticsearch.entities.Book


  @Test
  public void shouldIndexInnerObject() {
    // given
    String id = randomAlphanumeric(5);
    Book book = new Book();
    book.setId(id);
    book.setName("xyz");
    Author author = new Author();
    author.setId("1");
    author.setName("ABC");
    book.setAuthor(author);
    // when
    bookRepository.save(book);
    // then
    assertThat(bookRepository.findOne(id), is(notNullValue()));
  }
View Full Code Here

TOP

Related Classes of org.springframework.data.elasticsearch.entities.Book

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.