Interface IDataReader
- All Superinterfaces:
AutoCloseable, Closeable, CloseStateRequestable, GroupCloseable, IDatabaseNameHolder
- All Known Subinterfaces:
IDataAdapter, IDataAdapterAndSchemaReader
- All Known Implementing Classes:
AbstractDataAdapter, AbstractDataAdapterAndSchemaReader, AbstractSqlDataAdapter, DataReader, DataReader, MsSqlDataAdapter, MsSqlDataAdapterAndSchemaReader, NodeDataAdapter, NodeDataAdapterAndSchemaReader
- Author:
- Silvan Wyss
-
Method Summary
Modifier and TypeMethodDescriptionintgetEntityCount(String tableName) loadEntities(String tableName) loadEntity(String tableName, String entityId) loadMultiBackReferenceBackReferencedEntityIds(String tableName, String entityId, String multiBackReferenceColumnName) loadMultiBackReferenceEntries(TableIdentification table, String entityId, ColumnIdentification multiBackReferenceColumn) loadMultiReferenceEntries(String tableName, String entityId, String multiReferenceColumnName) loadMultiValueValues(String tableName, String entityId, String multiValueColumnName) booleantableContainsEntity(String tableName, String entityId) booleantableContainsEntityWithValueAtColumn(String tableName, String columnName, String value) booleantableContainsEntityWithValueAtColumnIgnoringEntities(String tableName, String columnName, String value, IContainer<String> entitiesToIgnoreIds) Methods inherited from interface CloseStateRequestable
isOpenMethods inherited from interface GroupCloseable
close, createCloseDependencyTo, getStoredCloseController, isClosed, noteCloseMethods inherited from interface IDatabaseNameHolder
getDatabaseName, getDatabaseNameInQuotes
-
Method Details
-
getEntityCount
- Parameters:
tableName-- Returns:
- the number of the entities of the table with the given tableName from the database.
- Throws:
RuntimeException- if the currentIDataReaderis closed.
-
getSchemaTimestamp
ITime getSchemaTimestamp()- Returns:
- the schema timestamp from the database.
- Throws:
RuntimeException- if the currentIDataReaderis closed.
-
loadEntities
- Parameters:
tableName-- Returns:
- the entities, that are in the table with the given tableName, from the database.
- Throws:
RuntimeException- if the currentIDataReaderis closed.
-
loadEntity
- Parameters:
tableName-entityId-- Returns:
- the entity, that is in the table with the given tableName and has the given entityId, from the database.
- Throws:
RuntimeException- if the currentIDataReaderis closed.
-
loadMultiBackReferenceBackReferencedEntityIds
IContainer<String> loadMultiBackReferenceBackReferencedEntityIds(String tableName, String entityId, String multiBackReferenceColumnName) - Parameters:
tableName-entityId-multiBackReferenceColumnName-- Returns:
- the entity ids of the multi back reference, that is in the multi back reference column with the given multiBackReferenceColumnName and belongs to the entity, that has the given entityId and is in the table with the given tableName, from the database.
- Throws:
RuntimeException- if the currentIDataReaderis closed.
-
loadMultiBackReferenceEntries
IContainer<MultiBackReferenceEntryDto> loadMultiBackReferenceEntries(TableIdentification table, String entityId, ColumnIdentification multiBackReferenceColumn) - Parameters:
table-entityId-multiBackReferenceColumn-- Returns:
- the multi back reference entries of the multi back reference that is in the given table and in the entity with the given entityId and in the given multiBackReferenceColumn.
-
loadMultiReferenceEntries
IContainer<MultiReferenceEntryDto> loadMultiReferenceEntries(String tableName, String entityId, String multiReferenceColumnName) - Parameters:
tableName-entityId-multiReferenceColumnName-- Returns:
- the multi reference entries of the the multi reference field, that is in the multi reference column with the given multiReferenceColumnName and belongs to the entity, that has the given entityId and is in the table with the given tableName, from the database.
- Throws:
RuntimeException- if the currentIDataReaderis closed.
-
loadMultiValueValues
IContainer<Object> loadMultiValueValues(String tableName, String entityId, String multiValueColumnName) - Parameters:
tableName-entityId-multiValueColumnName-- Returns:
- the values of the multi value, that is in the multi value column with the given multiValueColumnName and belongs to the entity, that has the given entityId and is in the table with the given tableName, from the database.
- Throws:
RuntimeException- if the currentIDataReaderis closed.
-
tableContainsEntity
- Parameters:
tableName-entityId-- Returns:
- true if the table with the given tableName contains an entity with the given entityId on the database, false otherwise.
- Throws:
RuntimeException- if the currentIDataReaderis closed.
-
tableContainsEntityWithValueAtColumn
- Parameters:
tableName-columnName-value-- Returns:
- true if the table with the given tableName contains in the column with the given columnName the given value on the database, false otherwise.
- Throws:
RuntimeException- if the currentIDataReaderis closed.
-
tableContainsEntityWithValueAtColumnIgnoringEntities
boolean tableContainsEntityWithValueAtColumnIgnoringEntities(String tableName, String columnName, String value, IContainer<String> entitiesToIgnoreIds) - Parameters:
tableName-columnName-value-entitiesToIgnoreIds-- Returns:
- true if the table with the given tableName contains in the column with the given columnName the given value ignoring the entities with the given entitiesToIgnoreIds on the database, false otherwise.
- Throws:
RuntimeException- if the currentIDataReaderis closed.
-