本文整理汇总了Java中net.sourceforge.stripes.controller.LifecycleStage.EventHandling方法的典型用法代码示例。如果您正苦于以下问题:Java LifecycleStage.EventHandling方法的具体用法?Java LifecycleStage.EventHandling怎么用?Java LifecycleStage.EventHandling使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sourceforge.stripes.controller.LifecycleStage
的用法示例。
在下文中一共展示了LifecycleStage.EventHandling方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: list
import net.sourceforge.stripes.controller.LifecycleStage; //导入方法依赖的package包/类
@Before(stages = LifecycleStage.EventHandling)
public void list(){
if (this.getVanencompetition()!=null){
this.poules = Stripersist.getEntityManager().createQuery("FROM Poule where vanencompetition = :v").setParameter("v",this.getVanencompetition()).getResultList();
if (this.type!=null || (this.poule!=null && this.poule.getType()!=null)){
CompetitionType ct =null;
if (this.type!=null){
ct= CompetitionType.valueOf(this.type);
}else{
ct = this.poule.getType();
}
this.participantsWithoutPoule = Stripersist.getEntityManager()
.createQuery("FROM Participant where poule is null and vanencompetition = :v and type = :t order by karateka.belt,karateka.birthdate")
.setParameter("v", this.getVanencompetition()).setParameter("t", ct).getResultList();
}else{
this.participantsWithoutPoule = Stripersist.getEntityManager()
.createQuery("FROM Participant where poule is null and vanencompetition = :v order by karateka.belt,karateka.birthdate")
.setParameter("v", this.getVanencompetition()).getResultList();
}
}
}
示例2: getNextRunFromGameEngine
import net.sourceforge.stripes.controller.LifecycleStage; //导入方法依赖的package包/类
@Before(stages = { LifecycleStage.EventHandling })
public void getNextRunFromGameEngine() {
Date nextRunDate = GameScheduler.INSTANCE.getNextRun();
DateFormat dateTimeDf = DateFormat.getDateTimeInstance();
setNextRun(dateTimeDf.format(nextRunDate));
WinnerResult result = WinnerHistoryCalculation.INSTANCE.calc();
threeDayWinner = result.getThreeDayWinner();
threeDayWinnerTimeRange = result.getThreeDayWinnerTimeRange().toString();
lastWinner = result.getLastWinner();
}
示例3: addEventMessage
import net.sourceforge.stripes.controller.LifecycleStage; //导入方法依赖的package包/类
/**
* Add a message in event handling stage.
*/
@Before(stages=LifecycleStage.EventHandling)
public void addEventMessage() {
context.getMessages().add(new SimpleMessage("EventHandling"));
context.getMessages("EventHandling").add(new SimpleMessage("EventHandling.EventHandling"));
}
示例4: startup
import net.sourceforge.stripes.controller.LifecycleStage; //导入方法依赖的package包/类
@Before(stages=LifecycleStage.EventHandling)
public void startup() {
if (result == null) result = 0;
}