Class TableData
- All Implemented Interfaces:
GetContext,GetIdentifier,GetSequence,EntityData,PersistentData,Serializable
TableData is a table representation optimized for comet output scenarios. It may also be used to represent table data for HTML output.
- Since:
- 4.0.0, 4.0.5 origin attribute supported, added JPA annotations, getLanguage() and getCountry() are deprecated
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCell(int row, int col) Get a cell by row and col index.floatfloatfloatfloatGet the context for this element ornullif not set.Identifier of an entity in the entity model where the current object refers to.intString key for grouping tables of the same type.intGet the string identifier of the table.getLabel()Display label for the table.intfloatintintGet sequence number for the table as given in the content system.Get timestamp from the content system.Version string from the content systemvoidvoidsetBucketId(String bucketId) voidsetCellHeight(float cellHeight) voidsetCellMaxHeight(float cellMaxHeight) voidsetCellMaxWidth(float cellMaxWidth) voidsetCellStyleLeftColumn(String cellStyleLeftColumn) voidsetCellStyleRightColumn(String cellStyleRightColumn) voidsetCellWidth(float cellWidth) voidsetConnectorEntity(ConnectorEntity connectorEntity) voidsetContentMetaData(List<ContentMetaData> contentMetaData) voidsetContext(Context context) set the context of entity data objectvoidsetCreatedBy(String createdBy) voidsetCreatedOn(Date createdOn) voidsetEntity(EntityTableData entityTableData) Sets entityTableData and entityTableDataId.voidsetEntityIdentifier(String entityIdentifier) Identifier of an entity in the entity model where the current object refers to.voidsetEntityTableDataId(String entityTableDataId) voidsetFooterRows(int footerRows) voidsetGroupIdentifier(String groupIdentifier) voidsetHeaderRows(int headerRows) voidsetIdentifier(String identifier) voidvoidsetLeftColumn(int leftColumn) voidsetMaxHeight(float maxHeight) voidsetMetaData(List<KeyValue> metaData) voidvoidsetRightColumn(int rightColumn) voidsetSequence(int sequence) voidsetTableDataRows(List<TableDataRow> tableDataRows) voidsetTableStyle(String tableStyle) voidsetTemplate(String template) voidsetTimestamp(String timestamp) voidsetUpdatedBy(String updatedBy) voidsetUpdatedOn(Date updatedOn) voidsetVersion(String version) toString()
-
Constructor Details
-
TableData
public TableData()Default constructor -
TableData
public TableData(String identifier, String groupIdentifier, String label, String bucketId, Context context, float cellWidth, float cellHeight, String createdBy, Date createdOn, String updatedBy, Date updatedOn) - Parameters:
identifier-getIdentifier()groupIdentifier-getGroupIdentifier()label-getLabel()bucketId-getBucketId()context-getContext()cellWidth-getCellWidth()cellHeight-getCellHeight()createdBy-getCreatedBy()createdOn-getCreatedOn()updatedBy-getUpdatedBy()updatedOn-getUpdatedOn()
-
-
Method Details
-
getIdentifier
Get the string identifier of the table.- Specified by:
getIdentifierin interfaceEntityData- Specified by:
getIdentifierin interfaceGetIdentifier- Specified by:
getIdentifierin interfacePersistentData- Returns:
- identifier or empty string
-
setIdentifier
- Specified by:
setIdentifierin interfaceEntityData- Parameters:
identifier- seegetIdentifier()
-
getGroupIdentifier
String key for grouping tables of the same type.- Returns:
- group identifier or empty string
-
setGroupIdentifier
- Parameters:
groupIdentifier- seegetGroupIdentifier()
-
getLabel
Display label for the table.- Returns:
- label or empty string
-
setLabel
- Parameters:
label- seegetLabel()
-
getVersion
Version string from the content system- Returns:
- version or empty string
-
setVersion
- Parameters:
version- seegetVersion()
-
getTimestamp
Get timestamp from the content system.Timestamp is used as a string to support differing types of timestamp representation as used by different content system. publishing server does not validate any format of this string.
- Returns:
- timestamp or empty string
-
setTimestamp
- Parameters:
timestamp- seegetTimestamp()
-
getTemplate
- Returns:
- String identifier of the template to render this content - empty string if not set.
-
setTemplate
- Parameters:
template-getTemplate()
-
getSequence
public int getSequence()Get sequence number for the table as given in the content system.This should reflect the position of the current table in the sorting of tables of its parent bucket.
- Specified by:
getSequencein interfaceGetSequence- Returns:
- ordered position within a list sequenceable objects
-
setSequence
public void setSequence(int sequence) - Parameters:
sequence- seegetSequence()
-
getCreatedBy
- Returns:
- creation user or empty string
-
setCreatedBy
- Parameters:
createdBy- seegetCreatedBy()
-
getCreatedOn
- Returns:
- creation date or
nullif not set
-
setCreatedOn
- Parameters:
createdOn- seegetCreatedOn()
-
getUpdatedBy
- Returns:
- last modified user or empty string
-
setUpdatedBy
- Parameters:
updatedBy- seegetUpdatedBy()
-
getUpdatedOn
- Returns:
- last modified date or
nullif not set
-
setUpdatedOn
- Parameters:
updatedOn- seegetUpdatedOn()
-
getConnectorEntity
- Returns:
- connector entity object or
nullif not set
-
setConnectorEntity
- Parameters:
connectorEntity- seegetConnectorEntity()
-
getEntity
- Returns:
- Entity from Entity Model
- See Also:
-
setEntity
Sets entityTableData and entityTableDataId.- Parameters:
entityTableData-getEntity()- See Also:
-
getEntityTableDataId
- Returns:
- String identifier of the tableData entity in the related entity model, e.g. "Description". Or empty string.
-
setEntityTableDataId
- Parameters:
entityTableDataId-getEntityTableDataId()
-
getBucket
- Returns:
- Parent bucket that this table is related to or
null.
-
setBucket
- Parameters:
bucket-getBucket()
-
getBucketId
- Returns:
- Identifier of parent bucket that this table element is related to. Id is not loaded by Entity Manager in its standard methods. Take id from {@link #getBucket())}.
-
setBucketId
- Parameters:
bucketId-getBucketId()
-
getContext
Get the context for this element ornullif not set.- Specified by:
getContextin interfaceEntityData- Specified by:
getContextin interfaceGetContext- Returns:
- context
-
setContext
Description copied from interface:EntityDataset the context of entity data object- Specified by:
setContextin interfaceEntityData- Parameters:
context-getContext()
-
getTableDataRows
- Returns:
- List of all rows related to the table - or empty list.
List is LAZY loaded.
-
setTableDataRows
- Parameters:
tableDataRows-getTableDataRows()
-
getMetaData
- Returns:
- List of meta data related to the table or empty list.
List is LAZY loaded.
-
setMetaData
- Parameters:
metaData- seegetMetaData()
-
getCellWidth
public float getCellWidth()- Returns:
- Default width of the cell
Default format is millimeter for comet and pixel for HTML.
Default value is 10.0.
-
setCellWidth
public void setCellWidth(float cellWidth) - Parameters:
cellWidth-getCellWidth()
-
getCellHeight
public float getCellHeight()- Returns:
- Default height of the cell
Default format is millimeter for comet and pixel for HTML.
Default value is 1.058.
-
setCellHeight
public void setCellHeight(float cellHeight) - Parameters:
cellHeight-getCellHeight()
-
getTableStyle
- Returns:
- name of table style or an empty string
-
setTableStyle
- Parameters:
tableStyle-getTableStyle()
-
getHeaderRows
public int getHeaderRows()- Returns:
- number of header rows
Caution: This might be greater than actual row count in a table.
-
setHeaderRows
public void setHeaderRows(int headerRows) - Parameters:
headerRows-getHeaderRows()
-
getCellMaxHeight
public float getCellMaxHeight()- Returns:
- max height of the cell
Default format is millimeter for comet and pixel for HTML.
-
setCellMaxHeight
public void setCellMaxHeight(float cellMaxHeight) - Parameters:
cellMaxHeight-getCellMaxHeight()
-
getLeftColumn
public int getLeftColumn()- Returns:
- number of left columns, i.e. columns using left column style
Caution: This might be greater than actual cell count in a row.
-
setLeftColumn
public void setLeftColumn(int leftColumn) - Parameters:
leftColumn-getLeftColumn()
-
getCellStyleLeftColumn
- Returns:
- name of cell style of left column(s) or an empty string
-
setCellStyleLeftColumn
- Parameters:
cellStyleLeftColumn-getCellStyleLeftColumn()
-
getRightColumn
public int getRightColumn()- Returns:
- number of right columns, i.e. columns using right column style
Caution: This might be greater than actual cell count in a row.
-
setRightColumn
public void setRightColumn(int rightColumn) - Parameters:
rightColumn-getRightColumn()
-
getCellStyleRightColumn
- Returns:
- name of cell style of right column(s) or an empty string
-
setCellStyleRightColumn
- Parameters:
cellStyleRightColumn-getCellStyleRightColumn()
-
getMaxHeight
public float getMaxHeight() -
setMaxHeight
public void setMaxHeight(float maxHeight) -
getCellMaxWidth
public float getCellMaxWidth() -
setCellMaxWidth
public void setCellMaxWidth(float cellMaxWidth) -
getCell
Get a cell by row and col index.. This does not consider rowspan or colspan, so rows may have differing numbers of columns.
- Parameters:
row- row indexcol- column index- Returns:
- table data cell found or
null
-
getOrigin
- Returns:
- Origin of data entity object, e.g. name of the source system. This property is filled by the connector. Might return
null.
-
setOrigin
- Parameters:
origin-getOrigin()
-
getEntityIdentifier
Description copied from interface:EntityDataIdentifier of an entity in the entity model where the current object refers to.- Specified by:
getEntityIdentifierin interfaceEntityData- Returns:
- entity identifier as string
-
setEntityIdentifier
Description copied from interface:EntityDataIdentifier of an entity in the entity model where the current object refers to.- Specified by:
setEntityIdentifierin interfaceEntityData
-
toString
-
getContentMetaData
- Returns:
- List of ContentMetaData related to Bucket.
List is not loaded by Entity Manager in its standard methods. Use specific Entity Manager methods for loading.
-
setContentMetaData
- Parameters:
contentMetaData-getContentMetaData()
-