
package de.ivu.elect.business.pruefung.control;

import java.io.Serializable;

import javax.inject.Inject;

import de.ivu.elect.jee.faces.Messages;

public abstract class AbstractZulassungPruefSchritt implements Serializable {

  private static final long serialVersionUID = 1L;

  @Inject
  private transient Messages messages;

  public AbstractZulassungPruefSchritt() {
    super();
  }

  protected String getMessage(String key, Object... params) {
    return messages.getMessageForMessageKey(key, params);
  }

  protected static long fixNullToZero(Long value) {
    if (value != null) {
      return value;
    }

    return 0;
  }
}
