Class AbstractObjectContainer

java.lang.Object
de.ubs.xdm.utils.databasemodel.AbstractObjectContainer
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
MultiObjectContainer, ObjectContainer

public abstract class AbstractObjectContainer extends Object implements Serializable
Author:
christoph
See Also:
  • Constructor Details

    • AbstractObjectContainer

      protected AbstractObjectContainer()
    • AbstractObjectContainer

      public AbstractObjectContainer(String containerName)
  • Method Details

    • getContainerName

      public String getContainerName()
    • readResolve

      public Object 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

      protected void fireTableAddedEvent(Table table)
    • fireTableRemovedEvent

      protected void fireTableRemovedEvent(Table table)
    • fireViewRemovedEvent

      protected void fireViewRemovedEvent(View view)
    • fireViewAddedEvent

      protected void fireViewAddedEvent(View view)
    • fireTablespaceRemovedEvent

      protected void fireTablespaceRemovedEvent(Tablespace tablespace)
    • fireTablespaceAddedEvent

      protected void fireTablespaceAddedEvent(Tablespace tablespace)
    • fireSequenceRemovedEvent

      protected void fireSequenceRemovedEvent(Sequence s)
    • fireSequenceAddedEvent

      protected void fireSequenceAddedEvent(Sequence s)
    • fireIndexRemovedEvent

      protected void fireIndexRemovedEvent(Index i)
    • fireIndexAddedEvent

      protected void fireIndexAddedEvent(Index i)
    • 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

      protected void fireAliasRemovedEvent(Alias alias)
    • fireAliasAddedEvent

      protected void fireAliasAddedEvent(Alias alias)
    • getParent

      public MultiObjectContainer getParent()
    • setParent

      public void setParent(MultiObjectContainer parent)
    • removeObject

      public abstract void removeObject(UniqueName name)
    • removeObject

      public abstract void removeObject(UniqueIdentifiable ui)
    • getCreationDate

      public abstract Calendar getCreationDate()
    • setCreationDate

      public abstract void setCreationDate(Calendar creationDate)
    • isReadOnly

      public abstract boolean isReadOnly()
    • setReadOnly

      public abstract void setReadOnly(boolean readOnly)
    • getObject

      public abstract UniqueIdentifiable getObject(UniqueName name)
    • getFileName

      public abstract String getFileName()
    • setFileName

      public abstract void setFileName(String fileName)
    • getCurrentTime

      public abstract String getCurrentTime()
    • getUser

      public abstract String getUser()
    • getSystemName

      public abstract String getSystemName()
    • getAllocatedObject

      @Deprecated public abstract Object getAllocatedObject(Object obj)
      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

      public abstract DatabaseMetaData getDatabaseMetaData()
    • setDatabaseMetaData

      public abstract void setDatabaseMetaData(DatabaseMetaData databaseMetaData)
    • 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

      public abstract de.ubs.xdm.utils.databasemodel.model.db.AbstractIndex getIndex(de.ubs.xdm.utils.databasemodel.model.db.TableUniqueName tableUniqueName, String ixowner, String ixname)
    • 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

      public abstract de.ubs.xdm.utils.databasemodel.model.db.AbstractSequenceObject getSequenceObject(String schema, String name)
    • getSequenceObject

      public abstract de.ubs.xdm.utils.databasemodel.model.db.AbstractSequenceObject getSequenceObject(de.ubs.xdm.utils.databasemodel.model.db.SequenceUniqueName sun)
    • getTable

      public abstract de.ubs.xdm.utils.databasemodel.model.db.AbstractTable getTable(String schema, String name)
    • getView

      public abstract de.ubs.xdm.utils.databasemodel.model.db.AbstractView getView(String schema, String name)
    • getAlias

      public abstract de.ubs.xdm.utils.databasemodel.model.db.AbstractAlias getAlias(String schema, String name)
    • getView

      public abstract de.ubs.xdm.utils.databasemodel.model.db.AbstractView getView(UniqueName tun)
    • getTable

      public abstract de.ubs.xdm.utils.databasemodel.model.db.AbstractTable getTable(de.ubs.xdm.utils.databasemodel.model.db.TableUniqueName tun)
    • getTableMap

      public abstract Map<UniqueName,de.ubs.xdm.utils.databasemodel.model.db.AbstractTable> getTableMap()
    • setTableMap

      public abstract void setTableMap(Map<UniqueName,de.ubs.xdm.utils.databasemodel.model.db.AbstractTable> tableMap)
    • getIndexMap

      public abstract Map<UniqueName,de.ubs.xdm.utils.databasemodel.model.db.AbstractIndex> getIndexMap()
    • setIndexMap

      public abstract void setIndexMap(Map<UniqueName,de.ubs.xdm.utils.databasemodel.model.db.AbstractIndex> indexMap)
    • getAliasMap

      public abstract Map<UniqueName,de.ubs.xdm.utils.databasemodel.model.db.AbstractAlias> 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 of AbstractTablespace objects.
      Note: if this is an instance of MultiObjectContainer, the collection is not guaranteed to include all tablespaces in the container. Therefore Use the countTablespaces() method instead of Collection.size().
      Returns:
      Collection<AbstractTablespace>
    • getIndexList

      public abstract Collection<de.ubs.xdm.utils.databasemodel.model.db.AbstractIndex> getIndexList()
      Returns a collection of AbstractIndex objects.
      Note: if this is an instance of MultiObjectContainer, the collection is not guaranteed to include all index objects in the container. Therefore Use the countIndexes() method instead of Collection.size().
      Returns:
      Collection<AbstractTablespace>
    • getAliasList

      public abstract Collection<de.ubs.xdm.utils.databasemodel.model.db.AbstractAlias> getAliasList()
      Returns a collection of AbstractAlias objects.
      Note: if this is an instance of MultiObjectContainer, the collection is not guaranteed to include all aliases in the container. Therefore Use the countAliases() method instead of Collection.size().
      Returns:
      Collection<AbstractAlias>
    • getTableList

      public abstract Collection<de.ubs.xdm.utils.databasemodel.model.db.AbstractTable> getTableList()
      Returns a collection of AbstractTable objects.
      Note: if this is an instance of MultiObjectContainer, the collection is not guaranteed to include all table objects in the container. Therefore Use the countTables() method instead of Collection.size().
      Returns:
      Collection<AbstractTable>
    • getViewList

      public abstract Collection<de.ubs.xdm.utils.databasemodel.model.db.AbstractView> getViewList()
      Returns a collection of AbstractView objects.
      Note: if this is an instance of MultiObjectContainer, the collection is not guaranteed to include all views in the container. Therefore Use the countViews() method instead of Collection.size().
      Returns:
      Collection<AbstractView>
    • getSequenceList

      public abstract Collection<de.ubs.xdm.utils.databasemodel.model.db.AbstractSequenceObject> getSequenceList()
      Returns a collection of AbstractSequenceObject objects.
      Note: if this is an instance of MultiObjectContainer, the collection is not guaranteed to include all sequences in the container. Therefore Use the countSequences() method instead of Collection.size().
      Returns:
      Collection<AbstractSequence>
    • getAuxiliaryList

      public abstract Collection<de.ubs.xdm.utils.databasemodel.model.db.AuxiliaryObject> getAuxiliaryList()
      Returns a collection of AuxiliaryObjects.
      Note: if this is an instance of MultiObjectContainer, the collection is not guaranteed to include all auxiliary objects in the container. Therefore Use the countAuxiliaryObjects() method instead of Collection.size().
      Returns:
      Collection<AuxiliaryObject>
    • getSchemaList

      @Deprecated public abstract Collection<String> getSchemaList()
      Deprecated.
    • getSchemaNames

      public abstract Collection<String> 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 of MultiObjectContainer, 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

      public abstract 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

      public abstract Map<UniqueName,UniqueIdentifiable> getUniqueObjectMap()
    • setUniqueObjectMap

      public abstract void setUniqueObjectMap(Map<UniqueName,UniqueIdentifiable> uniqueObjectMap)
    • getObjectMap

      @Deprecated public abstract Map<UniqueName,UniqueIdentifiable> 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

      public abstract List<Table> 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)