Class AbstractSchemaAdapter
java.lang.Object
ch.nolix.system.midschema.adapter.AbstractSchemaAdapter
- All Implemented Interfaces:
Closeable, CloseStateRequestable, GroupCloseable, ChangeRequestable, IChangeSaver, IResettableChangeSaver, Resettable, ISchemaAdapter, ISchemaReader, ISchemaWriter, AutoCloseable
- Direct Known Subclasses:
NodeSchemaAdapter, SqlSchemaAdapter
- Author:
- Silvan Wyss
-
Method Summary
Modifier and TypeMethodDescriptionfinal voidaddColumn(TableIdentification table, ColumnDto column) final voidfinal booleancolumnIsEmpty(String tableName, String columnName) final voidcreateCloseDependencyTo(GroupCloseable element) Creates a close dependency between the currentGroupCloseableand the given element.final voiddeleteColumn(TableIdentification table, String columnName) final voiddeleteTable(String tableName) final intfinal ITimefinal ICloseControllerfinal intfinal booleanfinal TableDtofinal IContainer<TableDto> final voidLets the currentGroupCloseablenote a close.final voidrenameColumn(String tableName, String columnName, String newColumnName) final voidrenameTable(String tableName, String newTableName) final voidreset()Resets the currentResettable.final voidSaves the changes of the currentIChangeSaver.final voidsetColumnModel(TableIdentification table, ColumnIdentification column, FieldType fieldType, DataType dataType, IContainer<String> referenceableTableIds, IContainer<String> backReferenceableColumnIds) 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 GroupCloseable
close, isClosed
-
Method Details
-
addColumn
- Specified by:
addColumnin interfaceISchemaWriter
-
addTable
- Specified by:
addTablein interfaceISchemaWriter
-
columnIsEmpty
- Specified by:
columnIsEmptyin interfaceISchemaReader
-
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-
-
deleteColumn
- Specified by:
deleteColumnin interfaceISchemaWriter
-
deleteTable
- Specified by:
deleteTablein interfaceISchemaWriter
-
getStoredCloseController
- Specified by:
getStoredCloseControllerin interfaceGroupCloseable- Returns:
- the
ICloseControllerof the currentGroupCloseable.
-
getSaveCount
public final int getSaveCount()- Specified by:
getSaveCountin interfaceIResettableChangeSaver
-
getTableCount
public final int getTableCount()- Specified by:
getTableCountin interfaceISchemaReader
-
hasChanges
public final boolean hasChanges()- Specified by:
hasChangesin interfaceChangeRequestable- Returns:
- true if the current
ChangeRequestablehas uncomitted changes, false otherwise.
-
getSchemaTimestamp
- Specified by:
getSchemaTimestampin interfaceISchemaReader
-
loadTable
- Specified by:
loadTablein interfaceISchemaReader
-
loadTables
- Specified by:
loadTablesin interfaceISchemaReader
-
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
-
renameColumn
- Specified by:
renameColumnin interfaceISchemaWriter
-
renameTable
- Specified by:
renameTablein interfaceISchemaWriter
-
setColumnModel
public final void setColumnModel(TableIdentification table, ColumnIdentification column, FieldType fieldType, DataType dataType, IContainer<String> referenceableTableIds, IContainer<String> backReferenceableColumnIds) - Specified by:
setColumnModelin interfaceISchemaWriter
-