Class 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 Detail

      • GQLMethodCall

        public GQLMethodCall​(@Nonnull
                             PServiceMethod method,
                             @Nullable
                             java.lang.String alias,
                             @Nullable
                             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 PServiceMethod getMethod()
        Returns:
        The method to be called to get field value. If message field null.
      • getArguments

        @Nullable
        public <M extends PMessage<M>> M getArguments()
        Type Parameters:
        M - The argument message type.
        Returns:
        The argument struct. If no arguments or params then null.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object