Record Class ElementCallbackQuery<ServiceT>
java.lang.Object
java.lang.Record
dev.getelements.elements.sdk.query.ElementCallbackQuery<ServiceT>
public record ElementCallbackQuery<ServiceT>(ElementServiceKey<? extends ServiceT> serviceKey, Supplier<? extends ServiceT> supplier, String methodName, List<Class<?>> parameters)
extends Record
implements Query<Callback<Object>>
Finds a
Callback
from within a service type.-
Constructor Summary
ConstructorsConstructorDescriptionElementCallbackQuery
(ElementServiceKey<? extends ServiceT> serviceKey, Supplier<? extends ServiceT> supplier, String methodName, List<Class<?>> parameters) Creates an instance of aElementCallbackQuery
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.find()
Gets the result of theQuery
final int
hashCode()
Returns a hash code value for this object.Returns the value of themethodName
record component.Returns the value of theparameters
record component.ElementServiceKey
<? extends ServiceT> Returns the value of theserviceKey
record component.supplier()
Returns the value of thesupplier
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
ElementCallbackQuery
public ElementCallbackQuery(ElementServiceKey<? extends ServiceT> serviceKey, Supplier<? extends ServiceT> supplier, String methodName, List<Class<?>> parameters) Creates an instance of aElementCallbackQuery
record class.- Parameters:
serviceKey
- the value for theserviceKey
record componentsupplier
- the value for thesupplier
record componentmethodName
- the value for themethodName
record componentparameters
- the value for theparameters
record component
-
-
Method Details
-
find
Description copied from interface:Query
Gets the result of theQuery
- Specified by:
find
in interfaceQuery<ServiceT>
- Returns:
- the query result
- Throws:
QueryException
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
serviceKey
Returns the value of theserviceKey
record component.- Returns:
- the value of the
serviceKey
record component
-
supplier
Returns the value of thesupplier
record component.- Returns:
- the value of the
supplier
record component
-
methodName
Returns the value of themethodName
record component.- Returns:
- the value of the
methodName
record component
-
parameters
Returns the value of theparameters
record component.- Returns:
- the value of the
parameters
record component
-