Examples of DateMidnight


Examples of org.joda.time.DateMidnight

    if (applyTimeZoneDifference)
    {
      TimeZone zone = getClientTimeZone();
      // instantiate now/ current time
      MutableDateTime dt = new MutableDateTime(new DateMidnight());
      if (zone != null)
      {
        // set time zone for client
        format = format.withZone(DateTimeZone.forTimeZone(zone));
        dt.setZone(DateTimeZone.forTimeZone(zone));
View Full Code Here

Examples of org.joda.time.DateMidnight

    if (applyTimeZoneDifference)
    {
      TimeZone zone = getClientTimeZone();
      // instantiate now/ current time
      MutableDateTime dt = new MutableDateTime(new DateMidnight());
      if (zone != null)
      {
        // set time zone for client
        format = format.withZone(DateTimeZone.forTimeZone(zone));
        dt.setZone(DateTimeZone.forTimeZone(zone));
View Full Code Here

Examples of org.joda.time.DateMidnight

  @Resource
  private BookDao dao;

  @Test
  public void testDao() {
    final Book book = new Book("ArbitraryResultTypeTest", new DateMidnight());
    dao.create(book);
    final List<String> titles = dao.findTitles();
    Assert.assertEquals(titles, Arrays.asList(book.getTitle()));
  }
View Full Code Here

Examples of org.joda.time.DateMidnight

    Assert.assertEquals(titles, Arrays.asList(book.getTitle()));
  }

  @Test
  public void testSqlQuery() {
    final DateMidnight date = new DateMidnight();
    final Book book = new Book("sql query", date);
    dao.create(book);
    final List<Object[]> list = dao.getBookByTitle("sql query");
    Assert.assertTrue(list.size() == 1);
    Assert.assertEquals(list.get(0), new Object[] { BigInteger.valueOf(book.getPrimaryKey()), new Timestamp(date.getMillis()), book.getTitle() });
  }
View Full Code Here

Examples of org.joda.time.DateMidnight

    Assert.assertEquals(list.get(0), new Object[] { BigInteger.valueOf(book.getPrimaryKey()), new Timestamp(date.getMillis()), book.getTitle() });
  }

  @Test
  public void testSqlNamedQuery() {
    final DateMidnight date = new DateMidnight();
    final Book book = new Book("sql named query", date);
    dao.create(book);
    final BigInteger count = dao.countBooks();
    Assert.assertEquals(count, BigInteger.valueOf(1));
  }
View Full Code Here

Examples of org.joda.time.DateMidnight

    return title;
  }

  @NotNull
  public DateMidnight getPublishDate() {
    return new DateMidnight(publishDate);
  }
View Full Code Here

Examples of org.joda.time.DateMidnight

  @Resource
  private BookDao dao;

  @Test
  public void testDao() {
    final Book book = new Book("ArbitraryResultTypeTest", new DateMidnight());
    dao.create(book);
    final List<String> titles = dao.findTitles();
    Assert.assertEquals(titles, Arrays.asList(book.getTitle()));
  }
View Full Code Here

Examples of org.joda.time.DateMidnight

    Assert.assertEquals(titles, Arrays.asList(book.getTitle()));
  }

  @Test
  public void testSqlQuery() {
    final DateMidnight date = new DateMidnight();
    final Book book = new Book("sql query", date);
    dao.create(book);
    final List<Object[]> list = dao.getBookByTitle("sql query");
    Assert.assertTrue(list.size() == 1);
    Assert.assertEquals(list.get(0), new Object[] { BigInteger.valueOf(book.getPrimaryKey()), new Timestamp(date.getMillis()), book.getTitle() });
  }
View Full Code Here

Examples of org.joda.time.DateMidnight

    Assert.assertEquals(list.get(0), new Object[] { BigInteger.valueOf(book.getPrimaryKey()), new Timestamp(date.getMillis()), book.getTitle() });
  }

  @Test
  public void testSqlNamedQuery() {
    final DateMidnight date = new DateMidnight();
    final Book book = new Book("sql named query", date);
    dao.create(book);
    final BigInteger count = dao.countBooks();
    Assert.assertEquals(count, BigInteger.valueOf(1));
  }
View Full Code Here

Examples of org.joda.time.DateMidnight

public class ExplicitEntityTest extends AbstractTransactionalTestNGSpringContextTests {

  @SuppressWarnings({ "unchecked" })
  @Test
  public void testDao() {
    final Book book = new Book("ExplicitEntityTest", new DateMidnight());
    final NoEntityDao dao = applicationContext.getBean("dao", NoEntityDao.class);
    dao.create(book);
  }
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.