dk.eobjects.metamodel
Class QueryPostprocessDataContextStrategy
java.lang.Object
dk.eobjects.metamodel.QueryPostprocessDataContextStrategy
- All Implemented Interfaces:
- IDataContextStrategy
- Direct Known Subclasses:
- AccessDataContextStrategy, CsvDataContextStrategy, DbaseDataContextStrategy, ExcelDataContextStrategy, XmlDataContextStrategy
public abstract class QueryPostprocessDataContextStrategy
- extends java.lang.Object
- implements IDataContextStrategy
Abstract DataContextStrategy for data sources that do not support SQL
queries. Instead this superclass only requires that a subclass can
materialize a single table at a time. Then the query will be executed by post
processing data client-side.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INFORMATION_SCHEMA_NAME
public static final java.lang.String INFORMATION_SCHEMA_NAME
- See Also:
- Constant Field Values
_log
protected final org.apache.commons.logging.Log _log
QueryPostprocessDataContextStrategy
public QueryPostprocessDataContextStrategy()
setColumnTypeTransformer
public void setColumnTypeTransformer(java.lang.String qualifiedColumnName,
ColumnTypeTransformer transformer)
setColumnTypeTransformer
public void setColumnTypeTransformer(Column column,
ColumnTypeTransformer transformer)
executeQuery
public DataSet executeQuery(Query query)
- Description copied from interface:
IDataContextStrategy
- Executes a query.
- Specified by:
executeQuery in interface IDataContextStrategy
- Returns:
- a dataset representing the result of the query.
transformColumnTypes
public QueryPostprocessDataContextStrategy transformColumnTypes(Table table)
transformColumnTypes
public QueryPostprocessDataContextStrategy transformColumnTypes(Column... columns)
autoTransformColumnTypes
public QueryPostprocessDataContextStrategy autoTransformColumnTypes()
- Performs column type transformation for the whole schema
materializeFromItem
public DataSet materializeFromItem(FromItem fromItem)
materializeTable
protected DataSet materializeTable(Table table,
Column[] columns,
int maxRows)
getSchemaNames
public java.lang.String[] getSchemaNames()
throws MetaModelException
- Specified by:
getSchemaNames in interface IDataContextStrategy
- Returns:
- an array of schema names within this datastore.
- Throws:
MetaModelException
getDefaultSchemaName
public java.lang.String getDefaultSchemaName()
throws MetaModelException
- Specified by:
getDefaultSchemaName in interface IDataContextStrategy
- Returns:
- the name of the default schema provided by this strategy or null
if none is present or possible to deterministically tell.
- Throws:
MetaModelException
getSchemaByName
public Schema getSchemaByName(java.lang.String name)
throws MetaModelException
- Specified by:
getSchemaByName in interface IDataContextStrategy
- Returns:
- the schema with the specified name, or null if such a schema is
not available
- Throws:
MetaModelException
getMainSchemaInternal
protected Schema getMainSchemaInternal()
getMainSchema
protected abstract Schema getMainSchema()
throws MetaModelException
- Returns:
- the main schema that subclasses of this class produce
- Throws:
MetaModelException
getMainSchemaName
protected abstract java.lang.String getMainSchemaName()
throws MetaModelException
- Returns:
- the name of the main schema that subclasses of this class produce
- Throws:
MetaModelException
materializeMainSchemaTable
public abstract DataSet materializeMainSchemaTable(Table table,
Column[] columns,
int maxRows)
- Executes a simple one-table query against a table in the main schema of
the subclasses of this class.
- Parameters:
table - the table to querycolumns - the columns to includemaxRows - the maximum amount of rows needed or -1 if all rows are
wanted.
- Returns:
- a dataset with the raw table content of the colums
Copyright © 2007-2010. All Rights Reserved.