Inherits com.dbSpaces.jdb.Base.
Public Member Functions | |
dtRtnStatus | clearCache () throws DatabaseException |
dtRtnStatus | clearRow (boolean sendRequestToServer) throws DatabaseException |
dtRtnStatus | close () throws DatabaseException |
boolean | find () throws DatabaseException |
boolean | first () throws DatabaseException |
NavigationColumn | getColumn (int columnIndex) throws DatabaseException |
NavigationColumn | getColumn (String columnName) throws DatabaseException |
ArrayList< NavigationColumn > | getColumns () throws DatabaseException |
String | getCursorName () |
int | getBatchUpdateSize () |
int | getFetchSize () |
String | getName () |
String | getPartitionName () |
String | getPathOverride () |
dtRtnStatus | getRow (byte[] buffer) throws DatabaseException |
int | getRowNumber () |
int | getRowSize () |
int | getRowsProcessed () throws DatabaseException |
String | getSchemaName () |
boolean | hasNullableColumns () |
boolean | isFormatFixed () |
boolean | isFormatVariable () |
boolean | isOpen () |
boolean | isOpenForInput () |
boolean | isOpenForOutput () |
boolean | isOpenForIO () |
boolean | isOrganisationIndexed () |
boolean | isOrganisationMeta () |
boolean | isOrganisationRelative () |
boolean | isOrganisationSequential () |
boolean | IsOrganisationText () |
boolean | last () throws DatabaseException |
boolean | lock () throws DatabaseException |
boolean | match () throws DatabaseException |
boolean | next () throws DatabaseException |
dtRtnStatus | openForInput (String schemaName, String tableName) throws DatabaseException |
dtRtnStatus | openForInput (String schemaName, String tableName, String partitionName) throws DatabaseException |
dtRtnStatus | openForInput (String schemaName, String tableName, String partitionName, String path) throws DatabaseException |
dtRtnStatus | openForOutput (String schemaName, String tableName) throws DatabaseException |
dtRtnStatus | openForOutput (String schemaName, String tableName, String partitionName) throws DatabaseException |
dtRtnStatus | openForOutput (String schemaName, String tableName, String partitionName, String path) throws DatabaseException |
dtRtnStatus | openForIO (String schemaName, String tableName) throws DatabaseException |
dtRtnStatus | openForIO (String schemaName, String tableName, String partitionName) throws DatabaseException |
dtRtnStatus | openForIO (String schemaName, String tableName, String partitionName, String path) throws DatabaseException |
void | setBatchUpdateSize (int size) |
void | setCursorName (String name) |
dtRtnStatus | setFetchSize (int size) throws DatabaseException |
void | setRowNumber (int rowNumber) |
void | setSearchTypeEquals () |
void | setSearchTypeLessThanEquals () |
void | setSearchTypeGreaterThanEquals () |
void | setSearchTypeNotEquals () |
void | setSearchTypeLessThan () |
void | setSearchTypeGreaterThan () |
dtRtnStatus | setIndex (int indexNumber) throws DatabaseException |
boolean | delete () throws DatabaseException |
boolean | prev () throws DatabaseException |
boolean | insert () throws DatabaseException |
boolean | update () throws DatabaseException |
boolean | start () throws DatabaseException |
boolean | unlock () throws DatabaseException |
dtRtnStatus | setLockModeNone () throws DatabaseException |
dtRtnStatus | setLockModeRead (boolean enable) throws DatabaseException |
dtRtnStatus | setLockModeReadNoWait (boolean enable) throws DatabaseException |
dtRtnStatus | setLockModeReadKeep (boolean enable) throws DatabaseException |
dtRtnStatus | setLockModeWrite (boolean enable) throws DatabaseException |
dtRtnStatus | setLockModeWriteNoWait (boolean enable) throws DatabaseException |
dtRtnStatus | setLockModeKeep (boolean enable) throws DatabaseException |
dtRtnStatus | setLockModeIgnore (boolean enable) throws DatabaseException |
dtRtnStatus | setLockModeShared (boolean enable) throws DatabaseException |
Protected Member Functions | |
NavigationTable (Navigation navigation) throws DatabaseException | |
The Navigational Table object repesents a table in the database. The Navigational Table object is the main object used to access tables in a database.
A NavigationalTable object is created using the Navigation object.
A DatabaseException will be thrown if a database error occurs and exceptions are enabled. If exceptions are not enabled the following error methods can be used to get information about the error;
|
protected |
Constructor for the NavigationTable object.
navigation | The Navigation object |
DatabaseException | (if exceptions are enabled) when a database error occurs. |
dtRtnStatus com.dbSpaces.jdb.NavigationTable.clearCache | ( | ) | throws DatabaseException |
Clear the row cache. If caching is enabled read requests will fetch the row required and a number of rows after based on settings ini file settings.
DatabaseException | (if exceptions are enabled) when a database error occurs. |
dtRtnStatus com.dbSpaces.jdb.NavigationTable.clearRow | ( | boolean | sendRequestToServer | ) | throws DatabaseException |
Clear the values in the table row buffer. The default is to clear both the client and database row buffer for the table.
sendRequestToServer | If false only the table row buffer in the client will be cleared. |
DatabaseException | (if exceptions are enabled) when a database error occurs. |
dtRtnStatus com.dbSpaces.jdb.NavigationTable.close | ( | ) | throws DatabaseException |
Close the table if it is open. If the table is part of a transaction it will not be physically closed until a commit or rollback has been performed.
DatabaseException | (if exceptions are enabled) when a database error occurs. |
boolean com.dbSpaces.jdb.NavigationTable.delete | ( | ) | throws DatabaseException |
Delete the current row from the table.
true
if successful; otherwise use getErrorXXX() methods to get reason for failure. DatabaseException | (if exceptions are enabled) when a database error occurs. |
boolean com.dbSpaces.jdb.NavigationTable.find | ( | ) | throws DatabaseException |
Perform a position read on the table that matches the key based on the selected index. If an index has not been selected using the SetIndex() method, the database will choose the best index based on the current column values.
If the search type has not been set then the default type 'Equals' is used.
NOTE: Only valid for tables that have the organization type Index.
true>
if successful; false
if otherwise. DatabaseException | (if exceptions are enabled) when a database error occurs. |
boolean com.dbSpaces.jdb.NavigationTable.first | ( | ) | throws DatabaseException |
Retrieve the first row in table.
If the table's organization type is Index then if the index has not been set using the setIndex() method, the primary index will be used to retrieve the first row.
true>
if successful; false
if otherwise. DatabaseException | (if exceptions are enabled) when a database error occurs. |
int com.dbSpaces.jdb.NavigationTable.getBatchUpdateSize | ( | ) |
Get the batch update size used for caching table updates etc.
NavigationColumn com.dbSpaces.jdb.NavigationTable.getColumn | ( | int | columnIndex | ) | throws DatabaseException |
Get a column using the column's ordinal position.
columnIndex | The first column is 1, the second is 2, ... |
DatabaseException | (if exceptions are enabled) when a database error occurs. |
NavigationColumn com.dbSpaces.jdb.NavigationTable.getColumn | ( | String | columnName | ) | throws DatabaseException |
Get a column using the column's name.
columnName | String |
DatabaseException | (if exceptions are enabled) when a database error occurs. |
ArrayList< NavigationColumn > com.dbSpaces.jdb.NavigationTable.getColumns | ( | ) | throws DatabaseException |
Get a list of all the table columns.
DatabaseException | (if exceptions are enabled) when a database error occurs. |
String com.dbSpaces.jdb.NavigationTable.getCursorName | ( | ) |
Get the cursor name for the table. When a table is opened it is opened with it's own cursor for accessing data in the database.
int com.dbSpaces.jdb.NavigationTable.getFetchSize | ( | ) |
Get the fetch size for returning rows into the local table cache. The default value is obtained from the Connection object.
String com.dbSpaces.jdb.NavigationTable.getName | ( | ) |
Get the name of the table
String com.dbSpaces.jdb.NavigationTable.getPartitionName | ( | ) |
Get the partition name the table was opened with. If the NavigationTable object was opened with a specified partition name, then the partition name can be obtained using this method.
String com.dbSpaces.jdb.NavigationTable.getPathOverride | ( | ) |
Get the path that overrides the table default path. The path override will have been specified when the table was open.
dtRtnStatus com.dbSpaces.jdb.NavigationTable.getRow | ( | byte[] | buffer | ) | throws DatabaseException |
Gets the current row buffer. The buffer provided should be large enough to hold the entire row buffer.
buffer | The output buffer |
DatabaseException | (if exceptions are enabled) when a database error occurs. |
int com.dbSpaces.jdb.NavigationTable.getRowNumber | ( | ) |
Get the current row number. If the table is based on the organization type Relative, then the current row number will be returned.
int com.dbSpaces.jdb.NavigationTable.getRowSize | ( | ) |
Get the table's row size as a number of bytes.
int com.dbSpaces.jdb.NavigationTable.getRowsProcessed | ( | ) | throws DatabaseException |
Get the number of rows processed when performing a delete, insert or update request for the table.
DatabaseException | (if exceptions are enabled) when a database error occurs. |
String com.dbSpaces.jdb.NavigationTable.getSchemaName | ( | ) |
Get the schema name that the table was opened with.
boolean com.dbSpaces.jdb.NavigationTable.hasNullableColumns | ( | ) |
Checks whether the table has any columns that are nullable.
true>
if nullable columns exist; false
if otherwise. boolean com.dbSpaces.jdb.NavigationTable.insert | ( | ) | throws DatabaseException |
Insert the current row into the table.
true>
if successful; false
if otherwise. DatabaseException | (if exceptions are enabled) when a database error occurs. |
boolean com.dbSpaces.jdb.NavigationTable.isFormatFixed | ( | ) |
Checks if the table's row format is of a fixed size.
boolean com.dbSpaces.jdb.NavigationTable.isFormatVariable | ( | ) |
Checks if the table's row format is of a variable size.
boolean com.dbSpaces.jdb.NavigationTable.isOpen | ( | ) |
Checks if the table is open.
boolean com.dbSpaces.jdb.NavigationTable.isOpenForInput | ( | ) |
Checks if the table is open for input input.
boolean com.dbSpaces.jdb.NavigationTable.isOpenForIO | ( | ) |
Checks if the table is open both for input and output.
boolean com.dbSpaces.jdb.NavigationTable.isOpenForOutput | ( | ) |
Checks if the table is open output only.
boolean com.dbSpaces.jdb.NavigationTable.isOrganisationIndexed | ( | ) |
Checks if the table's organization type is Indexed.
boolean com.dbSpaces.jdb.NavigationTable.isOrganisationMeta | ( | ) |
Checks if the table's organization type is Meta.
boolean com.dbSpaces.jdb.NavigationTable.isOrganisationRelative | ( | ) |
Checks if the table's organization type is Relative.
boolean com.dbSpaces.jdb.NavigationTable.isOrganisationSequential | ( | ) |
Checks if the table's organization type is Sequential.
boolean com.dbSpaces.jdb.NavigationTable.IsOrganisationText | ( | ) |
Checks if the table's organization is Text.
boolean com.dbSpaces.jdb.NavigationTable.last | ( | ) | throws DatabaseException |
Get the last row in the table.
true>
if successful; false
if otherwise. DatabaseException | (if exceptions are enabled) when a database error occurs. |
boolean com.dbSpaces.jdb.NavigationTable.lock | ( | ) | throws DatabaseException |
Lock the current row for the table.
true>
if successful; false
if otherwise. DatabaseException | (if exceptions are enabled) when a database error occurs. |
boolean com.dbSpaces.jdb.NavigationTable.match | ( | ) | throws DatabaseException |
Get the next row in table that matches the current search key.
true>
if successful; false
if otherwise. DatabaseException | (if exceptions are enabled) when a database error occurs. |
boolean com.dbSpaces.jdb.NavigationTable.next | ( | ) | throws DatabaseException |
Get the next row in the table starting from the current row position.
If the table's organization type is Index, then the order in which the row will be retrieved will be based on the currently select index.
If a positioned read request such as Find() or First() has not been previously performed then the first row will be returned.
true>
if successful; false
if otherwise. DatabaseException | (if exceptions are enabled) when a database error occurs. |
dtRtnStatus com.dbSpaces.jdb.NavigationTable.openForInput | ( | String | schemaName, |
String | tableName | ||
) | throws DatabaseException |
Open for input.
schemaName | - schema that the table belongs to. |
tableName | - table to open. |
DatabaseException | (if exceptions are enabled) when a database error occurs. |
dtRtnStatus com.dbSpaces.jdb.NavigationTable.openForInput | ( | String | schemaName, |
String | tableName, | ||
String | partitionName | ||
) | throws DatabaseException |
Open for input.
If a partition name is provided then only that partition will be opened for the table.
schemaName | - schema that the table belongs to. |
tableName | - table to open. |
partitionName | - the partition to open; if not provided all partitons are opened. |
DatabaseException | (if exceptions are enabled) when a database error occurs. |
dtRtnStatus com.dbSpaces.jdb.NavigationTable.openForInput | ( | String | schemaName, |
String | tableName, | ||
String | partitionName, | ||
String | path | ||
) | throws DatabaseException |
Open for input.
If a partition name is provided then only that partition will be opened for the table.
If a path is provided then this path will override the default path for the the table. Can only be used with a table that does not have multiple partitions.
schemaName | - schema that the table belongs to. |
tableName | - table to open. |
partitionName | - the partition to open; if not provided all partitons are opened. |
path | - overriding path to use instead of the table's default path. |
DatabaseException | (if exceptions are enabled) when a database error occurs. |
dtRtnStatus com.dbSpaces.jdb.NavigationTable.openForIO | ( | String | schemaName, |
String | tableName | ||
) | throws DatabaseException |
Open for Input-Output.
schemaName | - schema that the table belongs to. |
tableName | - table to open. |
DatabaseException | (if exceptions are enabled) when a database error occurs. |
dtRtnStatus com.dbSpaces.jdb.NavigationTable.openForIO | ( | String | schemaName, |
String | tableName, | ||
String | partitionName | ||
) | throws DatabaseException |
Open for Input-Output.
If a partition name is provided then only that partition will be opened for the table.
schemaName | - schema that the table belongs to. |
tableName | - table to open. |
partitionName | - the partition to open; if not provided all partitons are opened. |
DatabaseException | (if exceptions are enabled) when a database error occurs. |
dtRtnStatus com.dbSpaces.jdb.NavigationTable.openForIO | ( | String | schemaName, |
String | tableName, | ||
String | partitionName, | ||
String | path | ||
) | throws DatabaseException |
Open for Input-Output.
If a partition name is provided then only that partition will be opened for the table.
If a path is provided then this path will override the default path for the the table. Can only be used with a table that does not have multiple partitions.
schemaName | - schema that the table belongs to. |
tableName | - table to open. |
partitionName | - the partition to open; if not provided all partitons are opened. |
path | - overriding path to use instead of the table's default path. |
DatabaseException | (if exceptions are enabled) when a database error occurs. |
dtRtnStatus com.dbSpaces.jdb.NavigationTable.openForOutput | ( | String | schemaName, |
String | tableName | ||
) | throws DatabaseException |
Open for output.
schemaName | - schema that the table belongs to. |
tableName | - table to open. |
DatabaseException | (if exceptions are enabled) when a database error occurs. |
dtRtnStatus com.dbSpaces.jdb.NavigationTable.openForOutput | ( | String | schemaName, |
String | tableName, | ||
String | partitionName | ||
) | throws DatabaseException |
Open for output.
If a partition name is provided then only that partition will be opened for the table.
schemaName | - schema that the table belongs to. |
tableName | - table to open. |
partitionName | - the partition to open; if not provided all partitons are opened. |
DatabaseException | (if exceptions are enabled) when a database error occurs. |
dtRtnStatus com.dbSpaces.jdb.NavigationTable.openForOutput | ( | String | schemaName, |
String | tableName, | ||
String | partitionName, | ||
String | path | ||
) | throws DatabaseException |
Open for output.
If a partition name is provided then only that partition will be opened for the table.
If a path is provided then this path will override the default path for the the table. Can only be used with a table that does not have multiple partitions.
schemaName | - schema that the table belongs to. |
tableName | - table to open. |
partitionName | - the partition to open; if not provided all partitons are opened. |
path | - overriding path to use instead of the table's default path. |
DatabaseException | (if exceptions are enabled) when a database error occurs. |
boolean com.dbSpaces.jdb.NavigationTable.prev | ( | ) | throws DatabaseException |
Get the next row in the table starting from the current row position.
If the table's organization type is Index, then the order in which the row will be retrieved will be based on the currently select index.
If a positioned read request such as Find() or First() has not been previously performed then the first row will be returned.
true>
if successful; false
if otherwise. DatabaseException | (if exceptions are enabled) when a database error occurs. |
void com.dbSpaces.jdb.NavigationTable.setBatchUpdateSize | ( | int | size | ) |
Set the batch update size for caching the inserts, deletes and updates. The batch update size is the number of rows to cache locally of inserts, deletes and updates before sending to the database. Overrides the setting in client.ini.
size | - size of the batch. |
void com.dbSpaces.jdb.NavigationTable.setCursorName | ( | String | name | ) |
Set the cursor name for the table. When a table is open it is assigned a cursor for accessing rows of data. This method allows the cursor name to be set instead of an internal assigned name.
name | - cursor name. |
dtRtnStatus com.dbSpaces.jdb.NavigationTable.setFetchSize | ( | int | size | ) | throws DatabaseException |
Set the fetch size when retrieving rows from the database. If caching is enabled then when a read request is made to the database then the number of rows fetch including the row required and the rows after it is based on the fetch size.
size | - the number of rows to fetch. |
DatabaseException | (if exceptions are enabled) when a database error occurs. |
dtRtnStatus com.dbSpaces.jdb.NavigationTable.setIndex | ( | int | indexNumber | ) | throws DatabaseException |
Set the index to use for positioned reads using the index number.
indexNumber | - Index number to use. |
DatabaseException | (if exceptions are enabled) when a database error occurs. |
dtRtnStatus com.dbSpaces.jdb.NavigationTable.setLockModeIgnore | ( | boolean | enable | ) | throws DatabaseException |
Set the lock mode to ignore locks. If set then any read read requests on locked rows will ignore the lock and return the row.
DatabaseException | (if exceptions are enabled) when a database error occurs. |
dtRtnStatus com.dbSpaces.jdb.NavigationTable.setLockModeKeep | ( | boolean | enable | ) | throws DatabaseException |
Set the lock mode to keep any locks obtained by a read or write. Any successful locks are kept until an Unlock, Commit or Rollback request is made.
DatabaseException | (if exceptions are enabled) when a database error occurs. |
dtRtnStatus com.dbSpaces.jdb.NavigationTable.setLockModeNone | ( | ) | throws DatabaseException |
Set the lock mode to none.
DatabaseException | (if exceptions are enabled) when a database error occurs. |
dtRtnStatus com.dbSpaces.jdb.NavigationTable.setLockModeRead | ( | boolean | enable | ) | throws DatabaseException |
Set the lock mode to lock on read. If the row is already locked the method will wait until the row is unlocked and then attempt to obtain a lock.
DatabaseException | (if exceptions are enabled) when a database error occurs. |
dtRtnStatus com.dbSpaces.jdb.NavigationTable.setLockModeReadKeep | ( | boolean | enable | ) | throws DatabaseException |
Set the lock mode to lock on read and keep the lock. If successful the lock will be kept even if other read requests are made until an Unlock, Commit or Rollback request is made. If the row is already locked the method will wait until the row is unlocked and then attempt to obtain a lock.
DatabaseException | (if exceptions are enabled) when a database error occurs. |
dtRtnStatus com.dbSpaces.jdb.NavigationTable.setLockModeReadNoWait | ( | boolean | enable | ) | throws DatabaseException |
Set the lock mode to lock on read with no wait. If the row is already locked the method will return without waiting for the current lock to be released.
DatabaseException | (if exceptions are enabled) when a database error occurs. |
dtRtnStatus com.dbSpaces.jdb.NavigationTable.setLockModeShared | ( | boolean | enable | ) | throws DatabaseException |
Set the lock mode to shared locks. If a row is already locked and you attempt to lock the same row then the lock is shared and not released until the row is unlocked by all users.
DatabaseException | (if exceptions are enabled) when a database error occurs. |
dtRtnStatus com.dbSpaces.jdb.NavigationTable.setLockModeWrite | ( | boolean | enable | ) | throws DatabaseException |
Set the lock mode to lock on a writing a row. A lock will be attempted before trying to write/update a row. If the row is already locked the method will wait until the row is unlocked and then attempt to obtain a lock.
DatabaseException | (if exceptions are enabled) when a database error occurs. |
dtRtnStatus com.dbSpaces.jdb.NavigationTable.setLockModeWriteNoWait | ( | boolean | enable | ) | throws DatabaseException |
Set the lock mode to lock on a writing a row with no wait. If the row is already locked any write/update requests will return without waiting for the current lock to be released.
DatabaseException | (if exceptions are enabled) when a database error occurs. |
void com.dbSpaces.jdb.NavigationTable.setRowNumber | ( | int | rowNumber | ) |
Set the row number. If the table's organization type is Relative you can find a row by setting it's number followed by a find request.
rowNumber | A Row number to find. |
void com.dbSpaces.jdb.NavigationTable.setSearchTypeEquals | ( | ) |
Set the search type to Equals. If the table's organization is indexed before issuing a positioned read request you can set how the key is matched for a successful read. The search type Equals is the default search type.
void com.dbSpaces.jdb.NavigationTable.setSearchTypeGreaterThan | ( | ) |
Set the search type to Greater Than. If the table's organization is indexed before issuing a positioned read request you can set how the key is matched for a successful read.
void com.dbSpaces.jdb.NavigationTable.setSearchTypeGreaterThanEquals | ( | ) |
Set the search type to Greater Than Equals. If the table's organization is indexed before issuing a positioned read request you can set how the key is matched for a successful read.
void com.dbSpaces.jdb.NavigationTable.setSearchTypeLessThan | ( | ) |
Set the search type to Less Than. If the table's organization is indexed before issuing a positioned read request you can set how the key is matched for a successful read.
void com.dbSpaces.jdb.NavigationTable.setSearchTypeLessThanEquals | ( | ) |
Set the search type to Less Than Equals. If the table's organization is indexed before issuing a positioned read request you can set how the key is matched for a successful read.
void com.dbSpaces.jdb.NavigationTable.setSearchTypeNotEquals | ( | ) |
Set the search type to Not Equals. If the table's organization is indexed before issuing a positioned read request you can set how the key is matched for a successful read.
boolean com.dbSpaces.jdb.NavigationTable.start | ( | ) | throws DatabaseException |
Set the start row position based on the selected index and search mode. To retrieve the actual row data a next() request has to be issued.
true>
if successful; false
if otherwise. DatabaseException | (if exceptions are enabled) when a database error occurs. |
boolean com.dbSpaces.jdb.NavigationTable.unlock | ( | ) | throws DatabaseException |
Unlock the current row for the table.
true
if successful; false
if otherwise. DatabaseException | (if exceptions are enabled) when a database error occurs. |
boolean com.dbSpaces.jdb.NavigationTable.update | ( | ) | throws DatabaseException |
Update the current row for the table with any changes. true
if successful; false
if otherwise.
DatabaseException | (if exceptions are enabled) when a database error occurs. |