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 StringThe field for theconversationIdrecord component.private final AtomicLongThe field for theinstantSeqrecord component.private final List<org.springframework.ai.chat.messages.Message>The field for themessagesrecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateAddBatchPreparedStatement(String conversationId, List<org.springframework.ai.chat.messages.Message> messages) privateAddBatchPreparedStatement(String conversationId, List<org.springframework.ai.chat.messages.Message> messages, AtomicLong instantSeq) Creates an instance of aAddBatchPreparedStatementrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconversationIdrecord component.final booleanIndicates whether some other object is "equal to" this one.intfinal inthashCode()Returns a hash code value for this object.Returns the value of theinstantSeqrecord component.List<org.springframework.ai.chat.messages.Message>messages()Returns the value of themessagesrecord component.voidsetValues(PreparedStatement ps, int i) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
conversationId
The field for theconversationIdrecord component. -
messages
The field for themessagesrecord component. -
instantSeq
The field for theinstantSeqrecord component.
-
-
Constructor Details
-
AddBatchPreparedStatement
-
AddBatchPreparedStatement
private AddBatchPreparedStatement(String conversationId, List<org.springframework.ai.chat.messages.Message> messages, AtomicLong instantSeq) Creates an instance of aAddBatchPreparedStatementrecord class.- Parameters:
conversationId- the value for theconversationIdrecord componentmessages- the value for themessagesrecord componentinstantSeq- the value for theinstantSeqrecord component
-
-
Method Details
-
setValues
- Specified by:
setValuesin interfaceorg.springframework.jdbc.core.BatchPreparedStatementSetter- Throws:
SQLException
-
getBatchSize
public int getBatchSize()- Specified by:
getBatchSizein 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 theconversationIdrecord component.- Returns:
- the value of the
conversationIdrecord component
-
messages
Returns the value of themessagesrecord component.- Returns:
- the value of the
messagesrecord component
-
instantSeq
Returns the value of theinstantSeqrecord component.- Returns:
- the value of the
instantSeqrecord component
-