@Immutable public class GQLOperation extends Object implements GQLSelection
| Constructor and Description |
|---|
GQLOperation(net.morimekta.providence.descriptor.PService service,
boolean mutation,
String name,
List<GQLSelection> selectionSet) |
| Modifier and Type | Method and Description |
|---|---|
String |
getName() |
List<GQLSelection> |
getSelection(net.morimekta.providence.descriptor.PField<?> field)
Get all selection entries related to the given field.
|
List<GQLSelection> |
getSelectionSet() |
net.morimekta.providence.descriptor.PService |
getService() |
int |
hashCode() |
boolean |
hasMethodCall(net.morimekta.providence.descriptor.PServiceMethod method) |
boolean |
hasSelection(net.morimekta.providence.descriptor.PField<?>... fields)
Check if any of the given fields are in the selection.
|
boolean |
hasSelectionPath(net.morimekta.providence.descriptor.PField<?>... fields)
Browse downward fields so that we figure out if the selection (based on
a field path based on the returning structure) if selected.
|
boolean |
isMutation() |
String |
toString() |
public boolean isMutation()
public boolean hasMethodCall(net.morimekta.providence.descriptor.PServiceMethod method)
public boolean hasSelection(@Nonnull net.morimekta.providence.descriptor.PField<?>... fields)
GQLSelectionGQLSelection.getSelection(PField) returns
a non-empty list.hasSelection in interface GQLSelectionfields - Fields to check selection for.public boolean hasSelectionPath(@Nonnull net.morimekta.providence.descriptor.PField<?>... fields)
GQLSelectionhasSelectionPath("a", "b") will first look for the selection
of "a", then for selection of "b" within a. Will treat a non-selection
as the selection being there.hasSelectionPath in interface GQLSelectionfields - Fields as in a field path to check from the current
selection.@Nonnull public List<GQLSelection> getSelection(@Nonnull net.morimekta.providence.descriptor.PField<?> field)
GQLSelectionGQLSelection.hasSelection(PField[]) called with the same field returns
true.getSelection in interface GQLSelectionfield - The field to get selection for.@Nonnull public net.morimekta.providence.descriptor.PService getService()
@Nonnull public List<GQLSelection> getSelectionSet()
getSelectionSet in interface GQLSelectionCopyright © 2015–2020 morimekta.net. All rights reserved.