Class Table


  • public class Table
    extends Object
    • Method Detail

      • getName

        public Optional<String> getName()
        Returns an Optional whose value is the name of the database object to use within the SQL from clause. The value is typically the table name. May be the empty Optional if getSubqueryProvider() is non-null.
        Returns:
        an Optional with the table name as value or the empty Optional.
      • getColumns

        public List<Column> getColumns()
        Returns the immutable List of Table columns.
        Returns:
        an immutable List of Columns.
      • getPrimaryKeyColumnIds

        public Set<ColumnId> getPrimaryKeyColumnIds()
        Returns a Set of ColumnId's which represent the table's primary key columns or an empty Set. Required for jsontree and htmltree export formats.
        Returns:
        the table's primary key ColumnIds or the empty Set.
      • getDisplayName

        public String getDisplayName()
      • getDescription

        public Optional<String> getDescription()
        Returns an Optional whose value is this Table's human description or the empty Optional.
        Returns:
        An Optional with the Table's description or the empty Optional.
      • getId

        public TableId getId()
        Returns the id of the table. This id must be unique in all relational child Tables of the same parent Table.
        Returns:
        this Table's unique id.
      • getPreFilters

        public List<Filter> getPreFilters()
        Returns the List of Filter objects which should always apply to the Table if included in the export results or an empty List.
        Returns:
        the list of pre-Filters or an empty List.
      • getRelationships

        public List<Relationship> getRelationships()
      • getParentRelationship

        public Optional<Relationship> getParentRelationship()
        Returns the parent Relationship of this table or the empty Optional if this is the Report's base table.
        Returns:
        the parent Relationship or the empty Optional if this is the report's base table.
      • indexOf

        public int indexOf​(Column column)
        Returns the index of the given Column in this Table's List of Columns or an int less than 0.
        Parameters:
        column - The search column
        Returns:
        the index of the column in the Table's List of Columns or an int less than 0.
      • requireColumn

        public Column requireColumn​(ColumnId id)
        Returns the Column for the given id.
        Parameters:
        id - The id of the column to require
        Returns:
        returns the Column for the given id from the Table's list of columns.
        Throws:
        NoSuchElementException - if a Column with the given id is not found.
      • getChild

        public Optional<Table> getChild​(TableId tableId)
        Returns an Optional whose value is the Table which is an immediate child of the current table with the given TableId.
        Parameters:
        tableId - TableId which is the id of an immediate relationship child of this table.
        Returns:
        an Optional with the Table at the given TableId or the empty Optional.
      • getChild

        public Optional<Table> getChild​(TablePath path)
        Returns an Optional whose value is the Table found at the given path or the empty Optional.
        Parameters:
        path - TablePath relative to the path of this Table.
        Returns:
        an Optional with the Table at the given path or the empty Optional.
      • getChildRelationship

        public Optional<Relationship> getChildRelationship​(TablePath path)
        Returns an Optional whose value is the Relationship found at the given path or the empty Optional.
        Parameters:
        path - TablePath relative to the path of this Table.
        Returns:
        an Optional with the Relationship at the given path or the empty Optional.
      • isBaseTable

        public boolean isBaseTable()
        Returns true if this table is the base table of the Report.
        Returns:
        true if this table is the base table.
      • toString

        public String toString()
        Overrides:
        toString in class Object