Class ExcelFieldMetadata
java.lang.Object
com.northconcepts.datapipeline.excel.ExcelFieldMetadata
Provides access to Excel-specific metadata attached to a
Field.
This class allows getting and setting ExcelHyperlink and ExcelCellStyle
properties on a field via session properties.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new ExcelFieldMetadata with no associated field.ExcelFieldMetadata(Field field) Creates a new ExcelFieldMetadata for the specified field. -
Method Summary
Modifier and TypeMethodDescriptionGets the ExcelCellStyle attached to the field, if any.Gets the ExcelHyperlink attached to the field, if any.getField()Gets the field associated with this metadata.setExcelCellStyle(ExcelCellStyle cellStyle) Attaches an ExcelCellStyle to the field as a session property.setExcelHyperlink(ExcelHyperlink excelHyperlink) Attaches an ExcelHyperlink to the field as a session property.Sets the field for this metadata.
-
Constructor Details
-
ExcelFieldMetadata
public ExcelFieldMetadata()Creates a new ExcelFieldMetadata with no associated field. -
ExcelFieldMetadata
Creates a new ExcelFieldMetadata for the specified field.- Parameters:
field- the field to attach metadata to
-
-
Method Details
-
getField
Gets the field associated with this metadata.- Returns:
- the field
-
setField
Sets the field for this metadata.- Parameters:
field- the field to set- Returns:
- this ExcelFieldMetadata instance for method chaining
-
getExcelHyperlink
Gets the ExcelHyperlink attached to the field, if any.- Returns:
- the ExcelHyperlink, or null if none is set
-
setExcelHyperlink
Attaches an ExcelHyperlink to the field as a session property.- Parameters:
excelHyperlink- the hyperlink to attach- Returns:
- this ExcelFieldMetadata instance for method chaining
-
getExcelCellStyle
Gets the ExcelCellStyle attached to the field, if any.- Returns:
- the ExcelCellStyle, or null if none is set
-
setExcelCellStyle
Attaches an ExcelCellStyle to the field as a session property.- Parameters:
cellStyle- the cell style to attach- Returns:
- this ExcelFieldMetadata instance for method chaining
-