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

    mapping.put(TaskResourceProvider.TASK_ID_PROPERTY_ID,
        Collections.singletonList(taskId));

    mapping.put(TaskResourceProvider.TASK_REQUEST_ID_PROPERTY_ID,
        Collections.singletonList(requestId));

    mapping.put(TaskResourceProvider.TASK_STAGE_ID_PROPERTY_ID,
        Collections.singletonList(stageId));

    mapping.put(TaskResourceProvider.TASK_HOST_NAME_PROPERTY_ID,
        Arrays.asList(host, HostEntity_.hostId));

    mapping.put(TaskResourceProvider.TASK_ROLE_PROPERTY_ID,
        Collections.singletonList(role));

    mapping.put(TaskResourceProvider.TASK_EXIT_CODE_PROPERTY_ID,
        Collections.singletonList(exitcode));

    mapping.put(TaskResourceProvider.TASK_STATUS_PROPERTY_ID,
        Collections.singletonList(status));

    mapping.put(TaskResourceProvider.TASK_START_TIME_PROPERTY_ID,
        Collections.singletonList(startTime));

    mapping.put(TaskResourceProvider.TASK_END_TIME_PROPERTY_ID,
        Collections.singletonList(endTime));

    mapping.put(TaskResourceProvider.TASK_ATTEMPT_CNT_PROPERTY_ID,
        Collections.singletonList(attemptCount));

    mapping.put(TaskResourceProvider.TASK_COMMAND_PROPERTY_ID,
        Collections.singletonList(roleCommand));

    mapping.put(TaskResourceProvider.TASK_CUST_CMD_NAME_PROPERTY_ID,
        Collections.singletonList(customCommandName));

    return mapping;
  }
Gets a mapping of between a resource provider property, like
{@link TaskResourceProvider#TASK_ID_PROPERTY_ID} 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/HostRoleCommandEntity_.java