public class EntityFetchOptions extends java.lang.Object
Helper class to determine which properties should be eagerly fetched based on the fields in a graphql.schema.DataFetchingEnvironment.
| Modifiers | Name | Description |
|---|---|---|
protected java.util.Set<java.lang.String> |
associationNames |
|
protected PersistentEntity |
entity |
|
protected java.lang.String |
propertyName |
| Constructor and description |
|---|
EntityFetchOptions(java.lang.Class<?> entityClass) |
EntityFetchOptions(java.lang.Class<?> entityClass, java.lang.String projectionName) |
EntityFetchOptions(PersistentEntity entity) |
EntityFetchOptions(PersistentEntity entity, java.lang.String projectionName)Designed for use when a projection query is used. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public java.util.Map<java.lang.String, Association> |
getAssociations()
|
|
public java.util.Map<java.lang.String, java.util.Map> |
getFetchArgument(java.util.Set<java.lang.String> properties)Creates the fetch argument prepared to pass to DetachedCriteria.list |
|
public java.util.Map<java.lang.String, java.util.Map> |
getFetchArgument(graphql.schema.DataFetchingEnvironment environment) |
|
public java.util.Map<java.lang.String, java.util.Map> |
getFetchArgument(graphql.schema.DataFetchingEnvironment environment, boolean skipCollections)Inspects the environment for requested fields and compares against the PersistentEntity associations to determine which fields should be eagerly fetched. |
|
public java.util.Set<java.lang.String> |
getJoinProperties(java.util.List<graphql.language.Field> fields) |
|
public java.util.Set<java.lang.String> |
getJoinProperties(java.util.List<graphql.language.Field> fields, boolean skipCollections)Designed for internal use to inspect nested selections |
|
public java.util.Set<java.lang.String> |
getJoinProperties(graphql.schema.DataFetchingEnvironment environment) |
|
public java.util.Set<java.lang.String> |
getJoinProperties(graphql.schema.DataFetchingEnvironment environment, boolean skipCollections)Inspects the environment for requested fields and compares against the PersistentEntity associations to determine which fields should be eagerly fetched. |
|
protected void |
handleField(java.lang.String parentName, Field selectedField, java.util.Set<java.lang.String> joinProperties) |
|
protected boolean |
isForeignKeyInChild(Association association) |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |
Designed for use when a projection query is used. The fetch arguments need prepended with the projection property name.
entity - The PersistentEntity being queriedprojectionName - The name of the property being projected
Creates the fetch argument prepared to pass to DetachedCriteria.list
properties - The properties to fetchInspects the environment for requested fields and compares against the PersistentEntity associations to determine which fields should be eagerly fetched. Creates the fetch argument prepared to pass to DetachedCriteria.list
environment - The fetching environmentskipCollections - Whether to exclude associations that are collectionsDesigned for internal use to inspect nested selections
fields - The list of fields to searchskipCollections - Whether to exclude associations that are collectionsInspects the environment for requested fields and compares against the PersistentEntity associations to determine which fields should be eagerly fetched.
environment - The data fetching environmentskipCollections - Whether to exclude associations that are collections