Class TdbField
- All Implemented Interfaces:
com.tietoenator.trip.jxp.internal.utils.DOMSink
- Direct Known Subclasses:
TdbStringField
,TdbStructuredField
,TdbTextField
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
appendValue
(String val) Append a new subfield or paragraph to the fieldabstract void
appendValues
(Collection<String> val) Append several new subfields or paragraphs to the fieldabstract void
clear()
Clear any existing content from the fieldabstract int
Retrieve the size of the value in the field.getName()
Get the name of the fieldGet a reference to the component within which this field existsabstract TdbFieldType
getType()
Get the TRIP field type of the fieldabstract String
getValue
(int index) Get the subfield or paragraph value at the defined indexabstract int
Retrieve the count of the values in the field.abstract void
insertValue
(int index, String value) Inserts a new subfield or paragraph into the field.abstract void
insertValues
(int index, Collection<String> values) Inserts several new subfields or paragraphs into the field.boolean
Returns the change status for the field.abstract boolean
Returns true if this field contains a partial value.Retrieve the display content of the field.abstract void
removeValue
(int index) Removes a subfield or paragraph from the field.abstract void
Set the defined subfield or paragraph to the provided value
Note that the index provided must lie within the current bounds of the field.abstract String
toString()
Override the system-default behavior to provide a string representation of the field.values()
Retrieve the current content of the field.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.tietoenator.trip.jxp.internal.utils.DOMSink
sinkNode
-
Method Details
-
getName
Get the name of the field- Returns:
- The name of the field
-
isChanged
public boolean isChanged()Returns the change status for the field.- Returns:
- True if the field has uncommitted changes, otherwise false.
- Since:
- 8.0-4
-
getType
Get the TRIP field type of the field- Returns:
- The field type
-
originalValues
Retrieve the display content of the field.
This is a textual representation intended mostly for display purposes. Hit terms will be marked up in this representation using whatever markup the calling application has defined within the retrieval field template (if any).- Returns:
- The collection of values that comprise the field's content
- Throws:
TdbException
-
values
Retrieve the current content of the field.
This representation does not contain search term highlighting and reflects any updates made to the field since retrieval.- Returns:
- The collection of values that comprise the field's content
- Throws:
TdbException
-
getOwnerComponent
Get a reference to the component within which this field exists- Returns:
- The component within which the field exists
-
clear
public abstract void clear()Clear any existing content from the field -
getValue
Get the subfield or paragraph value at the defined index- Parameters:
index
- Zero-based index of item to retrieve- Returns:
- Value of subfield or paragraph if available, null otherwise
- Throws:
TdbException
-
getFieldSize
public abstract int getFieldSize()Retrieve the size of the value in the field.The use of this property is only valid when connected to TRIPsystem version 6.2-0 or later.
The value returned by this property is the total size of all subfields or paragraphs in the field. For STRING fields, this is simply the total size of the binary data stored in the field.
This property reflects any updates made to the field since retrieval.
- Returns:
- Total size of the contents of the field.
-
isPartial
public abstract boolean isPartial()Returns true if this field contains a partial value.Partial values are typically produced when requesting a hit-focused so-called "teaser" value from a TEXT or PHRASE field. E.g. for display in result lists.
For STRING fields, the semantics of the Partial property is slightly different. For a TdbStringField to be considered partial, it must have been fetched with a field template assigned the TdbFieldFetchType.NoValue option.
Partial values should be considered read-only, even if the current user has write access to the field. Writing back a partial value will overwrite the existing full value, causing what amounts to data corruption.
- Returns:
- True if the value is partial
-
setValue
Set the defined subfield or paragraph to the provided value
Note that the index provided must lie within the current bounds of the field. Attempt to set the value of a subfield / paragraph outside the bounds of the current field will cause an exception to be thrown.- Parameters:
index
- Zero-based index of subfield or paragraph to modifyval
- Value to assign- Throws:
TdbException
-
appendValue
Append a new subfield or paragraph to the field- Parameters:
val
- The value to append to the field- Throws:
TdbException
-
appendValues
Append several new subfields or paragraphs to the field- Parameters:
val
- The values to append to the field- Throws:
TdbException
-
insertValue
Inserts a new subfield or paragraph into the field.- Parameters:
index
- Zero-based index at which to insert the new subfield or paragraph.value
- The value to insert into the field.- Throws:
TdbException
-
insertValues
Inserts several new subfields or paragraphs into the field.- Parameters:
index
- Zero-based index at which to insert the new subfields or paragraphs.values
- The value to insert into the field.- Throws:
TdbException
-
removeValue
Removes a subfield or paragraph from the field.- Parameters:
index
- Zero-based index from which to remove a subfield or paragraph.- Throws:
TdbException
-
getValueCount
Retrieve the count of the values in the field.- Returns:
- Number of subfields or paragraphs in the field.
- Throws:
TdbException
-
toString
Override the system-default behavior to provide a string representation of the field.
-