Package ch.nolix.system.middata.adapter
Klasse AbstractDataAdapter
java.lang.Object
ch.nolix.system.middata.adapter.AbstractDataAdapter
- Alle implementierten Schnittstellen:
IDatabaseNameHolder,Closeable,CloseStateRequestable,GroupCloseable,ChangeRequestable,IChangeSaver,IResettableChangeSaver,Resettable,IDataAdapter,IDataReader,IDataWriter,AutoCloseable
- Bekannte direkte Unterklassen:
AbstractDataAdapterAndSchemaReader,AbstractSqlDataAdapter,NodeDataAdapter
-
Konstruktorübersicht
KonstruktorenModifiziererKonstruktorBeschreibungprotectedAbstractDataAdapter(IDataReader dataReader, IDataWriter dataWriter) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungfinal voidclearMultiReference(String tableName, String entityId, String multiReferenceColumnName) Deletes the references of the multi reference, that is in the multi reference column with the given multiReferenceColumnName and belongs to the entity, that has the given entityId and belongs to the table with the given tableName, from the database.final voidclearMultiValue(String tableName, String entityId, String multiFieldColumn) Deletes 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 belongs to the table with the given tableName, from the database.final voidcreateCloseDependencyTo(GroupCloseable element) Creates a close dependency between the currentGroupCloseableand the given element.final voiddeleteEntity(String tableName, EntityDeletionDto entity) Deletes the given entity from the database.final voiddeleteMultiBackReferenceEntry(MultiBackReferenceEntryDeletionDto multiBackReferenceEntry) Deletes the given multiBackReferenceEntry from the database.final voiddeleteMultiReferenceEntry(MultiReferenceEntryDeletionDto multiReferenceEntry) Deletes the given multiReferenceEntry from the database.final voiddeleteMultiValueEntry(MultiValueEntryDto multiValueEntry) Deletes the given multiValueEntry from the database.final voidexpectSchemaTimestamp(ITime schemaTimestamp) Will cause an error by saving if the database does not have the given schemaTimestamp.final voidexpectTableContainsEntity(String tableName, String entityId) Will cause an error by saving if on the database the table with the given tableName does not contain an entity with the given entityId.final Stringfinal intfinal ITimefinal ICloseControllerfinal booleanfinal voidinsertEntity(String tableName, EntityCreationDto newEntity) Inserts the given entity into the table with the given tableName on the database.final voidinsertMultiBackReferenceEntry(MultiBackReferenceEntryDto multiBackReferenceEntry) Inserts the given multiBackReferenceEntry into the database.voidinsertMultiReferenceEntry(MultiReferenceEntryDto multiReferenceEntry) Inserts the given multiReferenceEntry into the database.final voidinsertMultiValueEntry(MultiValueEntryDto multiValueEntry) Inserts the given multiValueEntry into the database.final IContainer<EntityLoadingDto> loadEntities(String tableName) final EntityLoadingDtoloadEntity(String tableName, String id) final IContainer<String> loadMultiBackReferenceBackReferencedEntityIds(String tableName, String entityId, String multiBackReferenceColumnName) final IContainer<MultiReferenceEntryDto> loadMultiReferenceEntries(String tableName, String entityId, String multiReferenceColumnName) final IContainer<Object> loadMultiValueValues(String tableName, String entityId, String multiFieldColumnName) final voidLets the currentGroupCloseablenote a close.final voidreset()Resets the currentResettable.final voidSaves the changes of the currentIChangeSaver.final booleantableContainsEntity(String tableName, String entityId) final booleantableContainsEntityWithValueAtColumn(String tableName, String columnName, String value) final booleantableContainsEntityWithValueAtColumnIgnoringEntities(String tableName, String columnName, String value, IContainer<String> entitiesToIgnoreIds) final voidupdateEntity(String tableName, EntityUpdateDto entityUpdate) Updates the entity, that belongs to the table with the given tableName, in the database according to the given entityUpdate.Von Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitVon Schnittstelle geerbte Methoden ch.nolix.coreapi.resourcecontrol.savecontrol.ChangeRequestable
isChangeFreeVon Schnittstelle geerbte Methoden ch.nolix.coreapi.resourcecontrol.closecontroller.CloseStateRequestable
isOpenVon Schnittstelle geerbte Methoden ch.nolix.coreapi.resourcecontrol.closecontroller.GroupCloseable
close, isClosedVon Schnittstelle geerbte Methoden ch.nolix.coreapi.attribute.mandatoryattribute.IDatabaseNameHolder
getDatabaseNameInQuotes
-
Konstruktordetails
-
AbstractDataAdapter
-
-
Methodendetails
-
createCloseDependencyTo
Beschreibung aus Schnittstelle kopiert:GroupCloseableCreates a close dependency between the currentGroupCloseableand the given element. When aGroupCloseableis closed, all elements, the currentGroupCloseablehas a close dependency to, will be closed too and vice versa.- Angegeben von:
createCloseDependencyToin SchnittstelleGroupCloseable- Parameter:
element-
-
deleteEntity
Beschreibung aus Schnittstelle kopiert:IDataWriterDeletes the given entity from the database. Will cause an error by saving if the given entity was deleted or changed on the database in the meanwhile.- Angegeben von:
deleteEntityin SchnittstelleIDataWriter- Parameter:
tableName-entity-
-
deleteMultiBackReferenceEntry
public final void deleteMultiBackReferenceEntry(MultiBackReferenceEntryDeletionDto multiBackReferenceEntry) Beschreibung aus Schnittstelle kopiert:IDataWriterDeletes the given multiBackReferenceEntry from the database.- Angegeben von:
deleteMultiBackReferenceEntryin SchnittstelleIDataWriter- Parameter:
multiBackReferenceEntry-
-
clearMultiReference
public final void clearMultiReference(String tableName, String entityId, String multiReferenceColumnName) Beschreibung aus Schnittstelle kopiert:IDataWriterDeletes the references of the multi reference, that is in the multi reference column with the given multiReferenceColumnName and belongs to the entity, that has the given entityId and belongs to the table with the given tableName, from the database.- Angegeben von:
clearMultiReferencein SchnittstelleIDataWriter- Parameter:
tableName-entityId-multiReferenceColumnName-
-
deleteMultiReferenceEntry
Beschreibung aus Schnittstelle kopiert:IDataWriterDeletes the given multiReferenceEntry from the database.- Angegeben von:
deleteMultiReferenceEntryin SchnittstelleIDataWriter- Parameter:
multiReferenceEntry-
-
clearMultiValue
Beschreibung aus Schnittstelle kopiert:IDataWriterDeletes 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 belongs to the table with the given tableName, from the database.- Angegeben von:
clearMultiValuein SchnittstelleIDataWriter- Parameter:
tableName-entityId-multiFieldColumn-
-
deleteMultiValueEntry
Beschreibung aus Schnittstelle kopiert:IDataWriterDeletes the given multiValueEntry from the database.- Angegeben von:
deleteMultiValueEntryin SchnittstelleIDataWriter- Parameter:
multiValueEntry-
-
expectSchemaTimestamp
Beschreibung aus Schnittstelle kopiert:IDataWriterWill cause an error by saving if the database does not have the given schemaTimestamp. This method can be used to prevent from saving changes when the schemaTimestamp was changed in the meanwhile- Angegeben von:
expectSchemaTimestampin SchnittstelleIDataWriter- Parameter:
schemaTimestamp-
-
expectTableContainsEntity
Beschreibung aus Schnittstelle kopiert:IDataWriterWill cause an error by saving if on the database the table with the given tableName 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:
expectTableContainsEntityin SchnittstelleIDataWriter- Parameter:
tableName-entityId-
-
getDatabaseName
- Angegeben von:
getDatabaseNamein SchnittstelleIDatabaseNameHolder- Gibt zurück:
- the database name of the current
IDatabaseNameHolder.
-
getSaveCount
public final int getSaveCount()- Angegeben von:
getSaveCountin SchnittstelleIResettableChangeSaver
-
getSchemaTimestamp
- Angegeben von:
getSchemaTimestampin SchnittstelleIDataReader- Gibt zurück:
- the schema timestamp from the database.
-
getStoredCloseController
- Angegeben von:
getStoredCloseControllerin SchnittstelleGroupCloseable- Gibt zurück:
- the
ICloseControllerof the currentGroupCloseable.
-
hasChanges
public final boolean hasChanges()- Angegeben von:
hasChangesin SchnittstelleChangeRequestable- Gibt zurück:
- true if the current
ChangeRequestablehas uncomitted changes.
-
insertMultiBackReferenceEntry
Beschreibung aus Schnittstelle kopiert:IDataWriterInserts the given multiBackReferenceEntry into the database.- Angegeben von:
insertMultiBackReferenceEntryin SchnittstelleIDataWriter- Parameter:
multiBackReferenceEntry-
-
insertMultiReferenceEntry
Beschreibung aus Schnittstelle kopiert:IDataWriterInserts the given multiReferenceEntry into the database.- Angegeben von:
insertMultiReferenceEntryin SchnittstelleIDataWriter- Parameter:
multiReferenceEntry-
-
insertMultiValueEntry
Beschreibung aus Schnittstelle kopiert:IDataWriterInserts the given multiValueEntry into the database.- Angegeben von:
insertMultiValueEntryin SchnittstelleIDataWriter- Parameter:
multiValueEntry-
-
insertEntity
Beschreibung aus Schnittstelle kopiert:IDataWriterInserts the given entity into the table with the given tableName on the database.- Angegeben von:
insertEntityin SchnittstelleIDataWriter- Parameter:
tableName-newEntity-
-
loadMultiBackReferenceBackReferencedEntityIds
public final IContainer<String> loadMultiBackReferenceBackReferencedEntityIds(String tableName, String entityId, String multiBackReferenceColumnName) - Angegeben von:
loadMultiBackReferenceBackReferencedEntityIdsin SchnittstelleIDataReader- Parameter:
tableName-entityId-multiBackReferenceColumnName-- Gibt zurück:
- 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.
-
loadMultiReferenceEntries
public final IContainer<MultiReferenceEntryDto> loadMultiReferenceEntries(String tableName, String entityId, String multiReferenceColumnName) - Angegeben von:
loadMultiReferenceEntriesin SchnittstelleIDataReader- Parameter:
tableName-entityId-multiReferenceColumnName-- Gibt zurück:
- 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.
-
loadMultiValueValues
public final IContainer<Object> loadMultiValueValues(String tableName, String entityId, String multiFieldColumnName) - Angegeben von:
loadMultiValueValuesin SchnittstelleIDataReader- Parameter:
tableName-entityId-multiFieldColumnName-- Gibt zurück:
- 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.
-
loadEntities
- Angegeben von:
loadEntitiesin SchnittstelleIDataReader- Parameter:
tableName-- Gibt zurück:
- the entities, that are in the table with the given tableName, from the database.
-
loadEntity
- Angegeben von:
loadEntityin SchnittstelleIDataReader- Parameter:
tableName-id-- Gibt zurück:
- the entity, that is in the table with the given tableName and has the given entityId, from the database.
-
noteClose
public final void noteClose()Beschreibung aus Schnittstelle kopiert:GroupCloseableLets the currentGroupCloseablenote a close.- Angegeben von:
noteClosein SchnittstelleGroupCloseable
-
reset
public final void reset()Beschreibung aus Schnittstelle kopiert:ResettableResets the currentResettable.- Angegeben von:
resetin SchnittstelleResettable
-
saveChanges
public final void saveChanges()Beschreibung aus Schnittstelle kopiert:IChangeSaverSaves the changes of the currentIChangeSaver.- Angegeben von:
saveChangesin SchnittstelleIChangeSaver
-
tableContainsEntityWithValueAtColumn
public final boolean tableContainsEntityWithValueAtColumn(String tableName, String columnName, String value) - Angegeben von:
tableContainsEntityWithValueAtColumnin SchnittstelleIDataReader- Parameter:
tableName-columnName-value-- Gibt zurück:
- true if the table with the given tableName contains in the column with the given columnName the given value on the database, false otherwise.
-
tableContainsEntityWithValueAtColumnIgnoringEntities
public final boolean tableContainsEntityWithValueAtColumnIgnoringEntities(String tableName, String columnName, String value, IContainer<String> entitiesToIgnoreIds) - Angegeben von:
tableContainsEntityWithValueAtColumnIgnoringEntitiesin SchnittstelleIDataReader- Parameter:
tableName-columnName-value-entitiesToIgnoreIds-- Gibt zurück:
- 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.
-
tableContainsEntity
- Angegeben von:
tableContainsEntityin SchnittstelleIDataReader- Parameter:
tableName-entityId-- Gibt zurück:
- true if the table with the given tableName contains an entity with the given entityId on the database, false otherwise.
-
updateEntity
Beschreibung aus Schnittstelle kopiert:IDataWriterUpdates the entity, that belongs to the table with the given tableName, in the database according to the given entityUpdate.- Angegeben von:
updateEntityin SchnittstelleIDataWriter- Parameter:
tableName-entityUpdate-
-