Module de.seggebaeing.sqlanalyzer
Record Class LLMDTO
java.lang.Object
java.lang.Record
de.seggebaeing.sqlanalyzer.persistence.dto.LLMDTO
- Record Components:
id
- stable identifierversion
- numeric value representing the modification statename
- non-null nameapi
- non-null provider identifier (enum constant name)model
- non-null model identifierapiKey
- non-null API keyminTemperature
- minimum temperature valuemaxTemperature
- maximum temperature value
- All Implemented Interfaces:
Persistable
,Serializable
public record LLMDTO(int id, long version, String name, String api, String model, String apiKey, double minTemperature, double maxTemperature)
extends Record
implements Persistable
Data transfer object (DTO) for persisting an LLM configuration.
Holds identifier, version, and associated configuration fields. All string fields are non-null.
- Since:
- 1.0
- Author:
- Felix Seggebäing
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapi()
Returns the value of theapi
record component.apiKey()
Returns the value of theapiKey
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
id()
Returns the value of theid
record component.double
Returns the value of themaxTemperature
record component.double
Returns the value of theminTemperature
record component.model()
Returns the value of themodel
record component.name()
Returns the value of thename
record component.final String
toString()
Returns a string representation of this record class.long
version()
Returns the value of theversion
record component.
-
Constructor Details
-
LLMDTO
public LLMDTO(int id, long version, String name, String api, String model, String apiKey, double minTemperature, double maxTemperature) Creates a newLLMDTO
instance.Ensures that
name
,api
,model
, andapiKey
are non-null; otherwise aNullPointerException
is thrown.- Parameters:
id
- stable identifierversion
- numeric value representing the modification statename
- non-null nameapi
- non-null provider identifier (enum constant name)model
- non-null model identifierapiKey
- non-null API keyminTemperature
- minimum temperature valuemaxTemperature
- maximum temperature value- Throws:
NullPointerException
- if any of the required string fields isnull
-
-
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 '=='. -
id
public int id()Returns the value of theid
record component.- Specified by:
id
in interfacePersistable
- Returns:
- the value of the
id
record component
-
version
public long version()Returns the value of theversion
record component.- Specified by:
version
in interfacePersistable
- Returns:
- the value of the
version
record component
-
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-
api
Returns the value of theapi
record component.- Returns:
- the value of the
api
record component
-
model
Returns the value of themodel
record component.- Returns:
- the value of the
model
record component
-
apiKey
Returns the value of theapiKey
record component.- Returns:
- the value of the
apiKey
record component
-
minTemperature
public double minTemperature()Returns the value of theminTemperature
record component.- Returns:
- the value of the
minTemperature
record component
-
maxTemperature
public double maxTemperature()Returns the value of themaxTemperature
record component.- Returns:
- the value of the
maxTemperature
record component
-