Klasse DataWriter

java.lang.Object
ch.nolix.system.sqlmiddata.datawriter.DataWriter
Alle implementierten Schnittstellen:
ChangeRequestable, IChangeSaver, IResettableChangeSaver, Closeable, CloseStateRequestable, GroupCloseable, Resettable, IDataWriter, AutoCloseable

public final class DataWriter extends Object implements IDataWriter
  • Methodendetails

    • forDatabaseNameAndDatabaseSchemaViewAndSqlConnection

      public static DataWriter forDatabaseNameAndDatabaseSchemaViewAndSqlConnection(String databaseName, DatabaseSchemaViewDto databaseSchemaView, ISqlConnection sqlConnection)
    • clearMultiReference

      public void clearMultiReference(String tableName, String entityId, String multiReferenceColumnName)
      Beschreibung aus Schnittstelle kopiert: IDataWriter
      This method does not validate that the concerned entity was not changed in the meanwhile.
      Angegeben von:
      clearMultiReference in Schnittstelle IDataWriter
      Parameter:
      tableName -
      entityId -
      multiReferenceColumnName -
    • clearMultiValue

      public void clearMultiValue(String tableName, String entityId, String multiValueColumnName)
      Beschreibung aus Schnittstelle kopiert: IDataWriter
      This method does not validate that the concerned entity was not changed in the meanwhile.
      Angegeben von:
      clearMultiValue in Schnittstelle IDataWriter
      Parameter:
      tableName -
      entityId -
      multiValueColumnName -
    • deleteEntity

      public void deleteEntity(String tableName, EntityDeletionDto entity)
      Beschreibung aus Schnittstelle kopiert: IDataWriter
      Causes an error if the concerned entity was deleted or changed in the meanwhile.
      Angegeben von:
      deleteEntity in Schnittstelle IDataWriter
      Parameter:
      tableName -
      entity -
    • deleteMultiBackReferenceEntry

      public void deleteMultiBackReferenceEntry(String tableName, String entityId, String multiBackReferenceColumnId, String backReferencedEntityId)
      Beschreibung aus Schnittstelle kopiert: IDataWriter
      This method does not validate that the concerned entity was not changed in the meanwhile.
      Angegeben von:
      deleteMultiBackReferenceEntry in Schnittstelle IDataWriter
      Parameter:
      tableName -
      entityId -
      multiBackReferenceColumnId -
      backReferencedEntityId -
    • deleteMultiReferenceEntry

      public void deleteMultiReferenceEntry(String tableName, String entityId, String multiRefereceColumnName, String referencedEntityId)
      Beschreibung aus Schnittstelle kopiert: IDataWriter
      This method does not validate that the concerned entity was not changed in the meanwhile.
      Angegeben von:
      deleteMultiReferenceEntry in Schnittstelle IDataWriter
      Parameter:
      tableName -
      entityId -
      multiRefereceColumnName -
      referencedEntityId -
    • deleteMultiValueEntry

      public void deleteMultiValueEntry(String tableName, String entityId, String multiValueColumnName, String entry)
      Beschreibung aus Schnittstelle kopiert: IDataWriter
      This method does not validate that the concerned entity was not changed in the meanwhile.
      Angegeben von:
      deleteMultiValueEntry in Schnittstelle IDataWriter
      Parameter:
      tableName -
      entityId -
      multiValueColumnName -
      entry -
    • expectSchemaTimestamp

      public void expectSchemaTimestamp(ITime schemaTimestamp)
      Beschreibung aus Schnittstelle kopiert: IDataWriter
      Will cause an error if the database does not have the given schema timestamp.
      Angegeben von:
      expectSchemaTimestamp in Schnittstelle IDataWriter
      Parameter:
      schemaTimestamp -
    • expectTableContainsEntity

      public void expectTableContainsEntity(String tableName, String entityId)
      Beschreibung aus Schnittstelle kopiert: IDataWriter
      Will cause an error if the concerned table does not contain an entity with the given entityId. This method can be used to prevent from referencing an entity that was deleted in the meanwhile.
      Angegeben von:
      expectTableContainsEntity in Schnittstelle IDataWriter
      Parameter:
      tableName -
      entityId -
    • getStoredCloseController

      public ICloseController getStoredCloseController()
      Angegeben von:
      getStoredCloseController in Schnittstelle GroupCloseable
      Gibt zurück:
      the ICloseController of the current GroupCloseable.
    • getSaveCount

      public int getSaveCount()
      Angegeben von:
      getSaveCount in Schnittstelle IResettableChangeSaver
    • hasChanges

      public boolean hasChanges()
      Angegeben von:
      hasChanges in Schnittstelle ChangeRequestable
      Gibt zurück:
      true if the current ChangeRequestable has uncomitted changes.
    • insertEntity

      public void insertEntity(String tableName, EntityCreationDto newEntity)
      Beschreibung aus Schnittstelle kopiert: IDataWriter
      Inserts the given newEntity into the table with the given tableName.
      Angegeben von:
      insertEntity in Schnittstelle IDataWriter
      Parameter:
      tableName -
      newEntity -
    • insertMultiBackReferenceEntry

      public void insertMultiBackReferenceEntry(String tableName, String entityId, String multiBackReferenceColumnId, String backReferencedEntityId)
      Beschreibung aus Schnittstelle kopiert: IDataWriter
      This method does not validate that the concerned entity was not changed in the meanwhile.
      Angegeben von:
      insertMultiBackReferenceEntry in Schnittstelle IDataWriter
      Parameter:
      tableName -
      entityId -
      multiBackReferenceColumnId -
      backReferencedEntityId -
    • insertMultiReferenceEntry

      public void insertMultiReferenceEntry(MultiReferenceEntryDto multiReferenceEntry)
      Beschreibung aus Schnittstelle kopiert: IDataWriter
      This method does not validate that the concerned entity was not changed in the meanwhile.
      Angegeben von:
      insertMultiReferenceEntry in Schnittstelle IDataWriter
      Parameter:
      multiReferenceEntry -
    • insertMultiValueEntry

      public void insertMultiValueEntry(String tableName, String entityId, String multiValueColumnName, String entry)
      Beschreibung aus Schnittstelle kopiert: IDataWriter
      This method does not validate that the concerned entity was not changed in the meanwhile.
      Angegeben von:
      insertMultiValueEntry in Schnittstelle IDataWriter
      Parameter:
      tableName -
      entityId -
      multiValueColumnName -
      entry -
    • noteClose

      public void noteClose()
      Beschreibung aus Schnittstelle kopiert: GroupCloseable
      Lets the current GroupCloseable note a close.
      Angegeben von:
      noteClose in Schnittstelle GroupCloseable
    • reset

      public void reset()
      Beschreibung aus Schnittstelle kopiert: Resettable
      Resets the current Resettable.
      Angegeben von:
      reset in Schnittstelle Resettable
    • saveChanges

      public void saveChanges()
      Beschreibung aus Schnittstelle kopiert: IChangeSaver
      Saves the changes of the current IChangeSaver.
      Angegeben von:
      saveChanges in Schnittstelle IChangeSaver
    • updateEntity

      public void updateEntity(String tableName, EntityUpdateDto entityUpdate)
      Beschreibung aus Schnittstelle kopiert: IDataWriter
      This method does not validate that the concerned entity was not changed in the meanwhile.
      Angegeben von:
      updateEntity in Schnittstelle IDataWriter
      Parameter:
      tableName -
      entityUpdate -