All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sas.table
Interface DataTableInterface

All Superinterfaces:
  FormattedDataInterface, RowTemplateTableInterface, com.sas.table.StaticColumnInfoInterface, StaticColumnLabelInterface, StaticFormattedDataInterface, com.sas.table.StaticRowLabelInterface, StaticRowTemplateTableInterface, StaticTableInterface, TableInterface

All Known Implementing Classes:
  JDBCToDataTableAdapter

    public interface DataTableInterface

extends RowTemplateTableInterface, com.sas.table.StaticRowLabelInterface, StaticColumnLabelInterface, FormattedDataInterface, com.sas.table.StaticColumnInfoInterface

DataTableInterface defines an interface to a database

DataTableInterface defines methods for setting and retrieving formatted or unformatted data from a database. It supports where clause subsetting.

DataTableInterface is used in conjunction with the ROCF functionality to make an instance of the appropriate proxy for communication with the server.

See Also:
  `Rocf`

Field Summary

Fields inherited from interface com.sas.table.RowTemplateTableInterface
`DEFAULT_INDEX`

Method Summary
`void` | `close()` Closes the SAS data set if it is currently open.
`void` | `commitRow()` Commits whatever the current row in the data set is.
`int` | `getBufferBlocks()` Returns the numbr of buffer blocks.
`int` | `getBufferSize()` Returns the number of rows which the data set caching fetches a look-ahead read.
`int` | `getColumnIndex(java.lang.String columnName)` Returns the index of the specified column.
`java.lang.String` | `getColumnInfoUsed()` Returns the column information that is currently being returned as the column label.
`java.lang.String[]` | `getDisplayedColumns()` Returns which columns in the model are displayed, or null for all columns (the default).
`java.lang.String` | `getWhere()` Returns the where clause applied to the data set.
`boolean` | `isReadOnly()` Returns whether the data set is read only or editable.
`void` | `refresh()` refresh() causes the data in the dataset to be re-read from the SAS server.
`void` | `setBufferBlocks(int bufferBlocks)` Sets the data set row cache block size.
`void` | `setBufferSize(int lookAheadSize)` Sets the SAS data set buffering look-ahead size.
`void` | `setColumnInfoUsed(java.lang.String columnInfoUsed)` Sets the column information that is currently being returned as the column label.
`void` | `setDisplayedColumns(java.lang.String[] displayedColumns)` Sets which columns in the model are displayed, or returned to the user.
`void` | `setReadOnly(boolean readOnly)` Specifies whether the data set is read only or editable.
`void` | `setWhere(java.lang.String whereClause)` Specifies the where clause to apply to the data set.
`void` | `useBufferHints(com.sas.models.BufferHints hints)` Ask the local data set object to use a set of buffering hints.

Methods inherited from interface com.sas.table.RowTemplateTableInterface
`addColumn, addRow, addRow, deleteColumn, deleteRow, getColumnDefaultValue, getColumnDefaultValues, isColumnsDeletable, isColumnsExtendable, isColumnsInsertable, isColumnsRedefinable, isRowsDeletable, isRowsExtendable, isRowsInsertable, setColumnClass, setColumnDefaultValue`

Methods inherited from interface com.sas.table.StaticRowTemplateTableInterface
`getColumnClass, getColumnClasses`

Methods inherited from interface com.sas.table.TableInterface
`isCellsModifiable, isMultipleColumnUpdateSupported, isMultipleRowUpdateSupported, setCell, setCells, setColumn, setRow`

Methods inherited from interface com.sas.table.StaticTableInterface
`countColumns, countRows, getCell, getCellClass, getCellClasses, getCells, getColumn, getColumnCount, getRow, getRowCount`

Methods inherited from interface com.sas.table.StaticRowLabelInterface
`getRowLabel, getRowLabels, isRowLabelsSupported, isRowsLabelSupported`

Methods inherited from interface com.sas.table.StaticColumnLabelInterface
`getColumnLabel, getColumnLabels, isColumnLabelsSupported, isColumnsLabelSupported`

Methods inherited from interface com.sas.table.FormattedDataInterface
`setFormattedCell, setFormattedCells, setFormattedColumn, setFormattedRow`

Methods inherited from interface com.sas.table.StaticFormattedDataInterface
`getFormattedCell, getFormattedCells, getFormattedColumn, getFormattedRow`

Methods inherited from interface com.sas.table.StaticColumnInfoInterface
`getColumnInfo, getColumnInfoNames`

Method Detail

### refresh

    void refresh()

  refresh() causes the data in the dataset to be re-read from the SAS server.

### getColumnIndex

    int getColumnIndex(java.lang.String columnName)
                       throws java.lang.IllegalArgumentException,
                              com.sas.table.TableException

  Returns the index of the specified column.

  Parameters:
    `columnName` - The name of the column to return the index of. Case does not matter.
  Throws:
    `java.lang.IllegalArgumentException` - if the column is not in the data set.
    `com.sas.table.TableException` - if the column information cannot be retrieved.

### getColumnInfoUsed

    java.lang.String getColumnInfoUsed()

  Returns the column information that is currently being returned as the column label. The default is to return the NAME of the column.

  Returns:
    A String indicating the type of information to use as the column label.
  See Also:
    `setColumnInfoUsed(java.lang.String)`

### setColumnInfoUsed

    void setColumnInfoUsed(java.lang.String columnInfoUsed)
                           throws com.sas.table.TableException

  Sets the column information that is currently being returned as the column label.

  Parameters:
    `columnInfoUsed` - A String indicating the type of information to use as the column label. Case does not matter.
  Throws:
    `com.sas.table.TableException`
  See Also:
    `getColumnInfoUsed()`

### close

    void close()

  Closes the SAS data set if it is currently open.

### setWhere

    void setWhere(java.lang.String whereClause)

  Specifies the where clause to apply to the data set. The where clause is of the syntax for standard SAS data set where clauses and is not case sensitive.

  Parameters:
    `whereClause` - The where clause.
  See Also:
    `getWhere()`

### getWhere

    java.lang.String getWhere()

  Returns the where clause applied to the data set. The where clause is of the syntax for standard SAS data set where clauses.

  Returns:
    whereClause The where clause.
  See Also:
    `getWhere()`

### isReadOnly

    boolean isReadOnly()

  Returns whether the data set is read only or editable.

  Returns:
    true for read only, false for editable.
  See Also:
    `setReadOnly(boolean)`

### setReadOnly

    void setReadOnly(boolean readOnly)

  Specifies whether the data set is read only or editable.

  Parameters:
    `readOnly` - true for read only, false for editable.
  See Also:
    `setReadOnly(boolean)`

### getDisplayedColumns

    java.lang.String[] getDisplayedColumns()

  Returns which columns in the model are displayed, or null for all columns (the default). When displayed columns are specified, only those columns from the data set will be returned.

  Returns:
    displayedColumns an array of column names which are displayed. The array will be in the order in which the columns are returned.

### setDisplayedColumns

    void setDisplayedColumns(java.lang.String[] displayedColumns)

  Sets which columns in the model are displayed, or returned to the user. When displayed columns are specified, only those columns from the data set will be returned.

  Parameters:
    `displayedColumns` - an array of column names to be displayed. The array should be in the order in which the columns should be returned.

### setBufferSize

    void setBufferSize(int lookAheadSize)

  Sets the SAS data set buffering look-ahead size. When reading data from a (remote) SAS data set, reads are done a block at a time, to reduce the number of separate network method calls, then the rows are stored locally until they are purged from the internal cache. This parameter controls how many rows are read when doing this look-ahead reading. If it is critical that the data set not perform look-ahead reads, set this to 1. However, this may degrade performance.

  Also settable via useBufferHints() with a bufferHint.how = BufferHintsInterface.LOOKAHEAD_SIZE

  Parameters:
    `bufferSize` - Number of rows to read-ahead per read request. bufferSize is multiplied by buferBlocks to determine the number of rows the client side data set keeps in its internal cache.
  See Also:
    `setBufferBlocks(int)`, `getBufferSize()`, `setBufferSize(int)`

### getBufferSize

    int getBufferSize()

  Returns the number of rows which the data set caching fetches a look-ahead read.

  Returns:
    The number of rows read per look-ahead read.
  See Also:
    `setBufferSize(int)`, `setBufferBlocks(int)`, `getBufferBlocks()`

### setBufferBlocks

    void setBufferBlocks(int bufferBlocks)

  Sets the data set row cache block size. The client side data set object maintains in a local memory cache, equal to bufferBlock * bufferSize The cache size allows more efficient back-and-forth reading behavior, such as scrolling a small window of rows in a table view. With a buffer block setting larger than a window, the data set can keep more than one page of data locally, so that moving back a forth between two or three pages does not require rereading the data from the remote model. This is especially critical when the data set is a SAS data view or otherwise cannot back up to a previously read observation without rewinding to the beginning and reading all preceeding observations.

  Also settable via useBufferHints() with a bufferHint.how = BufferHintsInterface.CACHE_SIZE

  Parameters:
    `bufferBlocks` - Blocking factor. This number is multiplied by the bufferSize to determine the cache size, the number of rows to store locally in the client.
  See Also:
    `getBufferBlocks()`, `setBufferSize(int)`, `getBufferSize()`

### getBufferBlocks

    int getBufferBlocks()

  Returns the numbr of buffer blocks. Each block is bufferSize rows from the data sets.

  Returns:
    The number of buffer blocks.
  See Also:
    `setBufferBlocks(int)`, `setBufferSize(int)`, `getBufferSize()`

### commitRow

    void commitRow()

  Commits whatever the current row in the data set is.

### useBufferHints

    void useBufferHints(com.sas.models.BufferHints hints)

  Ask the local data set object to use a set of buffering hints. Use this to configure the number of rows to read ahead when doing buffered reads, or how many rows to maintain in the local client-side cache.

  The DataSet object currently supports only caching of sequential reads, and row-based caching.

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.