Class TableData

java.lang.Object
com.priint.pubserver.plugin.entitydata.TableData
All Implemented Interfaces:
GetContext, GetIdentifier, GetSequence, EntityData, PersistentData, Serializable

@Entity public class TableData extends Object implements 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:
  • Constructor Details

  • Method Details

    • getIdentifier

      public String getIdentifier()
      Get the string identifier of the table.
      Specified by:
      getIdentifier in interface EntityData
      Specified by:
      getIdentifier in interface GetIdentifier
      Specified by:
      getIdentifier in interface PersistentData
      Returns:
      identifier or empty string
    • setIdentifier

      public void setIdentifier(String identifier)
      Specified by:
      setIdentifier in interface EntityData
      Parameters:
      identifier - see getIdentifier()
    • getGroupIdentifier

      public String getGroupIdentifier()
      String key for grouping tables of the same type.
      Returns:
      group identifier or empty string
    • setGroupIdentifier

      public void setGroupIdentifier(String groupIdentifier)
      Parameters:
      groupIdentifier - see getGroupIdentifier()
    • getLabel

      public String getLabel()
      Display label for the table.
      Returns:
      label or empty string
    • setLabel

      public void setLabel(String label)
      Parameters:
      label - see getLabel()
    • getVersion

      public String getVersion()
      Version string from the content system
      Returns:
      version or empty string
    • setVersion

      public void setVersion(String version)
      Parameters:
      version - see getVersion()
    • getTimestamp

      public 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(String timestamp)
      Parameters:
      timestamp - see getTimestamp()
    • getTemplate

      public String getTemplate()
      Returns:
      String identifier of the template to render this content - empty string if not set.
    • setTemplate

      public void setTemplate(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:
      getSequence in interface GetSequence
      Returns:
      ordered position within a list sequenceable objects
    • setSequence

      public void setSequence(int sequence)
      Parameters:
      sequence - see getSequence()
    • getCreatedBy

      public String getCreatedBy()
      Returns:
      creation user or empty string
    • setCreatedBy

      public void setCreatedBy(String createdBy)
      Parameters:
      createdBy - see getCreatedBy()
    • getCreatedOn

      public Date getCreatedOn()
      Returns:
      creation date or null if not set
    • setCreatedOn

      public void setCreatedOn(Date createdOn)
      Parameters:
      createdOn - see getCreatedOn()
    • getUpdatedBy

      public String getUpdatedBy()
      Returns:
      last modified user or empty string
    • setUpdatedBy

      public void setUpdatedBy(String updatedBy)
      Parameters:
      updatedBy - see getUpdatedBy()
    • getUpdatedOn

      public Date getUpdatedOn()
      Returns:
      last modified date or null if not set
    • setUpdatedOn

      public void setUpdatedOn(Date updatedOn)
      Parameters:
      updatedOn - see getUpdatedOn()
    • getConnectorEntity

      public ConnectorEntity getConnectorEntity()
      Returns:
      connector entity object or null if not set
    • setConnectorEntity

      public void setConnectorEntity(ConnectorEntity connectorEntity)
      Parameters:
      connectorEntity - see getConnectorEntity()
    • getEntity

      public EntityTableData getEntity()
      Returns:
      Entity from Entity Model
      See Also:
    • setEntity

      public void setEntity(EntityTableData entityTableData)
      Sets entityTableData and entityTableDataId.
      Parameters:
      entityTableData - getEntity()
      See Also:
    • getEntityTableDataId

      public String getEntityTableDataId()
      Returns:
      String identifier of the tableData entity in the related entity model, e.g. "Description". Or empty string.
    • setEntityTableDataId

      public void setEntityTableDataId(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 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(String bucketId)
      Parameters:
      bucketId - getBucketId()
    • getContext

      public Context getContext()
      Get the context for this element or null if not set.
      Specified by:
      getContext in interface EntityData
      Specified by:
      getContext in interface GetContext
      Returns:
      context
    • setContext

      public void setContext(Context context)
      Description copied from interface: EntityData
      set the context of entity data object
      Specified by:
      setContext in interface EntityData
      Parameters:
      context - getContext()
    • getTableDataRows

      public List<TableDataRow> getTableDataRows()
      Returns:
      List of all rows related to the table - or empty list.

      List is LAZY loaded.

    • setTableDataRows

      public void setTableDataRows(List<TableDataRow> tableDataRows)
      Parameters:
      tableDataRows - getTableDataRows()
    • getMetaData

      public List<KeyValue> getMetaData()
      Returns:
      List of meta data related to the table or empty list.

      List is LAZY loaded.

    • setMetaData

      public void setMetaData(List<KeyValue> metaData)
      Parameters:
      metaData - see getMetaData()
    • 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 String getTableStyle()
      Returns:
      name of table style or an empty string
    • setTableStyle

      public void setTableStyle(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 String getCellStyleLeftColumn()
      Returns:
      name of cell style of left column(s) or an empty string
    • setCellStyleLeftColumn

      public void setCellStyleLeftColumn(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 String getCellStyleRightColumn()
      Returns:
      name of cell style of right column(s) or an empty string
    • setCellStyleRightColumn

      public void setCellStyleRightColumn(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 index
      col - column index
      Returns:
      table data cell found or null
    • getOrigin

      public 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(String origin)
      Parameters:
      origin - getOrigin()
    • getEntityIdentifier

      public String getEntityIdentifier()
      Description copied from interface: EntityData
      Identifier of an entity in the entity model where the current object refers to.
      Specified by:
      getEntityIdentifier in interface EntityData
      Returns:
      entity identifier as string
    • setEntityIdentifier

      public void setEntityIdentifier(String entityIdentifier)
      Description copied from interface: EntityData
      Identifier of an entity in the entity model where the current object refers to.
      Specified by:
      setEntityIdentifier in interface EntityData
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getContentMetaData

      public 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(List<ContentMetaData> contentMetaData)
      Parameters:
      contentMetaData - getContentMetaData()