Class TableData
- java.lang.Object
-
- com.priint.pubserver.plugin.entitydata.TableData
-
- All Implemented Interfaces:
GetContext,GetIdentifier,GetSequence,EntityData,PersistentData,java.io.Serializable
@Entity public class TableData extends java.lang.Object implements java.io.Serializable, GetContext, GetIdentifier, GetSequence, EntityData, PersistentData
TableData object related to a bucket.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:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTableData.properties
-
Constructor Summary
Constructors Constructor Description TableData()Default constructorTableData(java.lang.String identifier, java.lang.String groupIdentifier, java.lang.String label, java.lang.String bucketId, Context context, float cellWidth, float cellHeight, java.lang.String createdBy, java.util.Date createdOn, java.lang.String updatedBy, java.util.Date updatedOn)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BucketgetBucket()java.lang.StringgetBucketId()TableDataCellgetCell(int row, int col)Get a cell by row and col index.floatgetCellHeight()floatgetCellMaxHeight()floatgetCellMaxWidth()java.lang.StringgetCellStyleLeftColumn()java.lang.StringgetCellStyleRightColumn()floatgetCellWidth()ConnectorEntitygetConnectorEntity()java.util.List<ContentMetaData>getContentMetaData()ContextgetContext()Get the context for this element ornullif not set.java.lang.StringgetCreatedBy()java.util.DategetCreatedOn()EntityTableDatagetEntity()java.lang.StringgetEntityIdentifier()Identifier of an entity in the entity model where the current object refers to.java.lang.StringgetEntityTableDataId()intgetFooterRows()java.lang.StringgetGroupIdentifier()String key for grouping tables of the same type.intgetHeaderRows()java.lang.StringgetIdentifier()Get the string identifier of the table.java.lang.StringgetLabel()Display label for the table.intgetLeftColumn()floatgetMaxHeight()java.util.List<KeyValue>getMetaData()java.lang.StringgetOrigin()intgetRightColumn()intgetSequence()Get sequence number for the table as given in the content system.java.util.List<TableDataRow>getTableDataRows()java.lang.StringgetTableStyle()java.lang.StringgetTemplate()java.lang.StringgetTimestamp()Get timestamp from the content system.java.lang.StringgetUpdatedBy()java.util.DategetUpdatedOn()java.lang.StringgetVersion()Version string from the content systemvoidsetBucket(Bucket bucket)voidsetBucketId(java.lang.String bucketId)voidsetCellHeight(float cellHeight)voidsetCellMaxHeight(float cellMaxHeight)voidsetCellMaxWidth(float cellMaxWidth)voidsetCellStyleLeftColumn(java.lang.String cellStyleLeftColumn)voidsetCellStyleRightColumn(java.lang.String cellStyleRightColumn)voidsetCellWidth(float cellWidth)voidsetConnectorEntity(ConnectorEntity connectorEntity)voidsetContentMetaData(java.util.List<ContentMetaData> contentMetaData)voidsetContext(Context context)set the context of entity data objectvoidsetCreatedBy(java.lang.String createdBy)voidsetCreatedOn(java.util.Date createdOn)voidsetEntity(EntityTableData entityTableData)Sets entityTableData and entityTableDataId.voidsetEntityIdentifier(java.lang.String entityIdentifier)Identifier of an entity in the entity model where the current object refers to.voidsetEntityTableDataId(java.lang.String entityTableDataId)voidsetFooterRows(int footerRows)voidsetGroupIdentifier(java.lang.String groupIdentifier)voidsetHeaderRows(int headerRows)voidsetIdentifier(java.lang.String identifier)voidsetLabel(java.lang.String label)voidsetLeftColumn(int leftColumn)voidsetMaxHeight(float maxHeight)voidsetMetaData(java.util.List<KeyValue> metaData)voidsetOrigin(java.lang.String origin)voidsetRightColumn(int rightColumn)voidsetSequence(int sequence)voidsetTableDataRows(java.util.List<TableDataRow> tableDataRows)voidsetTableStyle(java.lang.String tableStyle)voidsetTemplate(java.lang.String template)voidsetTimestamp(java.lang.String timestamp)voidsetUpdatedBy(java.lang.String updatedBy)voidsetUpdatedOn(java.util.Date updatedOn)voidsetVersion(java.lang.String version)java.lang.StringtoString()
-
-
-
Constructor Detail
-
TableData
public TableData()
Default constructor
-
TableData
public TableData(java.lang.String identifier, java.lang.String groupIdentifier, java.lang.String label, java.lang.String bucketId, Context context, float cellWidth, float cellHeight, java.lang.String createdBy, java.util.Date createdOn, java.lang.String updatedBy, java.util.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 Detail
-
getIdentifier
public java.lang.String 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
public void setIdentifier(java.lang.String identifier)
- Specified by:
setIdentifierin interfaceEntityData- Parameters:
identifier- seegetIdentifier()
-
getGroupIdentifier
public java.lang.String getGroupIdentifier()
String key for grouping tables of the same type.- Returns:
- group identifier or empty string
-
setGroupIdentifier
public void setGroupIdentifier(java.lang.String groupIdentifier)
- Parameters:
groupIdentifier- seegetGroupIdentifier()
-
getLabel
public java.lang.String getLabel()
Display label for the table.- Returns:
- label or empty string
-
setLabel
public void setLabel(java.lang.String label)
- Parameters:
label- seegetLabel()
-
getVersion
public java.lang.String getVersion()
Version string from the content system- Returns:
- version or empty string
-
setVersion
public void setVersion(java.lang.String version)
- Parameters:
version- seegetVersion()
-
getTimestamp
public java.lang.String 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
public void setTimestamp(java.lang.String timestamp)
- Parameters:
timestamp- seegetTimestamp()
-
getTemplate
public java.lang.String getTemplate()
- Returns:
- String identifier of the template to render this content - empty string if not set.
-
setTemplate
public void setTemplate(java.lang.String template)
- 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
public java.lang.String getCreatedBy()
- Returns:
- creation user or empty string
-
setCreatedBy
public void setCreatedBy(java.lang.String createdBy)
- Parameters:
createdBy- seegetCreatedBy()
-
getCreatedOn
public java.util.Date getCreatedOn()
- Returns:
- creation date or
nullif not set
-
setCreatedOn
public void setCreatedOn(java.util.Date createdOn)
- Parameters:
createdOn- seegetCreatedOn()
-
getUpdatedBy
public java.lang.String getUpdatedBy()
- Returns:
- last modified user or empty string
-
setUpdatedBy
public void setUpdatedBy(java.lang.String updatedBy)
- Parameters:
updatedBy- seegetUpdatedBy()
-
getUpdatedOn
public java.util.Date getUpdatedOn()
- Returns:
- last modified date or
nullif not set
-
setUpdatedOn
public void setUpdatedOn(java.util.Date updatedOn)
- Parameters:
updatedOn- seegetUpdatedOn()
-
getConnectorEntity
public ConnectorEntity getConnectorEntity()
- Returns:
- connector entity object or
nullif not set
-
setConnectorEntity
public void setConnectorEntity(ConnectorEntity connectorEntity)
- Parameters:
connectorEntity- seegetConnectorEntity()
-
getEntity
public EntityTableData getEntity()
- Returns:
- Entity from Entity Model
- See Also:
getEntityTableDataId()
-
setEntity
public void setEntity(EntityTableData entityTableData)
Sets entityTableData and entityTableDataId.- Parameters:
entityTableData-getEntity()- See Also:
setEntityTableDataId(String)
-
getEntityTableDataId
public java.lang.String getEntityTableDataId()
- Returns:
- String identifier of the tableData entity in the related entity model, e.g. "Description". Or empty string.
-
setEntityTableDataId
public void setEntityTableDataId(java.lang.String entityTableDataId)
- Parameters:
entityTableDataId-getEntityTableDataId()
-
getBucket
public Bucket getBucket()
- Returns:
- Parent bucket that this table is related to or
null.
-
setBucket
public void setBucket(Bucket bucket)
- Parameters:
bucket-getBucket()
-
getBucketId
public java.lang.String 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
public void setBucketId(java.lang.String bucketId)
- Parameters:
bucketId-getBucketId()
-
getContext
public Context getContext()
Get the context for this element ornullif not set.- Specified by:
getContextin interfaceEntityData- Specified by:
getContextin interfaceGetContext- Returns:
- context
-
setContext
public void setContext(Context context)
Description copied from interface:EntityDataset the context of entity data object- Specified by:
setContextin interfaceEntityData- Parameters:
context-getContext()
-
getTableDataRows
public java.util.List<TableDataRow> getTableDataRows()
- Returns:
- List of all rows related to the table - or empty list.
List is LAZY loaded.
-
setTableDataRows
public void setTableDataRows(java.util.List<TableDataRow> tableDataRows)
- Parameters:
tableDataRows-getTableDataRows()
-
getMetaData
public java.util.List<KeyValue> getMetaData()
- Returns:
- List of meta data related to the table or empty list.
List is LAZY loaded.
-
setMetaData
public void setMetaData(java.util.List<KeyValue> metaData)
- 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
public java.lang.String getTableStyle()
- Returns:
- name of table style or an empty string
-
setTableStyle
public void setTableStyle(java.lang.String tableStyle)
- 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()
-
getFooterRows
public int getFooterRows()
- Returns:
- number of footer rows
Caution: This might be greater than actual row count in a table.
-
setFooterRows
public void setFooterRows(int footerRows)
- Parameters:
footerRows-getFooterRows()
-
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
public java.lang.String getCellStyleLeftColumn()
- Returns:
- name of cell style of left column(s) or an empty string
-
setCellStyleLeftColumn
public void setCellStyleLeftColumn(java.lang.String cellStyleLeftColumn)
- 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
public java.lang.String getCellStyleRightColumn()
- Returns:
- name of cell style of right column(s) or an empty string
-
setCellStyleRightColumn
public void setCellStyleRightColumn(java.lang.String cellStyleRightColumn)
- Parameters:
cellStyleRightColumn-getCellStyleRightColumn()
-
getMaxHeight
public float getMaxHeight()
-
setMaxHeight
public void setMaxHeight(float maxHeight)
-
getCellMaxWidth
public float getCellMaxWidth()
-
setCellMaxWidth
public void setCellMaxWidth(float cellMaxWidth)
-
getCell
public TableDataCell getCell(int row, int col)
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
public java.lang.String 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
public void setOrigin(java.lang.String origin)
- Parameters:
origin-getOrigin()
-
getEntityIdentifier
public java.lang.String 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
public void setEntityIdentifier(java.lang.String entityIdentifier)
Description copied from interface:EntityDataIdentifier of an entity in the entity model where the current object refers to.- Specified by:
setEntityIdentifierin interfaceEntityData
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getContentMetaData
public java.util.List<ContentMetaData> 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
public void setContentMetaData(java.util.List<ContentMetaData> contentMetaData)
- Parameters:
contentMetaData-getContentMetaData()
-
-