Package mondrian.server
Class ImplicitRepository
- java.lang.Object
-
- mondrian.server.ImplicitRepository
-
- All Implemented Interfaces:
Repository
public class ImplicitRepository extends Object implements Repository
Implementation ofRepository
for a server that doesn't have a repository: each connection in the server has its own catalog (specified in the connect string) and therefore the catalog and schema metadata will be whatever pertains to that connection. (That's why the methods have a connection parameter.)- Author:
- Julian Hyde
-
-
Constructor Summary
Constructors Constructor Description ImplicitRepository()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
getCatalogNames(RolapConnection connection, String databaseName)
Returns a list of catalog names found in the repository.org.olap4j.OlapConnection
getConnection(MondrianServer server, String databaseName, String catalogName, String roleName, Properties props)
Returns an OlapConnection object.List<String>
getDatabaseNames(RolapConnection connection)
Returns a list of database names found in this repository.List<Map<String,Object>>
getDatabases(RolapConnection connection)
Returns a list of databases properties collections, one per database configured on this server.Map<String,RolapSchema>
getRolapSchemas(RolapConnection connection, String databaseName, String catalogName)
Must return a map of schema names and schema objects who are children of the specified datasource and catalog.void
shutdown()
Shuts down and terminates a repository.
-
-
-
Method Detail
-
getCatalogNames
public List<String> getCatalogNames(RolapConnection connection, String databaseName)
Description copied from interface:Repository
Returns a list of catalog names found in the repository.- Specified by:
getCatalogNames
in interfaceRepository
- Parameters:
connection
- A connection object from which to obtain the metadata. May be null or the Repository implementation itself might ignore it.databaseName
- The parent database name of which we want to list the catalogs.- Returns:
- A list of catalog names found in this repository.
-
getDatabaseNames
public List<String> getDatabaseNames(RolapConnection connection)
Description copied from interface:Repository
Returns a list of database names found in this repository.- Specified by:
getDatabaseNames
in interfaceRepository
- Parameters:
connection
- A connection object from which to obtain the metadata. May be null or the Repository implementation itself might ignore it.- Returns:
- A list of database names found in this repository.
-
getRolapSchemas
public Map<String,RolapSchema> getRolapSchemas(RolapConnection connection, String databaseName, String catalogName)
Description copied from interface:Repository
Must return a map of schema names and schema objects who are children of the specified datasource and catalog.- Specified by:
getRolapSchemas
in interfaceRepository
- Parameters:
connection
- The connection from which to obtain the metadata. May be null or the Repository implementation itself might ignore it.databaseName
- The database name predicate for the list of returned schemas.catalogName
- The catalog name predicate for the list of returned schemas.- Returns:
- A map of schema names associated to schema objects, as found in the repository..
-
getConnection
public org.olap4j.OlapConnection getConnection(MondrianServer server, String databaseName, String catalogName, String roleName, Properties props)
Description copied from interface:Repository
Returns an OlapConnection object.- Specified by:
getConnection
in interfaceRepository
- Parameters:
server
- The MondrianServer to use.databaseName
- The database name. Can be null.catalogName
- The catalog name. Can be null.roleName
- The role name. Can be null.props
- Additional connection properties.- Returns:
- An opened olap connection.
-
getDatabases
public List<Map<String,Object>> getDatabases(RolapConnection connection)
Description copied from interface:Repository
Returns a list of databases properties collections, one per database configured on this server.- Specified by:
getDatabases
in interfaceRepository
- Parameters:
connection
- The connection from which to obtain the metadata. May be null or the Repository implementation itself might ignore it.- Returns:
- A list of databases properties collections
-
shutdown
public void shutdown()
Description copied from interface:Repository
Shuts down and terminates a repository.- Specified by:
shutdown
in interfaceRepository
-
-