Module litebridge.orm
Record Class SubstringSpec
java.lang.Object
java.lang.Record
org.litebridgedb.orm.expression.function.scalar.SubstringSpec
- Record Components:
target- Target column expression to extract characters from.start- The starting position. The first character of a database string is always 1.length- The number of characters to return. Ifnull, the function extracts everything from the start position to the end of the text.
- All Implemented Interfaces:
ColumnExpressionSpec,DelegateExpressionSpec,ExpressionSpec,StringTODelegateExpressionSpec,TypeOverride<String>,TypeOverrideExpressionSpec<String>
public record SubstringSpec(ColumnExpressionSpec target, int start, @Nullable Integer length)
extends Record
implements StringTODelegateExpressionSpec
SUBSTRING(): Returns a substring of a column's text.-
Constructor Summary
ConstructorsConstructorDescriptionSubstringSpec(ColumnExpressionSpec target, int start, @Nullable Integer length) Creates an instance of aSubstringSpecrecord 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.@Nullable Integerlength()Returns the value of thelengthrecord component.intstart()Returns the value of thestartrecord component.target()Returns the value of thetargetrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.litebridgedb.orm.expression.DelegateExpressionSpec
getColumn, setColumnMethods inherited from interface org.litebridgedb.orm.expression.StringTODelegateExpressionSpec
returnType
-
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 '=='. -
target
Returns the value of thetargetrecord component.- Specified by:
targetin interfaceDelegateExpressionSpec- Returns:
- the value of the
targetrecord component
-
start
public int start()Returns the value of thestartrecord component.- Returns:
- the value of the
startrecord component
-
length
Returns the value of thelengthrecord component.- Returns:
- the value of the
lengthrecord component
-