Package com.bytedesk.ai.alibaba.memory
Record Class JdbcChatMemoryRepository.AddBatchPreparedStatement
java.lang.Object
java.lang.Record
com.bytedesk.ai.alibaba.memory.JdbcChatMemoryRepository.AddBatchPreparedStatement
- All Implemented Interfaces:
org.springframework.jdbc.core.BatchPreparedStatementSetter
- Enclosing class:
- JdbcChatMemoryRepository
private static record JdbcChatMemoryRepository.AddBatchPreparedStatement(String conversationId, List<org.springframework.ai.chat.messages.Message> messages, AtomicLong instantSeq)
extends Record
implements org.springframework.jdbc.core.BatchPreparedStatementSetter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
The field for theconversationId
record component.private final AtomicLong
The field for theinstantSeq
record component.private final List<org.springframework.ai.chat.messages.Message>
The field for themessages
record component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
AddBatchPreparedStatement
(String conversationId, List<org.springframework.ai.chat.messages.Message> messages) private
AddBatchPreparedStatement
(String conversationId, List<org.springframework.ai.chat.messages.Message> messages, AtomicLong instantSeq) Creates an instance of aAddBatchPreparedStatement
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconversationId
record component.final boolean
Indicates whether some other object is "equal to" this one.int
final int
hashCode()
Returns a hash code value for this object.Returns the value of theinstantSeq
record component.List<org.springframework.ai.chat.messages.Message>
messages()
Returns the value of themessages
record component.void
setValues
(PreparedStatement ps, int i) final String
toString()
Returns a string representation of this record class.
-
Field Details
-
conversationId
The field for theconversationId
record component. -
messages
The field for themessages
record component. -
instantSeq
The field for theinstantSeq
record component.
-
-
Constructor Details
-
AddBatchPreparedStatement
-
AddBatchPreparedStatement
private AddBatchPreparedStatement(String conversationId, List<org.springframework.ai.chat.messages.Message> messages, AtomicLong instantSeq) Creates an instance of aAddBatchPreparedStatement
record class.- Parameters:
conversationId
- the value for theconversationId
record componentmessages
- the value for themessages
record componentinstantSeq
- the value for theinstantSeq
record component
-
-
Method Details
-
setValues
- Specified by:
setValues
in interfaceorg.springframework.jdbc.core.BatchPreparedStatementSetter
- Throws:
SQLException
-
getBatchSize
public int getBatchSize()- Specified by:
getBatchSize
in interfaceorg.springframework.jdbc.core.BatchPreparedStatementSetter
-
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)
. -
conversationId
Returns the value of theconversationId
record component.- Returns:
- the value of the
conversationId
record component
-
messages
Returns the value of themessages
record component.- Returns:
- the value of the
messages
record component
-
instantSeq
Returns the value of theinstantSeq
record component.- Returns:
- the value of the
instantSeq
record component
-