public class CatalogFactoryBase extends CatalogFactory
A simple implementation of CatalogFactory.
| Modifier and Type | Field | Description |
|---|---|---|
private Catalog |
catalog |
The default
Catalog for this CatalogFactory. |
private java.util.Map |
catalogs |
Map of named
Catalogs, keyed by catalog name. |
DELIMITER| Constructor | Description |
|---|---|
CatalogFactoryBase() |
Construct an empty instance of
CatalogFactoryBase. |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addCatalog(java.lang.String name,
Catalog catalog) |
Adds a named instance of Catalog to the factory (for subsequent
retrieval later).
|
Catalog |
getCatalog() |
Gets the default instance of Catalog associated with the factory
(if any); otherwise, return
null. |
Catalog |
getCatalog(java.lang.String name) |
Retrieves a Catalog instance by name (if any); otherwise
return
null. |
java.util.Iterator |
getNames() |
|
void |
setCatalog(Catalog catalog) |
Sets the default instance of Catalog associated with the factory.
|
clear, getCommand, getInstanceprivate Catalog catalog
The default Catalog for this CatalogFactory.
private java.util.Map catalogs
Map of named Catalogs, keyed by catalog name.
public CatalogFactoryBase()
Construct an empty instance of CatalogFactoryBase. This
constructor is intended solely for use by CatalogFactory.
public Catalog getCatalog()
Gets the default instance of Catalog associated with the factory
(if any); otherwise, return null.
getCatalog in class CatalogFactorypublic void setCatalog(Catalog catalog)
Sets the default instance of Catalog associated with the factory.
setCatalog in class CatalogFactorycatalog - the default Catalog instancepublic Catalog getCatalog(java.lang.String name)
Retrieves a Catalog instance by name (if any); otherwise
return null.
getCatalog in class CatalogFactoryname - the name of the Catalog to retrievepublic void addCatalog(java.lang.String name,
Catalog catalog)
Adds a named instance of Catalog to the factory (for subsequent retrieval later).
addCatalog in class CatalogFactoryname - the name of the Catalog to addcatalog - the Catalog to addpublic java.util.Iterator getNames()
Return an Iterator over the set of named
Catalogs known to this CatalogFactory.
If there are no known catalogs, an empty Iterator is returned.
getNames in class CatalogFactory