Package io.jmix.graphql.datafetcher
Class EntityQueryDataFetcher
java.lang.Object
io.jmix.graphql.datafetcher.EntityQueryDataFetcher
-
Field Summary
Modifier and TypeFieldDescriptionprotected AccessManager
protected DataFetcherPlanBuilder
protected DataManager
static final int
protected EnvironmentUtils
protected FilterConditionBuilder
protected IdentifierService
protected MetadataTools
protected QueryDataFetcherLoader
protected ResponseBuilder
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected CrudEntityContext
applyEntityConstraints
(MetaClass metaClass) 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.protected org.apache.commons.collections4.OrderedMap<String,
Types.SortOrder> buildOrderByConditionSet
(MetaClass metaClass, Object orderBy) Convert graphql orderBy object to jmix format.protected void
checkCanReadEntity
(MetaClass metaClass) graphql.schema.DataFetcher<?>
countEntities
(MetaClass metaClass) protected LogicalCondition
createCondition
(Object filter) protected LoadContext.Query
generateQuery
(MetaClass metaClass, LogicalCondition condition) loadEntities
(MetaClass metaClass) graphql.schema.DataFetcher<?>
loadEntity
(MetaClass metaClass)
-
Field Details
-
DEFAULT_MAX_RESULTS
public static final int DEFAULT_MAX_RESULTS- See Also:
-
responseBuilder
-
dataManager
-
dataFetcherPlanBuilder
-
filterConditionBuilder
-
accessManager
-
environmentUtils
-
metadataTools
-
queryDataFetcherLoader
-
identifierService
-
-
Constructor Details
-
EntityQueryDataFetcher
public EntityQueryDataFetcher()
-
-
Method Details
-
loadEntity
-
loadEntities
-
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 pathorderBy
- - graphql orderBy object- Returns:
- pair that contains propertyPath as key ans SortOrder as value
-
countEntities
-
checkCanReadEntity
-
applyEntityConstraints
-
createCondition
-
generateQuery
-