Class GQLMethodCall
- java.lang.Object
-
- net.morimekta.providence.graphql.gql.GQLMethodCall
-
- All Implemented Interfaces:
GQLSelection
@Immutable public class GQLMethodCall extends java.lang.Object implements GQLSelection
Representation of a method call in an operation. This is distinct from a field request, as this level the call and response is ultimately required, where as the fields are added per availability. It also represents the call to an actual service which will provide the response to be returned for the named JSON field.
-
-
Constructor Summary
Constructors Constructor Description GQLMethodCall(net.morimekta.providence.descriptor.PServiceMethod method, java.lang.String alias, net.morimekta.providence.PMessage<?> arguments, java.util.List<GQLSelection> selectionSet)Make a full field selection definition.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.lang.StringgetAlias()<M extends net.morimekta.providence.PMessage<M>>
MgetArguments()net.morimekta.providence.descriptor.PServiceMethodgetMethod()java.util.List<GQLSelection>getSelectionSet()inthashCode()java.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.morimekta.providence.graphql.gql.GQLSelection
getSelection, hasSelection
-
-
-
-
Constructor Detail
-
GQLMethodCall
public GQLMethodCall(@Nonnull net.morimekta.providence.descriptor.PServiceMethod method, @Nullable java.lang.String alias, @Nullable net.morimekta.providence.PMessage<?> arguments, @Nullable java.util.List<GQLSelection> selectionSet)Make a full field selection definition.- Parameters:
method- The method call to be represented.alias- The alias to be used in the JSON output.arguments- Arguments used for the method call.selectionSet- SelectionSet for sub-field selection.
-
-
Method Detail
-
getAlias
@Nullable public java.lang.String getAlias()
- Returns:
- The output field alias.
-
getMethod
@Nonnull public net.morimekta.providence.descriptor.PServiceMethod getMethod()
- Returns:
- The method to be called to get field value. If message field null.
-
getArguments
@Nullable public <M extends net.morimekta.providence.PMessage<M>> M getArguments()
- Type Parameters:
M- The argument message type.- Returns:
- The argument struct. If no arguments or params then null.
-
getSelectionSet
@Nullable public java.util.List<GQLSelection> getSelectionSet()
- Specified by:
getSelectionSetin interfaceGQLSelection- Returns:
- The field's selection set, or null if none.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
-