Interface Table<K extends Comparable<? super K>,​R extends Row<K,​?>>

    • Method Detail

      • getModel

        Model getModel()
        Gets the model this table is part of.
      • clearCaches

        default void clearCaches()
        Clears the caches for this table that apply to the current thread. This is used to end a caching session, generally short-term and associated with a single request or process. Any overriding method should call super.clearCaches().
      • tableUpdated

        default void tableUpdated()
        Called after the table is updated to ensure cache integrity. Cache coherency is maintained between users for global tables. For per-user caches only your own view is affected; no updates will be seen until the end of their caching transaction, generally a web request. Any overriding method should call super.tableUpdated().
      • getSize

        default int getSize()
                     throws SQLException
        Gets the number of accessible rows in this table. This also provides JavaBeans-compatible size.
        Throws:
        SQLException
      • getMap

        Map<K,​? extends R> getMap()
        Gets a map view of this table.
      • getSortedMap

        SortedMap<K,​? extends R> getSortedMap()
        Gets a sorted map view of this table.
      • getName

        default String getName()
        Gets the table name.
      • getUnsortedRows

        Set<? extends R> getUnsortedRows()
                                  throws SQLException
        Gets all rows in no particular order. This is an unmodifiable snapshot of the data and will not change over time. It may be iterated multiple times with the same results. The contents are not changed by the transactions of the current user or any other user.
        Throws:
        SQLException
      • getRows

        SortedSet<? extends R> getRows()
                                throws SQLException
        Gets all rows, sorted by their natural ordering. This is an unmodifiable snapshot of the data and will not change over time. It may be iterated multiple times with the same results. The contents are not changed by the transactions of the current user or any other user.
        Throws:
        SQLException
      • canonicalize

        default K canonicalize​(K key)
        Gets the canonical key used for internal indexing. In the case of case- insensitive matching, the key may have upper-case and lower-case matches, while the canonicalKey will convert to one format for matching. Any matches are performed on the canonical form the the query.
      • getOrderedRows

        default Set<? extends R> getOrderedRows​(Iterable<? extends K> keys)
                                         throws NoRowException,
                                                SQLException
        Gets an unmodifiable set of each object corresponding to the set of keys. The elements will be in the set in the same order as the keys iterator. If a key is found twice, the element we be in the position of the first key. This is an unmodifiable snapshot of the data and will not change over time. It may be iterated multiple times with the same results. The contents are not changed by the transactions of the current user or any other user.
        Throws:
        NoRowException - if any key is not found
        SQLException - if database error occurs
      • getRows

        default SortedSet<? extends R> getRows​(Iterable<? extends K> keys)
                                        throws NoRowException,
                                               SQLException
        Gets an unmodifiable sorted set of each object corresponding to the set of keys, sorted by their natural ordering. This is an unmodifiable snapshot of the data and will not change over time. It may be iterated multiple times with the same results. The contents are not changed by the transactions of the current user or any other user.
        Throws:
        NoRowException - if any key is not found
        SQLException - if database error occurs