Interface ISqlJetBtreeDataTable
-
- All Superinterfaces:
ISqlJetBtreeTable
- All Known Implementing Classes:
SqlJetBtreeDataTable
public interface ISqlJetBtreeDataTable extends ISqlJetBtreeTable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancheckIndex(java.lang.String indexName, java.lang.Object[] key)Check the current record is equal to key using definition of index.voiddelete()Delete curent record.voiddelete(long rowId)Delete record by row's ID.ISqlJetTableDefgetDefinition()Get table's schema definition.ISqlJetBtreeIndexTablegetIndex(java.lang.String indexName)java.util.Map<java.lang.String,ISqlJetIndexDef>getIndexDefinitions()Get definitions of table's indexes.java.util.Map<java.lang.String,ISqlJetBtreeIndexTable>getIndexesTables()Get indexes which are related with table.java.lang.StringgetPrimaryKeyIndex()Get name of index which has been auto-created for primary key.longgetRowId()Get current rowID.booleangoToRow(long rowId)Go to record with given rowID.longinsert(SqlJetConflictAction onConflict, java.lang.Object... values)Write an new entry into the table.longinsert(SqlJetConflictAction onConflict, java.util.Map<java.lang.String,java.lang.Object> values)Insert record by values by names of fields.longinsertWithRowId(SqlJetConflictAction onConflict, long rowId, java.lang.Object[] values)booleanisIndexExists(java.lang.String indexName)booleanlocate(java.lang.String indexName, boolean next, java.lang.Object... key)Locate record which using index by key.voidupdate(SqlJetConflictAction onConflict, long rowId, java.lang.Object... values)Update an entry in the table by rowId.voidupdate(SqlJetConflictAction onConflict, long rowId, java.util.Map<java.lang.String,java.lang.Object> values)voidupdate(SqlJetConflictAction onConflict, java.util.Map<java.lang.String,java.lang.Object> values)voidupdateCurrent(SqlJetConflictAction onConflict, java.lang.Object... values)Update the current entry in the table.longupdateCurrentWithRowId(SqlJetConflictAction onConflict, long newRowId, java.lang.Object... values)Update the rowId and values in current entry in the table.longupdateWithRowId(SqlJetConflictAction onConflict, long rowId, long newRowId, java.lang.Object... values)Update the rowId and values an entry in the table by rowId.-
Methods inherited from interface org.tmatesoft.sqljet.core.internal.table.ISqlJetBtreeTable
clear, close, eof, first, getBlob, getEncoding, getFieldsCount, getFieldType, getFloat, getInteger, getKeySize, getRecord, getString, getValue, getValues, hasMoved, insert, isNull, last, lock, lockTable, moveTo, newRowId, newRowId, next, popState, previous, pushState, unlock
-
-
-
-
Method Detail
-
getDefinition
ISqlJetTableDef getDefinition()
Get table's schema definition.- Returns:
-
getIndexDefinitions
java.util.Map<java.lang.String,ISqlJetIndexDef> getIndexDefinitions()
Get definitions of table's indexes.- Returns:
-
getIndexesTables
java.util.Map<java.lang.String,ISqlJetBtreeIndexTable> getIndexesTables()
Get indexes which are related with table.- Returns:
-
goToRow
boolean goToRow(long rowId) throws SqlJetExceptionGo to record with given rowID. Return boolean to indicate success.- Parameters:
rowId-- Returns:
- Throws:
SqlJetException
-
getRowId
long getRowId() throws SqlJetExceptionGet current rowID.- Returns:
- Throws:
SqlJetException
-
insert
long insert(SqlJetConflictAction onConflict, java.lang.Object... values) throws SqlJetException
Write an new entry into the table.- Parameters:
values-- Throws:
SqlJetException
-
update
void update(SqlJetConflictAction onConflict, long rowId, java.lang.Object... values) throws SqlJetException
Update an entry in the table by rowId.- Parameters:
rowId-values-- Throws:
SqlJetException
-
updateCurrent
void updateCurrent(SqlJetConflictAction onConflict, java.lang.Object... values) throws SqlJetException
Update the current entry in the table.- Parameters:
values-- Throws:
SqlJetException
-
updateWithRowId
long updateWithRowId(SqlJetConflictAction onConflict, long rowId, long newRowId, java.lang.Object... values) throws SqlJetException
Update the rowId and values an entry in the table by rowId.- Parameters:
rowId-values-- Throws:
SqlJetException
-
updateCurrentWithRowId
long updateCurrentWithRowId(SqlJetConflictAction onConflict, long newRowId, java.lang.Object... values) throws SqlJetException
Update the rowId and values in current entry in the table.- Parameters:
values-- Throws:
SqlJetException
-
delete
void delete(long rowId) throws SqlJetExceptionDelete record by row's ID.- Parameters:
rowId-- Throws:
SqlJetException
-
delete
void delete() throws SqlJetExceptionDelete curent record.- Specified by:
deletein interfaceISqlJetBtreeTable- Throws:
SqlJetException
-
checkIndex
boolean checkIndex(java.lang.String indexName, java.lang.Object[] key) throws SqlJetExceptionCheck the current record is equal to key using definition of index.- Parameters:
indexName-key-- Returns:
- Throws:
SqlJetException
-
getPrimaryKeyIndex
java.lang.String getPrimaryKeyIndex()
Get name of index which has been auto-created for primary key.- Returns:
- the primaryKeyIndex
-
locate
boolean locate(java.lang.String indexName, boolean next, java.lang.Object... key) throws SqlJetExceptionLocate record which using index by key. Key is values for fields which are defined in index. If record is found then returns true. If next is true then locate record by next entry in index for key.- Parameters:
indexName-next-key-- Returns:
- Throws:
SqlJetException
-
insert
long insert(SqlJetConflictAction onConflict, java.util.Map<java.lang.String,java.lang.Object> values) throws SqlJetException
Insert record by values by names of fields.- Parameters:
values-- Returns:
- Throws:
SqlJetException
-
update
void update(SqlJetConflictAction onConflict, long rowId, java.util.Map<java.lang.String,java.lang.Object> values) throws SqlJetException
- Parameters:
rowId-values-- Throws:
SqlJetException
-
update
void update(SqlJetConflictAction onConflict, java.util.Map<java.lang.String,java.lang.Object> values) throws SqlJetException
- Parameters:
values-- Throws:
SqlJetException
-
isIndexExists
boolean isIndexExists(java.lang.String indexName)
- Parameters:
indexName-- Returns:
-
insertWithRowId
long insertWithRowId(SqlJetConflictAction onConflict, long rowId, java.lang.Object[] values) throws SqlJetException
- Parameters:
rowId-values-- Returns:
- Throws:
SqlJetException
-
getIndex
ISqlJetBtreeIndexTable getIndex(java.lang.String indexName)
- Parameters:
indexName-- Returns:
-
-