public class PojoDataContext extends QueryPostprocessDataContext implements UpdateableDataContext, Serializable
DataContext used to serve MetaModel support for collections of Java
objects and key/value maps.INFORMATION_SCHEMA_NAME| Constructor and Description |
|---|
PojoDataContext()
Creates a new POJO data context that is empty but can be populated at
will.
|
PojoDataContext(List<TableDataProvider<?>> tables)
Creates a new POJO data context based on the provided
TableDataProviders. |
PojoDataContext(String schemaName,
List<TableDataProvider<?>> tables)
Creates a new POJO data context based on the provided
TableDataProviders. |
PojoDataContext(String schemaName,
TableDataProvider... tableProviders)
Creates a new POJO data context based on the provided
TableDataProviders. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addTableDataProvider(TableDataProvider<?> tableDataProvider) |
void |
executeUpdate(UpdateScript update)
Submits an
UpdateScript for execution on the DataContext. |
protected Schema |
getMainSchema() |
protected String |
getMainSchemaName() |
void |
insert(String tableName,
Map<String,Object> recordData) |
protected 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.
|
addConverter, executeCountQuery, executePrimaryKeyLookupQuery, executeQuery, getDefaultSchemaName, getMainSchemaInternal, getSchemaByNameInternal, getSchemaNamesInternal, isMainSchemaTable, isScalarFunctionMaterialized, materializeFromItem, materializeMainSchemaTable, materializeMainSchemaTable, materializeMainSchemaTable, materializeTable, materializeTablecompileQuery, executeQuery, executeQuery, getColumnByQualifiedLabel, getDefaultSchema, getSchemaByName, getSchemaNames, getSchemas, getTableByQualifiedLabel, isQualifiedPathDelim, onSchemaCacheRefreshed, parseQuery, query, refreshSchemasclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcompileQuery, executeQuery, executeQuery, executeQuery, getColumnByQualifiedLabel, getDefaultSchema, getSchemaByName, getSchemaNames, getSchemas, getTableByQualifiedLabel, parseQuery, query, refreshSchemaspublic PojoDataContext()
public PojoDataContext(List<TableDataProvider<?>> tables)
TableDataProviders.tables - public PojoDataContext(String schemaName, TableDataProvider... tableProviders)
TableDataProviders.schemaName - the name of the created schematableProviders - public PojoDataContext(String schemaName, List<TableDataProvider<?>> tables)
TableDataProviders.schemaName - the name of the created schematables - protected DataSet materializeMainSchemaTable(Table table, Column[] columns, int maxRows)
QueryPostprocessDataContextmaterializeMainSchemaTable in class QueryPostprocessDataContexttable - the table to querycolumns - the columns of the table to querymaxRows - the maximum amount of rows needed or -1 if all rows are
wanted.protected Schema getMainSchema() throws MetaModelException
getMainSchema in class QueryPostprocessDataContextMetaModelExceptionprotected String getMainSchemaName() throws MetaModelException
getMainSchemaName in class QueryPostprocessDataContextMetaModelExceptionpublic void executeUpdate(UpdateScript update)
UpdateableDataContextUpdateScript for execution on the DataContext.
Since implementations of the DataContext vary quite a lot, there
is no golden rule as to how an update script will be executed. But the
implementors should strive towards handling an UpdateScript as a
single transactional change to the data store.executeUpdate in interface UpdateableDataContextupdate - the update script to executeprotected void addTableDataProvider(TableDataProvider<?> tableDataProvider)
Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.