Package org.springframework.data.jpa.domain.sample

Examples of org.springframework.data.jpa.domain.sample.MailMessage


   * @see DATAJPA-12
   */
  @Test
  public void shouldSortMailWithPageRequestAndJpaSortCriteriaNullsFirst() {

    MailMessage message1 = new MailMessage();
    message1.setContent("abc");
    MailSender sender1 = new MailSender("foo");
    message1.setMailSender(sender1);

    MailMessage message2 = new MailMessage();
    message2.setContent("abc");

    mailMessageRepository.save(message1);
    mailMessageRepository.save(message2);

    Page<MailMessage> results = mailMessageRepository.findAll(new PageRequest(0, 20, //
View Full Code Here


   * @see DATAJPA-12
   */
  @Test
  public void shouldSortMailWithQueryDslRepositoryAndDslSortCriteriaNullsFirst() {

    MailMessage message1 = new MailMessage();
    message1.setContent("abc");
    MailSender sender1 = new MailSender("foo");
    message1.setMailSender(sender1);

    MailMessage message2 = new MailMessage();
    message2.setContent("abc");

    mailMessageRepository.save(message1);
    mailMessageRepository.save(message2);

    List<MailMessage> messages = mailMessageRepository
View Full Code Here

  public void shouldSortMailWithNestedQueryDslSortCriteriaNullsFirst() {

    MailUser fooMailUser = new MailUser("foo");
    em.persist(fooMailUser);

    MailMessage message1 = new MailMessage();
    message1.setContent("abc");
    MailSender sender1 = new MailSender("foo");
    sender1.setMailUser(fooMailUser);
    message1.setMailSender(sender1);

    MailMessage message2 = new MailMessage();
    message2.setContent("abc");

    mailMessageRepository.save(message1);
    mailMessageRepository.save(message2);

    List<MailMessage> messages = mailMessageRepository.findAll(message.content.eq("abc"),
View Full Code Here

  public void shouldSortMailWithNestedStringBasedSortCriteriaNullsFirst() {

    MailUser fooMailUser = new MailUser("foo");
    em.persist(fooMailUser);

    MailMessage message1 = new MailMessage();
    message1.setContent("abc");
    MailSender sender1 = new MailSender("foo");
    sender1.setMailUser(fooMailUser);
    message1.setMailSender(sender1);

    MailMessage message2 = new MailMessage();
    message2.setContent("abc");

    mailMessageRepository.save(message1);
    mailMessageRepository.save(message2);

    Page<MailMessage> page = mailMessageRepository.findAll(new PageRequest(0, 10, new Sort(Sort.Direction.ASC,
View Full Code Here

TOP

Related Classes of org.springframework.data.jpa.domain.sample.MailMessage

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.