Interface Table

    • Method Detail

      • addColumn

        Column addColumn​(String id,
                         Class type)
        Adds a new column to this table.
        Parameters:
        id - the unique column identifier
        type - the column type
        Returns:
        the newly created column
      • addColumn

        Column addColumn​(String id,
                         Class type,
                         Origin origin)
        Adds a new column to this table.
        Parameters:
        id - the unique column identifier
        type - the column type
        origin - the column's origin
        Returns:
        the newly created column
      • addColumn

        Column addColumn​(String id,
                         String title,
                         Class type,
                         Object defaultValue)
        Adds a new column to this table.
        Parameters:
        id - the unique column identifier
        title - the column title
        type - the column type
        defaultValue - the default value
        Returns:
        the newly created column
      • addColumn

        Column addColumn​(String id,
                         String title,
                         Class type,
                         Origin origin,
                         Object defaultValue,
                         boolean indexed)
        Adds a new column to this table.
        Parameters:
        id - the unique column identifier
        title - the column title
        type - the column type
        origin - the column's origin
        defaultValue - the default value
        indexed - whether the column should be indexed
        Returns:
        the newly created column
      • getColumn

        Column getColumn​(int index)
        Returns the column at the given index.
        Parameters:
        index - the column's index
        Returns:
        the found column
      • getColumn

        Column getColumn​(String id)
        Returns the column with the given identifier.
        Parameters:
        id - the column's id
        Returns:
        the found column or null if not found
      • hasColumn

        boolean hasColumn​(String id)
        Returns true if this table has the column.
        Parameters:
        id - the column's identifier
        Returns:
        true if the column exists, false otherwise
      • removeColumn

        void removeColumn​(Column column)
        Removes the given column from this table.
        Parameters:
        column - the column to remove
      • removeColumn

        void removeColumn​(String id)
        Removes the given column based on its identifier from this table.
        Parameters:
        id - the column's identifier
      • countColumns

        int countColumns()
        Counts the columns in this table.
        Returns:
        the number of columns
      • countColumns

        int countColumns​(Origin origin)
        Counts the columns of the given origin.
        Parameters:
        origin - the origin
        Returns:
        the number of columns set with this origin
      • getElementClass

        Class getElementClass()
        The element class of this column.
        Returns:
        the element class
      • createTableObserver

        TableObserver createTableObserver​(boolean withDiff)
        Creates a new table observer and return it.
        Parameters:
        withDiff - true if table observer should provide column differences
        Returns:
        a newly created table observer
      • getGraph

        Graph getGraph()
        Returns the graph this table is associated with.
        Returns:
        graph
      • isNodeTable

        boolean isNodeTable()
        Returns true if this table is the node table.
        Returns:
        true if node table, false otherwise
      • isEdgeTable

        boolean isEdgeTable()
        Returns true if this table is the node table.
        Returns:
        true if node table, false otherwise
      • getLock

        TableLock getLock()
        Returns the table lock, which controls the multi-thread access to the table.
        Returns:
        table lock