Class EntityQueryDataFetcher

java.lang.Object
io.jmix.graphql.datafetcher.EntityQueryDataFetcher

@Component("gql_EntityQueryDataFetcher") public class EntityQueryDataFetcher extends Object
  • Field Details

  • Constructor Details

    • EntityQueryDataFetcher

      public EntityQueryDataFetcher()
  • Method Details

    • loadEntity

      public graphql.schema.DataFetcher<?> loadEntity(MetaClass metaClass)
    • loadEntities

      public graphql.schema.DataFetcher<List<Map<String,Object>>> loadEntities(MetaClass metaClass)
    • buildOrderByConditionSet

      protected org.apache.commons.collections4.OrderedMap<String,Types.SortOrder> buildOrderByConditionSet(MetaClass metaClass, @Nullable Object orderBy)
      Convert graphql orderBy object to jmix format.
      Parameters:
      metaClass -
      orderBy - - graphql orderBy object
      Returns:
      an ordered set of pairs that contains propertyPath as key ans SortOrder as value
    • buildOrderBy

      protected List<org.apache.commons.lang3.tuple.Pair<String,Types.SortOrder>> buildOrderBy(MetaClass metaClass, String path, Object orderBy)
      Convert graphql orderBy object to jmix format.
      Parameters:
      metaClass -
      path - - parent property path
      orderBy - - graphql orderBy object
      Returns:
      pair that contains propertyPath as key ans SortOrder as value
    • countEntities

      public graphql.schema.DataFetcher<?> countEntities(MetaClass metaClass)
    • checkCanReadEntity

      protected void checkCanReadEntity(MetaClass metaClass)
    • applyEntityConstraints

      protected CrudEntityContext applyEntityConstraints(MetaClass metaClass)
    • createCondition

      @Nullable protected LogicalCondition createCondition(Object filter)
    • generateQuery

      @NotNull protected LoadContext.Query generateQuery(MetaClass metaClass, LogicalCondition condition)