private void readFromParcel(Parcel in) {
   mBody = in.readString();
   mServiceCategory = in.readInt();
   mSeverity = Severity.values()[in.readInt()];
   mUrgency = Urgency.values()[in.readInt()];
   mCertainty = Certainty.values()[in.readInt()];
   mLanguageCode = in.readInt();
 }
Beispiel #2
0
  /**
   * @param n
   * @return
   */
  public static Severity getByNumber(int n) {

    Severity result = null;

    for (Severity e : Severity.values()) {

      if (e.getSeverityNumber() == n) {
        result = e;
        break;
      }
    }

    return result;
  }
Beispiel #3
0
  /**
   * @param n
   * @return
   */
  public static Severity getByName(String name) {

    Severity result = null;

    if (name == null) {
      return result;
    }

    for (Severity e : Severity.values()) {

      if (e.getName().compareToIgnoreCase(name) == 0) {
        result = e;
        break;
      }
    }

    return result;
  }