Record Class ElementServiceQuery<ServiceT>
java.lang.Object
java.lang.Record
dev.getelements.elements.sdk.query.ElementServiceQuery<ServiceT>
- Type Parameters:
ServiceT-- Record Components:
element-serviceKey-
public record ElementServiceQuery<ServiceT>(Element element, ElementServiceKey<? extends ServiceT> serviceKey)
extends Record
implements Query<ServiceT>
-
Constructor Summary
ConstructorsConstructorDescriptionElementServiceQuery(Element element, ElementServiceKey<? extends ServiceT> serviceKey) Creates an instance of aElementServiceQueryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionElementCallbackQuery<? extends ServiceT> Queries fo raCallbackwith the supplied method name and parameter types.element()Returns the value of theelementrecord component.final booleanIndicates whether some other object is "equal to" this one.find()Gets the result of theQueryOptional<ElementCallbackQuery<? extends ServiceT>> findCallback(String methodName, Class<?>... parameters) Queries for aCallbackwith the supplied method name and parameter types.final inthashCode()Returns a hash code value for this object.ElementServiceKey<? extends ServiceT> Returns the value of theserviceKeyrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ElementServiceQuery
Creates an instance of aElementServiceQueryrecord class.- Parameters:
element- the value for theelementrecord componentserviceKey- the value for theserviceKeyrecord component
-
-
Method Details
-
find
Description copied from interface:QueryGets the result of theQuery- Specified by:
findin interfaceQuery<ServiceT>- Returns:
- the query result
- Throws:
QueryException
-
callback
Queries fo raCallbackwith the supplied method name and parameter types. -
findCallback
public Optional<ElementCallbackQuery<? extends ServiceT>> findCallback(String methodName, Class<?>... parameters) Queries for aCallbackwith the supplied method name and parameter types.- Parameters:
methodName- the method nameparameters- the method parameters- Returns:
- an
ElementCallbackQuery
-
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). -
element
Returns the value of theelementrecord component.- Returns:
- the value of the
elementrecord component
-
serviceKey
Returns the value of theserviceKeyrecord component.- Returns:
- the value of the
serviceKeyrecord component
-