Module litebridge.orm
Record Class QueryAlteringExpressionSpec<T>
java.lang.Object
java.lang.Record
org.litebridge.orm.expression.select.QueryAlteringExpressionSpec<T>
- Type Parameters:
T-- Record Components:
delegate-noMatchFallback-limit-
- All Implemented Interfaces:
ExpressionSpec,TypeOverride<T>,TypeOverrideExpressionSpec<T>
public record QueryAlteringExpressionSpec<T>(TypeOverrideExpressionSpec<T> delegate, @Nullable T noMatchFallback, Limit limit)
extends Record
implements TypeOverrideExpressionSpec<T>
An expression that alters the query in some way.
It allows setting a SQL limit and can return a fallback value if no database records were matched.
-
Constructor Summary
ConstructorsConstructorDescriptionQueryAlteringExpressionSpec(TypeOverrideExpressionSpec<T> delegate, @Nullable T noMatchFallback, Limit limit) Creates an instance of aQueryAlteringExpressionSpecrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondelegate()Returns the value of thedelegaterecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.limit()Returns the value of thelimitrecord component.@Nullable TReturns the value of thenoMatchFallbackrecord component.Gets the return type override of the query result.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
QueryAlteringExpressionSpec
public QueryAlteringExpressionSpec(TypeOverrideExpressionSpec<T> delegate, @Nullable T noMatchFallback, Limit limit) Creates an instance of aQueryAlteringExpressionSpecrecord class.- Parameters:
delegate- the value for thedelegaterecord componentnoMatchFallback- the value for thenoMatchFallbackrecord componentlimit- the value for thelimitrecord component
-
-
Method Details
-
returnType
Description copied from interface:TypeOverrideGets the return type override of the query result.- Specified by:
returnTypein interfaceTypeOverride<T>- Returns:
- the type of the result.
-
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). -
delegate
Returns the value of thedelegaterecord component.- Returns:
- the value of the
delegaterecord component
-
noMatchFallback
Returns the value of thenoMatchFallbackrecord component.- Returns:
- the value of the
noMatchFallbackrecord component
-
limit
Returns the value of thelimitrecord component.- Returns:
- the value of the
limitrecord component
-