|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.metamodel.AbstractDataContext
org.apache.metamodel.QueryPostprocessDataContext
org.apache.metamodel.excel.ExcelDataContext
public final class ExcelDataContext
DataContext implementation to use for Excel spreadsheets.
This DataContext supports both the "old" .xls format and the "new" .xlsx
format, and saves the user the trouble of figuring out which one to use,
simply by detecting it at runtime and delegating to the appropriate
implementation.
| Field Summary |
|---|
| Fields inherited from class org.apache.metamodel.QueryPostprocessDataContext |
|---|
INFORMATION_SCHEMA_NAME |
| Constructor Summary | |
|---|---|
ExcelDataContext(File file)
Constructs an Excel DataContext based on a file, with default configuration |
|
ExcelDataContext(File file,
ExcelConfiguration configuration)
Constructs an Excel DataContext based on a resource and a custom configuration. |
|
ExcelDataContext(Resource resource,
ExcelConfiguration configuration)
|
|
| Method Summary | |
|---|---|
void |
executeUpdate(UpdateScript update)
|
ExcelConfiguration |
getConfiguration()
Gets the Excel configuration used. |
File |
getFile()
Deprecated. |
protected Schema |
getMainSchema()
|
protected String |
getMainSchemaName()
|
Resource |
getResource()
Gets the Excel resource being read |
protected Class<? extends org.apache.metamodel.excel.SpreadsheetReaderDelegate> |
getSpreadsheetReaderDelegateClass()
Convenient method for testing and inspecting internal state. |
DataSet |
materializeMainSchemaTable(Table table,
Column[] columns,
int maxRows)
|
protected void |
notifyTablesModified()
|
| Methods inherited from class org.apache.metamodel.QueryPostprocessDataContext |
|---|
addConverter, executeCountQuery, executePrimaryKeyLookupQuery, executeQuery, getDefaultSchemaName, getMainSchemaInternal, getSchemaByNameInternal, getSchemaNamesInternal, isMainSchemaTable, materializeFromItem, materializeMainSchemaTable, materializeMainSchemaTable, materializeTable |
| Methods inherited from class org.apache.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 |
| Methods inherited from interface org.apache.metamodel.DataContext |
|---|
compileQuery, executeQuery, executeQuery, executeQuery, getColumnByQualifiedLabel, getDefaultSchema, getSchemaByName, getSchemaNames, getSchemas, getTableByQualifiedLabel, parseQuery, query, refreshSchemas |
| Constructor Detail |
|---|
public ExcelDataContext(File file)
file -
public ExcelDataContext(File file,
ExcelConfiguration configuration)
file - configuration -
public ExcelDataContext(Resource resource,
ExcelConfiguration configuration)
| Method Detail |
|---|
public ExcelConfiguration getConfiguration()
@Deprecated public File getFile()
public Resource getResource()
protected String getMainSchemaName()
throws MetaModelException
getMainSchemaName in class QueryPostprocessDataContextMetaModelException
public DataSet materializeMainSchemaTable(Table table,
Column[] columns,
int maxRows)
materializeMainSchemaTable in class QueryPostprocessDataContext
protected Schema getMainSchema()
throws MetaModelException
getMainSchema in class QueryPostprocessDataContextMetaModelExceptionprotected Class<? extends org.apache.metamodel.excel.SpreadsheetReaderDelegate> getSpreadsheetReaderDelegateClass()
protected void notifyTablesModified()
public void executeUpdate(UpdateScript update)
executeUpdate in interface UpdateableDataContext
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||