Record Class QueryResult
java.lang.Object
java.lang.Record
fr.multimc.api.commons.data.sources.database.queries.QueryResult
- Record Components:
queryType- Custom QueryTypequeryStatus- Custom QueryStatusresultSet- SQL ResultSet, null if the QueryType is not UPDATE
public record QueryResult(QueryType queryType, SQLState queryStatus, ResultSet resultSet)
extends Record
The QueryResult is a custom SQL object that allow you to use the result of an executed query
- Since:
- 07/10/2022
-
Constructor Summary
ConstructorsConstructorDescriptionQueryResult(QueryType queryType, SQLState queryStatus, ResultSet resultSet) Creates an instance of aQueryResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thequeryStatusrecord component.Returns the value of thequeryTyperecord component.Returns the value of theresultSetrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
QueryResult
Creates an instance of aQueryResultrecord class.- Parameters:
queryType- the value for thequeryTyperecord componentqueryStatus- the value for thequeryStatusrecord componentresultSet- the value for theresultSetrecord component
-
-
Method Details
-
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). -
queryType
Returns the value of thequeryTyperecord component.- Returns:
- the value of the
queryTyperecord component
-
queryStatus
Returns the value of thequeryStatusrecord component.- Returns:
- the value of the
queryStatusrecord component
-
resultSet
Returns the value of theresultSetrecord component.- Returns:
- the value of the
resultSetrecord component
-