java.lang.Object
java.lang.Record
st.orm.template.SqlTemplate.PositionalParameter
- Record Components:
position- the position of the parameter in the SQL query (starting from 1).dbValue- the database value of the parameter.
- All Implemented Interfaces:
SqlTemplate.Parameter
- Enclosing interface:
SqlTemplate
public static record SqlTemplate.PositionalParameter(int position, @Nullable Object dbValue)
extends Record
implements SqlTemplate.Parameter
Represents a positional parameter that can be used in a SQL query.
Note: At the SQL template level, the framework enforces that each position in the query must be unique. The same position cannot be used more than once, ensuring logical correctness and preventing conflicts in parameter binding.
-
Constructor Summary
ConstructorsConstructorDescriptionPositionalParameter(int position, Object dbValue) Creates an instance of aPositionalParameterrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondbValue()Returns the value of thedbValuerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intposition()Returns the value of thepositionrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
position
public int position()Returns the value of thepositionrecord component.- Returns:
- the value of the
positionrecord component
-
dbValue
Returns the value of thedbValuerecord component.- Specified by:
dbValuein interfaceSqlTemplate.Parameter- Returns:
- the value of the
dbValuerecord component
-