org.eobjects.metamodel
Class CompositeDataContext

java.lang.Object
  extended by org.eobjects.metamodel.AbstractDataContext
      extended by org.eobjects.metamodel.CompositeDataContext
All Implemented Interfaces:
DataContext

public class CompositeDataContext
extends AbstractDataContext

DataContext for composite datacontexts. Composite DataContexts wrap several other datacontexts and makes cross-datastore querying possible.

Author:
Kasper Sørensen

Constructor Summary
CompositeDataContext(Collection<DataContext> delegates)
           
CompositeDataContext(DataContext... delegates)
           
 
Method Summary
 DataSet executeQuery(Query query)
          Executes a query against the DataContext.
 String getDefaultSchemaName()
          Gets the name of the default schema.
 Schema getSchemaByNameInternal(String name)
          Gets a specific schema from the non-abstract implementation.
 String[] getSchemaNamesInternal()
          Gets schema names from the non-abstract implementation.
 
Methods inherited from class org.eobjects.metamodel.AbstractDataContext
compileQuery, executeQuery, executeQuery, getColumnByQualifiedLabel, getDefaultSchema, getSchemaByName, getSchemaNames, getSchemas, getTableByQualifiedLabel, isQualifiedPathDelim, parseQuery, query, refreshSchemas
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeDataContext

public CompositeDataContext(DataContext... delegates)

CompositeDataContext

public CompositeDataContext(Collection<DataContext> delegates)
Method Detail

executeQuery

public DataSet executeQuery(Query query)
                     throws MetaModelException
Description copied from interface: DataContext
Executes a query against the DataContext.

Parameters:
query - the query object to execute
Returns:
the DataSet produced from executing the query
Throws:
MetaModelException - if the specified query does not make sense or cannot be executed because of restraints on the type of datastore.

getDefaultSchemaName

public String getDefaultSchemaName()
                            throws MetaModelException
Description copied from class: AbstractDataContext
Gets the name of the default schema.

Specified by:
getDefaultSchemaName in class AbstractDataContext
Returns:
the default schema name.
Throws:
MetaModelException

getSchemaByNameInternal

public Schema getSchemaByNameInternal(String name)
                               throws MetaModelException
Description copied from class: AbstractDataContext
Gets a specific schema from the non-abstract implementation. This schema object will be cached except if the AbstractDataContext.refreshSchemas() method is called.

Specified by:
getSchemaByNameInternal in class AbstractDataContext
Parameters:
name - the name of the schema to get
Returns:
a schema object representing the named schema, or null if no such schema exists.
Throws:
MetaModelException

getSchemaNamesInternal

public String[] getSchemaNamesInternal()
                                throws MetaModelException
Description copied from class: AbstractDataContext
Gets schema names from the non-abstract implementation. These schema names will be cached except if the AbstractDataContext.refreshSchemas() method is called.

Specified by:
getSchemaNamesInternal in class AbstractDataContext
Returns:
an array of schema names.
Throws:
MetaModelException


Copyright © 2007-2013. All Rights Reserved.