@SuppressWarnings("unchecked")
  public static Map<String, List<? extends SingularAttribute<?, ?>>> getPredicateMapping() {
    Map<String, List<? extends SingularAttribute<?, ?>>> mapping = new HashMap<>();

    mapping.put(AlertHistoryResourceProvider.ALERT_HISTORY_ID,
        Collections.singletonList(alertId));

    mapping.put(AlertHistoryResourceProvider.ALERT_HISTORY_SERVICE_NAME,
        Collections.singletonList(serviceName));

    mapping.put(
        AlertHistoryResourceProvider.ALERT_HISTORY_COMPONENT_NAME,
        Collections.singletonList(componentName));

    mapping.put(AlertHistoryResourceProvider.ALERT_HISTORY_STATE,
        Collections.singletonList(alertState));

    mapping.put(AlertHistoryResourceProvider.ALERT_HISTORY_TIMESTAMP,
        Collections.singletonList(alertTimestamp));

    mapping.put(AlertHistoryResourceProvider.ALERT_HISTORY_HOSTNAME,
        Collections.singletonList(hostName));

    mapping.put(AlertHistoryResourceProvider.ALERT_HISTORY_LABEL,
        Collections.singletonList(alertLabel));

    // AlertHistory.alertDefinition.definitionName = foo
    mapping.put(AlertHistoryResourceProvider.ALERT_HISTORY_DEFINITION_NAME,
        Arrays.asList(alertDefinition, AlertDefinitionEntity_.definitionName));

    return mapping;
  }
Gets a mapping of between a resource provider property, like
{@link AlertHistoryResourceProvider#ALERT_HISTORY_SERVICE_NAME} to a
metamodel {@link SingularAttribute}.
<p/>
This is used when converting an Ambari {@link Predicate} into a JPA
{@link jakarta.persistence.criteria.Predicate} and we need a type-safe
conversion between "category/property" and JPA field names.
<p/>
Multiple {@link SingularAttribute} instances can be chained together in
order to provide an {@code entity.subEntity.field} reference.

@return
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertHistoryEntity_.java