Interface JsITable

All Known Subinterfaces:
JsResolvedTable
All Known Implementing Classes:
JsTable, JsTotalsTable

@TsIgnore public interface JsITable
A server-side table that the client has retained: its data and metadata can be read, and it must be closed when no longer needed. Three types are retained tables:

Only visible directly in Java, not TypeScript. Exported members are copied to subclasses instead as needed.

  • Method Details

    • getSize

      @JsProperty double getSize()
      The total count of rows in the table. If a viewport subscription is active, this size updates when the subscription updates. If not, and the table is uncoalesced, the size is JsTable.SIZE_UNCOALESCED. Otherwise, the size updates when the server's update graph processes changes.
      Returns:
      the size of the table
    • getColumns

      @JsProperty elemental2.core.ReadonlyArray<Column> getColumns()
      The columns that are present on this table.
      Returns:
      the columns present in this table
    • findColumn

      @JsMethod Column findColumn(String columnName)
      Finds a column by name.
      Parameters:
      columnName - the name of the column
      Returns:
      the column
    • getAttributes

      @JsMethod elemental2.core.ReadonlyArray<String> getAttributes()
      The names of all attributes defined on this table.
      Returns:
      an array of attributes defined on this table
    • getAttribute

      @JsMethod @JsNullable Object getAttribute(String attributeName)
      Reads an attribute's value as a string. Only primitive and string values are sent to the client. An attribute listed by getAttributes() with any other value cannot be read here.
      Parameters:
      attributeName - the name of the attribute to read
      Returns:
      the value of the attribute or null if none with that name exists
    • createSnapshot

      @JsMethod elemental2.promise.Promise<TableData> createSnapshot(@TsTypeRef(SnapshotOptions.class) @TsTypeRef(SnapshotOptions.class) Object options)
      Returns a promise of a TableData instance containing a snapshot of the current state of the table, within the bounds of the specified rows and columns.
      Parameters:
      options - the snapshot options, described in DataOptions.SnapshotOptions
      Returns:
      a promise of TableData
    • createViewportSubscription

      @JsMethod TableViewportSubscription createViewportSubscription(@TsTypeRef(ViewportSubscriptionOptions.class) @TsTypeRef(ViewportSubscriptionOptions.class) Object options)
      Creates a viewport subscription to the specified columns, across the specified rows in the table. The returned TableViewportSubscription instance allows the viewport to be changed over time, and events are fired from it when the data changes or when a viewport change is applied. Each call creates a new subscription, which must have TableViewportSubscription.close() called on it to stop it and release its resources.
      Parameters:
      options - the viewport subscription options, described in DataOptions.ViewportSubscriptionOptions
      Returns:
      a new TableViewportSubscription
    • createSubscription

      @JsMethod TableSubscription createSubscription(@TsTypeRef(SubscriptionOptions.class) @TsTypeRef(SubscriptionOptions.class) Object options)
      Creates a subscription to the specified columns, across all rows in the table. Useful for charts or taking a snapshot of the table atomically. The initial snapshot arrives in a single event, and later changes arrive as updates. However, this may still be very expensive to run from a browser for very large tables. Each call creates a new subscription, which must have AbstractTableSubscription.close() called on it to stop it and release its resources, and all events are fired from the TableSubscription instance.
      Parameters:
      options - the subscription options, described in DataOptions.SubscriptionOptions
      Returns:
      a new TableSubscription
    • close

      @JsMethod void close()
      Signals that the table is no longer used, so the server can release its resources. Logs a warning if called more than once.
    • getColumnStatistics

      @JsMethod elemental2.promise.Promise<JsColumnStatistics> getColumnStatistics(Column.ColumnOrName column)
      Computes statistics for one column of this table, such as its count, sum and average for a numeric column, or its most common values for other types.
      Parameters:
      column - the column, or the name of the column, to compute statistics for
      Returns:
      a promise of the ColumnStatistics for that column