|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eobjects.metamodel.AbstractDataContext
public abstract class AbstractDataContext
Abstract implementation of the DataContext interface. Provides convenient implementations of all trivial and datastore-independent methods.
| Constructor Summary | |
|---|---|
AbstractDataContext()
|
|
| Method Summary | |
|---|---|
CompiledQuery |
compileQuery(Query query)
Compiles a query, preparing it for reuse. |
DataSet |
executeQuery(CompiledQuery compiledQuery,
Object... values)
Executes a compiled query with given values as parameters. |
DataSet |
executeQuery(String queryString)
Parses and executes a string-based SQL query. |
Column |
getColumnByQualifiedLabel(String columnName)
Finds a column in the DataContext based on a fully qualified column label. |
Schema |
getDefaultSchema()
Gets the default schema of this DataContext. |
protected abstract String |
getDefaultSchemaName()
Gets the name of the default schema. |
Schema |
getSchemaByName(String name)
Gets a schema by a specified name. |
protected abstract Schema |
getSchemaByNameInternal(String name)
Gets a specific schema from the non-abstract implementation. |
String[] |
getSchemaNames()
m Gets the names of all schemas within this DataContext. |
protected abstract String[] |
getSchemaNamesInternal()
Gets schema names from the non-abstract implementation. |
Schema[] |
getSchemas()
Gets all schemas within this DataContext. |
Table |
getTableByQualifiedLabel(String tableName)
Finds a table in the DataContext based on a fully qualified table label. |
protected boolean |
isQualifiedPathDelim(char c)
|
Query |
parseQuery(String queryString)
Parses a string-based SQL query and produces a corresponding Query object. |
InitFromBuilder |
query()
Starts building a query using the query builder API. |
DataContext |
refreshSchemas()
Enforces a refresh of the schemas. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eobjects.metamodel.DataContext |
|---|
executeQuery |
| Constructor Detail |
|---|
public AbstractDataContext()
| Method Detail |
|---|
public final DataContext refreshSchemas()
refreshSchemas in interface DataContext
public final Schema[] getSchemas()
throws MetaModelException
getSchemas in interface DataContextMetaModelException - if an error occurs retrieving the schema model
public final String[] getSchemaNames()
throws MetaModelException
getSchemaNames in interface DataContextMetaModelException - if an error occurs retrieving the schema model
public final Schema getDefaultSchema()
throws MetaModelException
getDefaultSchema in interface DataContextMetaModelException - if an error occurs retrieving the schema modelpublic final InitFromBuilder query()
query in interface DataContext
public Query parseQuery(String queryString)
throws MetaModelException
Query object.
parseQuery in interface DataContextqueryString - the SQL query to parse
Query object corresponding to the SQL query.
MetaModelException - in case the parsing was unsuccesful.
public CompiledQuery compileQuery(Query query)
throws MetaModelException
DataContextQueryParameters as operands in the
WHERE clause, making it possible to reuse the same query with different
parameter values.
compileQuery in interface DataContextquery - the query object to execute, possibly holding one or more
QueryParameters.
CompiledQuery after preparing the query
MetaModelException - if preparing the query is unsuccesfulCompiledQuery,
QueryParameter
public DataSet executeQuery(CompiledQuery compiledQuery,
Object... values)
DataContext
executeQuery in interface DataContextcompiledQuery - the compiledQuery object to executevalues - the values for parameters in the CompiledQuery.
DataSet produced from executing the query.
public final DataSet executeQuery(String queryString)
throws MetaModelException
DataContext.parseQuery(String) and then DataContext.executeQuery(Query) with
the parsed query.
executeQuery in interface DataContextDataSet produced from executing the query
MetaModelException - if either parsing or executing the query produces an
exception
public final Schema getSchemaByName(String name)
throws MetaModelException
getSchemaByName in interface DataContextname - the name of the desired schema
MetaModelException - if an error occurs retrieving the schema modelpublic final Column getColumnByQualifiedLabel(String columnName)
getColumnByQualifiedLabel in interface DataContextpublic final Table getTableByQualifiedLabel(String tableName)
getTableByQualifiedLabel in interface DataContextprotected boolean isQualifiedPathDelim(char c)
protected abstract String[] getSchemaNamesInternal()
refreshSchemas() method is
called.
protected abstract String getDefaultSchemaName()
protected abstract Schema getSchemaByNameInternal(String name)
refreshSchemas() method is
called.
name - the name of the schema to get
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||