@Functional
  public static TriState fromDbValue(int value) {
    switch (value) {
      case 1:
        return YES;
      case 2:
        return NO;
      case 3:
      default:
        return UNSET;
    }
  }
Returns the {@code Boolean} value that corresponds to this {@link TriState}, if appropriate.

@return {@link Boolean#TRUE} if {@code this} is {@link TriState#YES} or {@link Boolean#FALSE}
    if {@code this} is {@link TriState#NO} or {@code null} if {@code this} is {@link
    TriState#UNSET}.
fbcore/src/main/java/com/facebook/common/util/TriState.java