@Override
  public int hashCode() {
    int result = name != null ? name.hashCode() : 0;
    result = 31 * result + (displayName != null ? displayName.hashCode() : 0);
    result = 31 * result + (category != null ? category.hashCode() : 0);
    result = 31 * result + (deleted ? 1 : 0);
    result = 31 * result + (cardinality != null ? cardinality.hashCode() : 0);
    result = 31 * result + (decommissionAllowed != null ? decommissionAllowed.hashCode() : 0);
    result = 31 * result + (unlimitedKeyJCERequired != null ? unlimitedKeyJCERequired.hashCode() : 0);
    result = 31 * result + (reassignAllowed != null ? reassignAllowed.hashCode() : 0);
    result = 31 * result + (commandScript != null ? commandScript.hashCode() : 0);
    result = 31 * result + (logs != null ? logs.hashCode() : 0);
    result = 31 * result + (clientConfigFiles != null ? clientConfigFiles.hashCode() : 0);
    result = 31 * result + (customCommands != null ? customCommands.hashCode() : 0);
    result = 31 * result + (bulkCommandDefinition != null ? bulkCommandDefinition.hashCode(): 0);
    result = 31 * result + (dependencies != null ? dependencies.hashCode() : 0);
    result = 31 * result + (autoDeploy != null ? autoDeploy.hashCode() : 0);
    result = 31 * result + (configDependencies != null ? configDependencies.hashCode() : 0);
    result = 31 * result + (clientConfigFiles != null ? clientConfigFiles.hashCode() : 0);
    // NULL = 0, TRUE = 2, FALSE = 1
    result = 31 * result + (versionAdvertisedField != null ? (versionAdvertisedField.booleanValue() ? 2 : 1) : 0);
    result = 31 * result + (customFolder != null ? customFolder.hashCode() : 0);
    return result;
  }
Determine if this component advertises a version. This Boolean has already resolved to true|false depending
on explicitly overriding the value or inheriting from an ancestor.
@return boolean of whether this component advertises a version.
ambari-server/src/main/java/org/apache/ambari/server/state/ComponentInfo.java