Package de.ubs.xdm.utils.databasemodel
Class AbstractObjectContainer
java.lang.Object
de.ubs.xdm.utils.databasemodel.AbstractObjectContainer
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
MultiObjectContainer,ObjectContainer
- Author:
- christoph
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidaddAlias(de.ubs.xdm.utils.databasemodel.model.db.AbstractAlias alias) abstract voidaddAuxiliaryObject(de.ubs.xdm.utils.databasemodel.model.db.AuxiliaryObject auxilary) abstract voidaddIndex(de.ubs.xdm.utils.databasemodel.model.db.AbstractIndex index) voidaddObjectContainerListener(de.ubs.xdm.utils.databasemodel.ObjectContainerListener l) abstract voidaddSequenceObject(de.ubs.xdm.utils.databasemodel.model.db.AbstractSequenceObject so) abstract voidaddTable(de.ubs.xdm.utils.databasemodel.model.db.AbstractTable t) abstract voidaddTablespace(de.ubs.xdm.utils.databasemodel.model.db.AbstractTablespace tablespace) abstract intReturns the total number of aliases in this container.abstract intReturns the total number of auxiliary objects in this container.abstract intReturns the total number of databases in this container.abstract intReturns the total number of indexes in this container.abstract intReturns the total number of schemas in this container.abstract intReturns the total number of sequences in this container.abstract intReturns the total number of tables in this container.abstract intReturns the total number of tablespaces in this container.abstract intReturns the total number of views in this container.protected voidfireAliasAddedEvent(Alias alias) protected voidfireAliasRemovedEvent(Alias alias) protected voidfireAuxiliaryObjectAddedEvent(de.ubs.xdm.utils.databasemodel.model.db.AuxiliaryObject au) protected voidfireAuxiliaryObjectRemovedEvent(de.ubs.xdm.utils.databasemodel.model.db.AuxiliaryObject au) protected voidprotected voidprotected voidprotected voidprotected voidfireTableAddedEvent(Table table) protected voidfireTableRemovedEvent(Table table) protected voidfireTablespaceAddedEvent(Tablespace tablespace) protected voidfireTablespaceRemovedEvent(Tablespace tablespace) protected voidfireViewAddedEvent(View view) protected voidfireViewRemovedEvent(View view) abstract de.ubs.xdm.utils.databasemodel.model.db.AbstractAliasabstract Collection<de.ubs.xdm.utils.databasemodel.model.db.AbstractAlias> Returns a collection ofAbstractAliasobjects.
Note: if this is an instance ofMultiObjectContainer, the collection is not guaranteed to include all aliases in the container.abstract Map<UniqueName, de.ubs.xdm.utils.databasemodel.model.db.AbstractAlias> abstract ObjectgetAllocatedObject(Object obj) Deprecated.Has no longer an effect, implementations return object itselfabstract Collection<de.ubs.xdm.utils.databasemodel.model.db.AuxiliaryObject> Returns a collection ofAuxiliaryObjects.
Note: if this is an instance ofMultiObjectContainer, the collection is not guaranteed to include all auxiliary objects in the container.abstract intabstract Calendarde.ubs.xdm.utils.databasemodel.CatalogFieldNameShortenerabstract Stringabstract DatabaseMetaDataabstract Collection<String> Returns a list of all the database names which are referenced by this container.abstract Stringabstract de.ubs.xdm.utils.databasemodel.model.db.AbstractIndexgetIndex(de.ubs.xdm.utils.databasemodel.model.db.IndexUniqueName iun) Deprecated.abstract de.ubs.xdm.utils.databasemodel.model.db.AbstractIndexgetIndex(de.ubs.xdm.utils.databasemodel.model.db.TableUniqueName tableUniqueName, String ixowner, String ixname) abstract Collection<de.ubs.xdm.utils.databasemodel.model.db.AbstractIndex> Returns a collection ofAbstractIndexobjects.
Note: if this is an instance ofMultiObjectContainer, the collection is not guaranteed to include all index objects in the container.abstract Map<UniqueName, de.ubs.xdm.utils.databasemodel.model.db.AbstractIndex> abstract UniqueIdentifiablegetObject(UniqueName name) abstract Map<UniqueName, UniqueIdentifiable> Deprecated.very expensive operation.abstract de.ubs.xdm.utils.databasemodel.sorter.cycles.OrderedTablesabstract Collection<String> Deprecated.abstract Collection<String> Returns a collection of strings representing the schemas in this container.abstract Collection<de.ubs.xdm.utils.databasemodel.model.db.AbstractSequenceObject> Returns a collection ofAbstractSequenceObjectobjects.
Note: if this is an instance ofMultiObjectContainer, the collection is not guaranteed to include all sequences in the container.abstract de.ubs.xdm.utils.databasemodel.model.db.AbstractSequenceObjectgetSequenceObject(de.ubs.xdm.utils.databasemodel.model.db.SequenceUniqueName sun) abstract de.ubs.xdm.utils.databasemodel.model.db.AbstractSequenceObjectgetSequenceObject(String schema, String name) Calculates a list of all tables in the container sorted by their dependency.abstract Stringabstract de.ubs.xdm.utils.databasemodel.model.db.AbstractTablegetTable(de.ubs.xdm.utils.databasemodel.model.db.TableUniqueName tun) abstract de.ubs.xdm.utils.databasemodel.model.db.AbstractTableabstract Collection<de.ubs.xdm.utils.databasemodel.model.db.AbstractTable> Returns a collection ofAbstractTableobjects.
Note: if this is an instance ofMultiObjectContainer, the collection is not guaranteed to include all table objects in the container.abstract Map<UniqueName, de.ubs.xdm.utils.databasemodel.model.db.AbstractTable> abstract Collection<de.ubs.xdm.utils.databasemodel.model.db.AbstractTable> abstract de.ubs.xdm.utils.databasemodel.model.db.AbstractTablespacegetTablespace(de.ubs.xdm.utils.databasemodel.model.db.TablespaceUniqueName tun) abstract Collection<de.ubs.xdm.utils.databasemodel.model.db.AbstractTablespace> Returns a collection ofAbstractTablespaceobjects.
Note: if this is an instance ofMultiObjectContainer, the collection is not guaranteed to include all tablespaces in the container.abstract Map<UniqueName, de.ubs.xdm.utils.databasemodel.model.db.AbstractTablespace> abstract Map<UniqueName, UniqueIdentifiable> abstract StringgetUser()abstract de.ubs.xdm.utils.databasemodel.model.db.AbstractViewgetView(UniqueName tun) abstract de.ubs.xdm.utils.databasemodel.model.db.AbstractViewabstract Collection<de.ubs.xdm.utils.databasemodel.model.db.AbstractView> Returns a collection ofAbstractViewobjects.
Note: if this is an instance ofMultiObjectContainer, the collection is not guaranteed to include all views in the container.abstract booleanabstract voidabstract voidremoveObject(UniqueName name) voidremoveObjectContainerListener(de.ubs.xdm.utils.databasemodel.ObjectContainerListener l) abstract voidsetAliasMap(Map<UniqueName, de.ubs.xdm.utils.databasemodel.model.db.AbstractAlias> aliasMap) abstract voidsetCreationDate(Calendar creationDate) voidsetCurrentCatalogFieldShortener(de.ubs.xdm.utils.databasemodel.CatalogFieldNameShortener currentCatalogFieldNameShortener) abstract voidsetDatabaseMetaData(DatabaseMetaData databaseMetaData) abstract voidsetFileName(String fileName) abstract voidsetIndexMap(Map<UniqueName, de.ubs.xdm.utils.databasemodel.model.db.AbstractIndex> indexMap) voidsetParent(MultiObjectContainer parent) abstract voidsetReadOnly(boolean readOnly) abstract voidsetTableMap(Map<UniqueName, de.ubs.xdm.utils.databasemodel.model.db.AbstractTable> tableMap) abstract voidsetTablespaceMap(Map<UniqueName, de.ubs.xdm.utils.databasemodel.model.db.AbstractTablespace> tablespaceMap) abstract voidsetUniqueObjectMap(Map<UniqueName, UniqueIdentifiable> uniqueObjectMap)
-
Constructor Details
-
AbstractObjectContainer
protected AbstractObjectContainer() -
AbstractObjectContainer
-
-
Method Details
-
getContainerName
-
readResolve
-
getContainerIndex
public abstract int getContainerIndex() -
addObjectContainerListener
public void addObjectContainerListener(de.ubs.xdm.utils.databasemodel.ObjectContainerListener l) -
removeObjectContainerListener
public void removeObjectContainerListener(de.ubs.xdm.utils.databasemodel.ObjectContainerListener l) -
fireTableAddedEvent
-
fireTableRemovedEvent
-
fireViewRemovedEvent
-
fireViewAddedEvent
-
fireTablespaceRemovedEvent
-
fireTablespaceAddedEvent
-
fireSequenceRemovedEvent
-
fireSequenceAddedEvent
-
fireIndexRemovedEvent
-
fireIndexAddedEvent
-
fireAuxiliaryObjectRemovedEvent
protected void fireAuxiliaryObjectRemovedEvent(de.ubs.xdm.utils.databasemodel.model.db.AuxiliaryObject au) -
fireAuxiliaryObjectAddedEvent
protected void fireAuxiliaryObjectAddedEvent(de.ubs.xdm.utils.databasemodel.model.db.AuxiliaryObject au) -
fireAliasRemovedEvent
-
fireAliasAddedEvent
-
getParent
-
setParent
-
removeObject
-
removeObject
-
getCreationDate
-
setCreationDate
-
isReadOnly
public abstract boolean isReadOnly() -
setReadOnly
public abstract void setReadOnly(boolean readOnly) -
getObject
-
getFileName
-
setFileName
-
getCurrentTime
-
getUser
-
getSystemName
-
getAllocatedObject
Deprecated.Has no longer an effect, implementations return object itself- Parameters:
obj-- Returns:
-
getTablesForTableSpace
public abstract Collection<de.ubs.xdm.utils.databasemodel.model.db.AbstractTable> getTablesForTableSpace(Tablespace tbs) -
getDatabaseMetaData
-
setDatabaseMetaData
-
getTablespace
public abstract de.ubs.xdm.utils.databasemodel.model.db.AbstractTablespace getTablespace(de.ubs.xdm.utils.databasemodel.model.db.TablespaceUniqueName tun) -
getTablespaceMap
public abstract Map<UniqueName,de.ubs.xdm.utils.databasemodel.model.db.AbstractTablespace> getTablespaceMap() -
setTablespaceMap
public abstract void setTablespaceMap(Map<UniqueName, de.ubs.xdm.utils.databasemodel.model.db.AbstractTablespace> tablespaceMap) -
getIndex
-
getIndex
@Deprecated public abstract de.ubs.xdm.utils.databasemodel.model.db.AbstractIndex getIndex(de.ubs.xdm.utils.databasemodel.model.db.IndexUniqueName iun) Deprecated.Use getIndex with TableUniqueName instead. This allows to fix object container some special configuration like aliased tables.- Parameters:
iun-- Returns:
-
getSequenceObject
-
getSequenceObject
public abstract de.ubs.xdm.utils.databasemodel.model.db.AbstractSequenceObject getSequenceObject(de.ubs.xdm.utils.databasemodel.model.db.SequenceUniqueName sun) -
getTable
-
getView
-
getAlias
-
getView
-
getTable
public abstract de.ubs.xdm.utils.databasemodel.model.db.AbstractTable getTable(de.ubs.xdm.utils.databasemodel.model.db.TableUniqueName tun) -
getTableMap
-
setTableMap
public abstract void setTableMap(Map<UniqueName, de.ubs.xdm.utils.databasemodel.model.db.AbstractTable> tableMap) -
getIndexMap
-
setIndexMap
public abstract void setIndexMap(Map<UniqueName, de.ubs.xdm.utils.databasemodel.model.db.AbstractIndex> indexMap) -
getAliasMap
-
setAliasMap
public abstract void setAliasMap(Map<UniqueName, de.ubs.xdm.utils.databasemodel.model.db.AbstractAlias> aliasMap) -
addTablespace
public abstract void addTablespace(de.ubs.xdm.utils.databasemodel.model.db.AbstractTablespace tablespace) -
addAuxiliaryObject
public abstract void addAuxiliaryObject(de.ubs.xdm.utils.databasemodel.model.db.AuxiliaryObject auxilary) -
addAlias
public abstract void addAlias(de.ubs.xdm.utils.databasemodel.model.db.AbstractAlias alias) -
addIndex
public abstract void addIndex(de.ubs.xdm.utils.databasemodel.model.db.AbstractIndex index) -
addSequenceObject
public abstract void addSequenceObject(de.ubs.xdm.utils.databasemodel.model.db.AbstractSequenceObject so) -
addTable
public abstract void addTable(de.ubs.xdm.utils.databasemodel.model.db.AbstractTable t) -
getTablespaceList
public abstract Collection<de.ubs.xdm.utils.databasemodel.model.db.AbstractTablespace> getTablespaceList()Returns a collection ofAbstractTablespaceobjects.
Note: if this is an instance ofMultiObjectContainer, the collection is not guaranteed to include all tablespaces in the container. Therefore Use thecountTablespaces()method instead ofCollection.size().- Returns:
Collection<AbstractTablespace>
-
getIndexList
Returns a collection ofAbstractIndexobjects.
Note: if this is an instance ofMultiObjectContainer, the collection is not guaranteed to include all index objects in the container. Therefore Use thecountIndexes()method instead ofCollection.size().- Returns:
Collection<AbstractTablespace>
-
getAliasList
Returns a collection ofAbstractAliasobjects.
Note: if this is an instance ofMultiObjectContainer, the collection is not guaranteed to include all aliases in the container. Therefore Use thecountAliases()method instead ofCollection.size().- Returns:
Collection<AbstractAlias>
-
getTableList
Returns a collection ofAbstractTableobjects.
Note: if this is an instance ofMultiObjectContainer, the collection is not guaranteed to include all table objects in the container. Therefore Use thecountTables()method instead ofCollection.size().- Returns:
Collection<AbstractTable>
-
getViewList
Returns a collection ofAbstractViewobjects.
Note: if this is an instance ofMultiObjectContainer, the collection is not guaranteed to include all views in the container. Therefore Use thecountViews()method instead ofCollection.size().- Returns:
Collection<AbstractView>
-
getSequenceList
public abstract Collection<de.ubs.xdm.utils.databasemodel.model.db.AbstractSequenceObject> getSequenceList()Returns a collection ofAbstractSequenceObjectobjects.
Note: if this is an instance ofMultiObjectContainer, the collection is not guaranteed to include all sequences in the container. Therefore Use thecountSequences()method instead ofCollection.size().- Returns:
Collection<AbstractSequence>
-
getAuxiliaryList
public abstract Collection<de.ubs.xdm.utils.databasemodel.model.db.AuxiliaryObject> getAuxiliaryList()Returns a collection ofAuxiliaryObjects.
Note: if this is an instance ofMultiObjectContainer, the collection is not guaranteed to include all auxiliary objects in the container. Therefore Use thecountAuxiliaryObjects()method instead ofCollection.size().- Returns:
Collection<AuxiliaryObject>
-
getSchemaList
Deprecated. -
getSchemaNames
Returns a collection of strings representing the schemas in this container. Each schema name is listed at most once in the collection.
Note: if this is an instance ofMultiObjectContainer, the collection is not guaranteed to include all schemas in the container. For instance, if the container references different databases and a schema with the same name occurs in more than one of these, then the name will never-the-less appear only once.- Returns:
Collection<String>
-
getDatabaseNames
Returns a list of all the database names which are referenced by this container. Each database name is only listed once in the collection.- Returns:
Collection<String>
-
getUniqueObjectMap
-
setUniqueObjectMap
-
getObjectMap
Deprecated.very expensive operation. Prefer getObject(UniqueName)- Returns:
- a map were all objects a accessible through their unique name
-
countAliases
public abstract int countAliases()Returns the total number of aliases in this container.- Returns:
- int
-
countAuxiliaryObjects
public abstract int countAuxiliaryObjects()Returns the total number of auxiliary objects in this container.- Returns:
- int
-
countIndexes
public abstract int countIndexes()Returns the total number of indexes in this container.- Returns:
- int
-
countSequences
public abstract int countSequences()Returns the total number of sequences in this container.- Returns:
- int
-
countSchemas
public abstract int countSchemas()Returns the total number of schemas in this container.- Returns:
- int
-
countDatabases
public abstract int countDatabases()Returns the total number of databases in this container.- Returns:
- int
-
countTables
public abstract int countTables()Returns the total number of tables in this container.- Returns:
- int
-
countTablespaces
public abstract int countTablespaces()Returns the total number of tablespaces in this container.- Returns:
- int
-
countViews
public abstract int countViews()Returns the total number of views in this container.- Returns:
- int
-
getSortedTableList
Calculates a list of all tables in the container sorted by their dependency. A table at position n depends only on tables on positions- Returns:
-
getOrderedTables
public abstract de.ubs.xdm.utils.databasemodel.sorter.cycles.OrderedTables getOrderedTables() -
getCurrentCatalogFieldShortener
public de.ubs.xdm.utils.databasemodel.CatalogFieldNameShortener getCurrentCatalogFieldShortener() -
setCurrentCatalogFieldShortener
public void setCurrentCatalogFieldShortener(de.ubs.xdm.utils.databasemodel.CatalogFieldNameShortener currentCatalogFieldNameShortener)
-