Exemplo n.º 1
0
 public synchronized boolean reactiveSong() {
   if (playbillState.equals(PlaybillState.INACTIVE)) {
     playbillState = PlaybillState.ACTIVE;
     this.setUser(null);
     Logger.getLogger(Playbill.class.getName())
         .log(Level.INFO, "Reactive the Playbill: {0}", playbillId);
     return true;
   }
   return false;
 }
Exemplo n.º 2
0
  public synchronized boolean paySong(UserAction userAction, Playbill playbill) {

    if (playbillState.equals(PlaybillState.ACTIVE)) {
      if (playbill.getCurrentOrders() >= 4) {
        playbillState = PlaybillState.PAID;
        //                return true;
      }
      //                && userId != null
      //                && userId.equals(userAction.getUserId())) {

    }
    return true;
  }