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

public interface IDataReader extends GroupCloseable, IDatabaseNameHolder
Author:
Silvan Wyss
  • Method Details

    • getEntityCount

      int getEntityCount(String tableName)
      Parameters:
      tableName -
      Returns:
      the number of the entities of the table with the given tableName from the database.
      Throws:
      RuntimeException - if the current IDataReader is closed.
    • getSchemaTimestamp

      ITime getSchemaTimestamp()
      Returns:
      the schema timestamp from the database.
      Throws:
      RuntimeException - if the current IDataReader is closed.
    • loadEntities

      IContainer<EntityLoadingDto> loadEntities(String tableName)
      Parameters:
      tableName -
      Returns:
      the entities, that are in the table with the given tableName, from the database.
      Throws:
      RuntimeException - if the current IDataReader is closed.
    • loadEntity

      EntityLoadingDto loadEntity(String tableName, String entityId)
      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 current IDataReader is 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 current IDataReader is 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 current IDataReader is 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 current IDataReader is closed.
    • tableContainsEntity

      boolean tableContainsEntity(String tableName, String entityId)
      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 current IDataReader is closed.
    • tableContainsEntityWithValueAtColumn

      boolean tableContainsEntityWithValueAtColumn(String tableName, String columnName, String value)
      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 current IDataReader is 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 current IDataReader is closed.