public class CatalogFactoryBase extends CatalogFactory
A simple implementation of CatalogFactory
.
DELIMITER
Constructor and Description |
---|
CatalogFactoryBase()
Construct an empty instance of
CatalogFactoryBase . |
Modifier and Type | Method and Description |
---|---|
void |
addCatalog(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(String name)
Retrieves a Catalog instance by name (if any); otherwise
return
null . |
Iterator |
getNames()
|
void |
setCatalog(Catalog catalog)
Sets the default instance of Catalog associated with the factory.
|
clear, getCommand, getInstance
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 CatalogFactory
public void setCatalog(Catalog catalog)
Sets the default instance of Catalog associated with the factory.
setCatalog
in class CatalogFactory
catalog
- the default Catalog instancepublic Catalog getCatalog(String name)
Retrieves a Catalog instance by name (if any); otherwise
return null
.
getCatalog
in class CatalogFactory
name
- the name of the Catalog to retrievepublic void addCatalog(String name, Catalog catalog)
Adds a named instance of Catalog to the factory (for subsequent retrieval later).
addCatalog
in class CatalogFactory
name
- the name of the Catalog to addcatalog
- the Catalog to addpublic Iterator getNames()
Return an Iterator
over the set of named
Catalog
s known to this CatalogFactory
.
If there are no known catalogs, an empty Iterator is returned.
getNames
in class CatalogFactory
Copyright © 2003–2021 The Apache Software Foundation. All rights reserved.