Class AbstractDataAdapter
java.lang.Object
ch.nolix.system.objectdata.adapter.AbstractDataAdapter
- All Implemented Interfaces:
IDatabaseNameHolder, EmptyCopyable<IDataAdapter>, Closeable, CloseStateRequestable, GroupCloseable, ChangeRequestable, IChangeSaver, IResettableChangeSaver, Resettable, IDataAdapter, AutoCloseable
- Direct Known Subclasses:
MsSqlDataAdapter, NodeDataAdapter
- Author:
- Silvan Wyss
-
Method Summary
Modifier and TypeMethodDescriptionfinal voidcreateCloseDependencyTo(GroupCloseable element) Creates a close dependency between the currentGroupCloseableand the given element.final Stringfinal intfinal ICloseControllergetStoredTableByEntityType(Class<E> entityType) final booleanfinal IDataAdapterinsertEntity(IEntity entity) final voidLets the currentGroupCloseablenote a close.final voidreset()Resets the currentResettable.final voidSaves the changes of the currentIChangeSaver.Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ChangeRequestable
isChangeFreeMethods inherited from interface CloseStateRequestable
isOpenMethods inherited from interface EmptyCopyable
createEmptyCopyMethods inherited from interface GroupCloseable
close, isClosedMethods inherited from interface IDatabaseNameHolder
getDatabaseNameInQuotes
-
Method Details
-
createCloseDependencyTo
Creates 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.- Specified by:
createCloseDependencyToin interfaceGroupCloseable- Parameters:
element-
-
getDatabaseName
- Specified by:
getDatabaseNamein interfaceIDatabaseNameHolder- Returns:
- the database name of the current
IDatabaseNameHolder.
-
getSaveCount
public final int getSaveCount()- Specified by:
getSaveCountin interfaceIResettableChangeSaver
-
getStoredCloseController
- Specified by:
getStoredCloseControllerin interfaceGroupCloseable- Returns:
- the
ICloseControllerof the currentGroupCloseable.
-
getStoredTableByEntityType
- Specified by:
getStoredTableByEntityTypein interfaceIDataAdapter
-
hasChanges
public final boolean hasChanges()- Specified by:
hasChangesin interfaceChangeRequestable- Returns:
- true if the current
ChangeRequestablehas uncomitted changes, false otherwise.
-
insertEntity
- Specified by:
insertEntityin interfaceIDataAdapter
-
noteClose
public final void noteClose()Lets the currentGroupCloseablenote a close.- Specified by:
noteClosein interfaceGroupCloseable
-
reset
public final void reset()Resets the currentResettable.- Specified by:
resetin interfaceResettable
-
saveChanges
public final void saveChanges()Saves the changes of the currentIChangeSaver.- Specified by:
saveChangesin interfaceIChangeSaver
-