Record Class DocumentTextPartModel
java.lang.Object
java.lang.Record
org.exoplatform.documents.mcp.model.DocumentTextPartModel
- Record Components:
id- the document idname- the document titlesection- the heading whose section is read, null when reading by offsetoffset- the character the part starts atendOffset- the character after the part's last onetotalChars- the length of the whole textnextOffset- where the next part starts, null when this one ends the text or the sectiontruncated- true when the whole text was cut at the most characters read from one documenttext- the part's text
-
Constructor Summary
ConstructorsConstructorDescriptionDocumentTextPartModel(String id, String name, DocumentHeadingModel section, long offset, long endOffset, long totalChars, Long nextOffset, boolean truncated, String text) Creates an instance of aDocumentTextPartModelrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of theendOffsetrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.name()Returns the value of thenamerecord component.Returns the value of thenextOffsetrecord component.longoffset()Returns the value of theoffsetrecord component.section()Returns the value of thesectionrecord component.text()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of thetotalCharsrecord component.booleanReturns the value of thetruncatedrecord component.
-
Constructor Details
-
DocumentTextPartModel
public DocumentTextPartModel(String id, String name, DocumentHeadingModel section, long offset, long endOffset, long totalChars, Long nextOffset, boolean truncated, String text) Creates an instance of aDocumentTextPartModelrecord class.- Parameters:
id- the value for theidrecord componentname- the value for thenamerecord componentsection- the value for thesectionrecord componentoffset- the value for theoffsetrecord componentendOffset- the value for theendOffsetrecord componenttotalChars- the value for thetotalCharsrecord componentnextOffset- the value for thenextOffsetrecord componenttruncated- the value for thetruncatedrecord componenttext- the value for thetextrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
id
-
name
-
section
-
offset
-
endOffset
-
totalChars
public long totalChars()Returns the value of thetotalCharsrecord component.- Returns:
- the value of the
totalCharsrecord component
-
nextOffset
Returns the value of thenextOffsetrecord component.- Returns:
- the value of the
nextOffsetrecord component
-
truncated
-
text
-