Record Class EmptyResultSet<T>
java.lang.Object
java.lang.Record
tools.refinery.store.query.resultset.EmptyResultSet<T>
- All Implemented Interfaces:
AnyResultSet
,ResultSet<T>
public record EmptyResultSet<T>(ModelQueryAdapter adapter, Query<T> query)
extends Record
implements ResultSet<T>
-
Constructor Summary
ConstructorDescriptionEmptyResultSet
(ModelQueryAdapter adapter, Query<T> query) Creates an instance of aEmptyResultSet
record class. -
Method Summary
Modifier and TypeMethodDescriptionadapter()
Returns the value of theadapter
record component.void
addListener
(ResultSetListener<T> listener) final boolean
Indicates whether some other object is "equal to" this one.getAll()
final int
hashCode()
Returns a hash code value for this object.query()
Returns the value of thequery
record component.void
removeListener
(ResultSetListener<T> listener) int
size()
final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
EmptyResultSet
Creates an instance of aEmptyResultSet
record class.- Parameters:
adapter
- the value for theadapter
record componentquery
- the value for thequery
record component
-
-
Method Details
-
getAdapter
- Specified by:
getAdapter
in interfaceAnyResultSet
-
getCanonicalQuery
- Specified by:
getCanonicalQuery
in interfaceAnyResultSet
- Specified by:
getCanonicalQuery
in interfaceResultSet<T>
-
get
-
getAll
-
size
public int size()- Specified by:
size
in interfaceAnyResultSet
-
addListener
- Specified by:
addListener
in interfaceResultSet<T>
-
removeListener
- Specified by:
removeListener
in interfaceResultSet<T>
-
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)
. -
adapter
Returns the value of theadapter
record component.- Returns:
- the value of the
adapter
record component
-
query
Returns the value of thequery
record component.- Returns:
- the value of the
query
record component
-