code: public static Integer booleanToInteger(Boolean value) {
      return value.booleanValue() ? Integer.valueOf(1) : Integer.valueOf(0);
    }
docs: Converts Boolean to Integer. If boolean value is TRUE, then return 1, else
  return 0.
  
  @param value
  The Boolean to be converted.
  @return The converted Integer value.