Package model

Examples of model.Fortune


  private List<Fortune> data;

  @PostConstruct
  private void postConstruct() {
    data = em.createNamedQuery("allFortunes", Fortune.class).getResultList();
    data.add(new Fortune(ADDITIONAL_FORTUNE_ID, ADDITIONAL_FORTUNE_CONTENT));
    Collections.sort(data);
  }
View Full Code Here


    FortuneDao fortuneDao;

    @UnitOfWork
    public Result index() {
        List<Fortune> fortunes = fortuneDao.getAll();
        fortunes.add(new Fortune(0, "Additional fortune added at request time."));
        Collections.sort(fortunes);

        return Results.html().render("fortunes", fortunes);
    }
View Full Code Here

    @Transactional
    public void generateFortunesForTest() {

        {

            Fortune fortune = new Fortune();
            // dummy message => just to make sure utf-8 works.
            fortune.message = "レームワークのベンチマーク";
            entitiyManagerProvider.get().persist(fortune);

        }

        {

            Fortune fortune = new Fortune();
            // dummy message => just to make sure utf-8 works.
            fortune.message = "<script>I want to be escaped</script>";
            entitiyManagerProvider.get().persist(fortune);

        }
View Full Code Here

TOP

Related Classes of model.Fortune

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.