public class ExecutionContext
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
defaultDatamodelFolder |
Constructor and Description |
---|
ExecutionContext()
Default constructor.
|
ExecutionContext(CommandLine commandLine)
Creates new context with attributes taken from
ExecutionContext . |
ExecutionContext(ExecutionContext other)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
getAnalyseAlias()
If
true , Look for aliases while analysing the DB |
boolean |
getAnalyseSynonym()
If
true , Look for synonyms while analysing the DB |
boolean |
getAnalyseView()
If
true , Look for views while analysing the DB |
java.lang.String |
getCurrentConnectionAlias() |
java.lang.String |
getCurrentModelSubfolder()
Gets folder of current data model.
|
java.lang.String |
getDatamodelFolder()
Gets folder holding the data model.
|
java.net.URL |
getDataModelURL()
Gets URL of the current data model (the datamodels base folder)
|
java.util.Map<java.lang.String,java.lang.String> |
getDeletionSchemaMapping() |
java.lang.String |
getImportFilterMappingTableSchema()
Gets schema in which the import-filter mapping tables will be created
|
java.lang.Integer |
getIsolationLevel()
Gets IsolationLevel.
|
LayoutStorage |
getLayoutStorage() |
java.lang.Long |
getLimit() |
boolean |
getNoRowid()
If
true , Use primary keys to determine row identity (instead
of rowid-column) |
boolean |
getNoSorting()
If
true , The exported rows will not be sorted according to
foreign key constraints |
int |
getNumberOfEntities()
Gets maximum number of entities per insert-statement (in export-file,
default is 10)
|
int |
getNumberOfThreads()
Gets number of threads (default is 1)
|
boolean |
getOrderByPK()
If
true , the exported rows will be ordered according to the primary key. |
java.util.Map<java.lang.String,java.lang.String> |
getParameters()
Gets parameters
|
ProgressListenerRegistry |
getProgressListenerRegistry()
Gets the
ProgressListenerRegistry . |
java.lang.String |
getQualifiedDatamodelFolder()
Gets fully qualified folder name of current data model.
|
boolean |
getQualifyNames()
If
true , Add schema prefix to table names after analysing
the DB |
java.util.Map<java.lang.String,java.lang.String> |
getSchemaMapping() |
static java.util.Map<java.lang.String,java.lang.String> |
getSchemaMapping(java.lang.String rawschemamapping) |
WorkingTableScope |
getScope()
Gets scope of working tables, GLOBAL, SESSION_LOCAL or LOCAL_DATABASE
|
ScriptFormat |
getScriptFormat()
Gets the script format.
|
java.util.Map<java.lang.String,java.lang.String> |
getSourceSchemaMapping() |
DBMS |
getTargetDBMS()
Gets target-DBMS: ORACLE, MSSQL, DB2, MySQL, POSTGRESQL, SYBASE, SQLITE,
HSQL or H2
|
boolean |
getTransactional()
If
true , Import rows in a single transaction |
java.util.Set<java.lang.String> |
getUpkDomain() |
boolean |
getUpsertOnly()
If
true , Generate 'upsert'-statements for all entities (in
export-file) |
boolean |
getUTF8()
If
true , Use UTF-8 encoding |
java.lang.String |
getWorkingTableSchema()
Gets schema in which the working tables will be created
|
java.lang.String |
getXmlDatePattern()
Gets pattern for dates in XML and LIQUIBASE_XML export file
|
java.lang.String |
getXmlRootTag()
Gets root tag of XML export file
|
java.lang.String |
getXmlTimePattern()
Gets pattern for times in XML and LIQUIBASE_XML export file
|
java.lang.String |
getXmlTimeStampPattern()
Gets pattern for time-stamps in XML and LIQUIBASE_XML export file
|
boolean |
isAbortInCaseOfInconsistency() |
boolean |
isEmbedded()
Is the subsetter embedded into an application?
|
boolean |
isIndependentWorkingTables()
Create working tables that are independent of the extraction model.
|
boolean |
isInsertIncrementally()
If
true , collects the rows using multiple insert operations with a limited number of rows per operation. |
void |
setAbortInCaseOfInconsistency(boolean abortInCaseOfInconsitency) |
void |
setAnalyseAlias(boolean analyseAlias)
If
true , Look for aliases while analysing the DB |
void |
setAnalyseSynonym(boolean analyseSynonym)
If
true , Look for synonyms while analysing the DB |
void |
setAnalyseView(boolean analyseView)
If
true , Look for views while analysing the DB |
void |
setCurrentConnectionAlias(java.lang.String currentConnectionAlias) |
void |
setCurrentModelSubfolder(java.lang.String modelFolder)
Sets folder of current data model.
|
void |
setDatamodelFolder(java.lang.String datamodelFolder)
Sets folder holding the data model.
|
void |
setDataModelURL(java.net.URL datamodelURL)
Sets URL of the current data model (the datamodels base folder)
|
void |
setDeletionSchemaMapping(java.util.Map<java.lang.String,java.lang.String> deletionSchemaMapping) |
void |
setEmbedded(boolean embedded) |
void |
setImportFilterMappingTableSchema(java.lang.String importFilterMappingTableSchema)
Sets schema in which the import-filter mapping tables will be created
|
void |
setIndependentWorkingTables(boolean independentWorkingTables)
Create working tables that are independent of the extraction model.
|
void |
setInsertIncrementally(boolean insertIncrementally)
If
true , collects the rows using multiple insert operations with a limited number of rows per operation. |
void |
setIsolationLevel(java.lang.Integer isolationLevel)
Sets IsolationLevel.
|
void |
setLayoutStorage(LayoutStorage layoutStorage) |
void |
setLimit(java.lang.Long limit) |
void |
setNoRowid(boolean noRowid)
If
true , Use primary keys to determine row identity (instead
of rowid-column) |
void |
setNoSorting(boolean noSorting)
If
true , The exported rows will not be sorted according to
foreign key constraints |
void |
setNumberOfEntities(int numberOfEntities)
Sets maximum number of entities per insert-statement (in export-file,
default is 10)
|
void |
setNumberOfThreads(int numberOfThreads)
Sets number of threads (default is 1)
|
void |
setOrderByPK(boolean orderByPK) |
void |
setParameter(java.lang.String name,
java.lang.String value)
Sets a parameter.
|
void |
setQualifyNames(boolean qualifyNames)
If
true , Add schema prefix to table names after analysing
the DB |
void |
setSchemaMapping(java.util.Map<java.lang.String,java.lang.String> schemaMapping)
Sets source schema map
|
void |
setScope(WorkingTableScope scope)
Sets scope of working tables, GLOBAL, SESSION_LOCAL or LOCAL_DATABASE
|
void |
setScriptFormat(ScriptFormat scriptFormat)
Sets the script format.
|
void |
setSourceSchemaMapping(java.util.Map<java.lang.String,java.lang.String> sourceSchemaMapping) |
void |
setTargetDBMS(DBMS targetDBMS)
Sets target-DBMS: ORACLE, MSSQL, DB2, MySQL, POSTGRESQL, SYBASE, SQLITE,
HSQL or H2
|
void |
setTransactional(boolean transactional)
If
true , Import rows in a single transaction |
void |
setUpkDomain(java.util.Set<java.lang.String> upkDomain) |
void |
setUpsertOnly(boolean upsertOnly)
If
true , Generate 'upsert'-statements for all entities (in
export-file) |
void |
setUTF8(boolean uTF8)
If
true , Use UTF-8 encoding |
void |
setWorkingTableSchema(java.lang.String workingTableSchema)
Sets schema in which the working tables will be created
|
void |
setXmlDatePattern(java.lang.String xmlDatePattern)
Sets pattern for dates in XML and LIQUIBASE_XML export file
|
void |
setXmlRootTag(java.lang.String xmlRootTag)
Sets root tag of XML export file
|
void |
setXmlTimePattern(java.lang.String xmlTimePattern)
Sets pattern for times in XML and LIQUIBASE_XML export file
|
void |
setXmlTimeStampPattern(java.lang.String xmlTimeStampPattern)
Sets pattern for time-stamps in XML and LIQUIBASE_XML export file
|
public ExecutionContext()
public ExecutionContext(ExecutionContext other)
public ExecutionContext(CommandLine commandLine)
ExecutionContext
.executionContext
- the command linepublic boolean getUTF8()
true
, Use UTF-8 encodingtrue
if Use UTF-8 encodingpublic void setUTF8(boolean uTF8)
true
, Use UTF-8 encodinguTF8
- true
if Use UTF-8 encodingpublic DBMS getTargetDBMS()
public void setTargetDBMS(DBMS targetDBMS)
targetDBMS
- target-DBMS: ORACLE, MSSQL, DB2, MySQL, POSTGRESQL, SYBASE,
SQLITE, HSQL or H2public java.lang.String getXmlRootTag()
public void setXmlRootTag(java.lang.String xmlRootTag)
xmlRootTag
- root tag of XML export filepublic java.lang.String getXmlDatePattern()
public void setXmlDatePattern(java.lang.String xmlDatePattern)
xmlDatePattern
- pattern for dates in XML and LIQUIBASE_XML export filepublic java.lang.String getXmlTimePattern()
public void setXmlTimePattern(java.lang.String xmlTimePattern)
xmlTimePattern
- pattern for times in XML and LIQUIBASE_XML export filepublic java.lang.String getXmlTimeStampPattern()
public void setXmlTimeStampPattern(java.lang.String xmlTimeStampPattern)
xmlTimeStampPattern
- pattern for time-stamps in XML and LIQUIBASE_XML export filepublic boolean getQualifyNames()
true
, Add schema prefix to table names after analysing
the DBtrue
if Add schema prefix to table names after
analysing the DBpublic void setQualifyNames(boolean qualifyNames)
true
, Add schema prefix to table names after analysing
the DBqualifyNames
- true
if Add schema prefix to table names after
analysing the DBpublic boolean getAnalyseAlias()
true
, Look for aliases while analysing the DBtrue
if Look for aliases while analysing the DBpublic void setAnalyseAlias(boolean analyseAlias)
true
, Look for aliases while analysing the DBanalyseAlias
- true
if Look for aliases while analysing the DBpublic boolean getAnalyseSynonym()
true
, Look for synonyms while analysing the DBtrue
if Look for synonyms while analysing the DBpublic void setAnalyseSynonym(boolean analyseSynonym)
true
, Look for synonyms while analysing the DBanalyseSynonym
- true
if Look for synonyms while analysing the DBpublic boolean getAnalyseView()
true
, Look for views while analysing the DBtrue
if Look for views while analysing the DBpublic void setAnalyseView(boolean analyseView)
true
, Look for views while analysing the DBanalyseView
- true
if Look for views while analysing the DBpublic int getNumberOfThreads()
public void setNumberOfThreads(int numberOfThreads)
numberOfThreads
- number of threads (default is 1)public int getNumberOfEntities()
public void setNumberOfEntities(int numberOfEntities)
numberOfEntities
- maximum number of entities per insert-statement (in
export-file, default is 10)public boolean getUpsertOnly()
true
, Generate 'upsert'-statements for all entities (in
export-file)true
if Generate 'upsert'-statements for all
entities (in export-file)public void setUpsertOnly(boolean upsertOnly)
true
, Generate 'upsert'-statements for all entities (in
export-file)upsertOnly
- true
if Generate 'upsert'-statements for all
entities (in export-file)public WorkingTableScope getScope()
public void setScope(WorkingTableScope scope)
scope
- scope of working tables, GLOBAL, SESSION_LOCAL or
LOCAL_DATABASEpublic java.lang.String getWorkingTableSchema()
public void setWorkingTableSchema(java.lang.String workingTableSchema)
workingTableSchema
- schema in which the working tables will be createdpublic java.lang.String getDatamodelFolder()
public void setDatamodelFolder(java.lang.String datamodelFolder)
datamodelFolder
- folder holding the data model. Defaults to './datamodel'public java.lang.String getQualifiedDatamodelFolder()
public boolean getNoSorting()
true
, The exported rows will not be sorted according to
foreign key constraintstrue
if The exported rows will not be sorted
according to foreign key constraintspublic void setNoSorting(boolean noSorting)
true
, The exported rows will not be sorted according to
foreign key constraintsnoSorting
- true
if The exported rows will not be sorted
according to foreign key constraintspublic boolean getOrderByPK()
true
, the exported rows will be ordered according to the primary key.public void setOrderByPK(boolean orderByPK)
orderByPK
- if true
, the exported rows will be ordered according to the primary keypublic boolean getTransactional()
true
, Import rows in a single transactiontrue
if Import rows in a single transactionpublic void setTransactional(boolean transactional)
true
, Import rows in a single transactiontransactional
- true
if Import rows in a single transactionpublic java.lang.Integer getIsolationLevel()
Connection.setTransactionIsolation(int)
public void setIsolationLevel(java.lang.Integer isolationLevel)
Connection.setTransactionIsolation(int)
public boolean getNoRowid()
true
, Use primary keys to determine row identity (instead
of rowid-column)true
if Use primary keys to determine row identity
(instead of rowid-column)public void setNoRowid(boolean noRowid)
true
, Use primary keys to determine row identity (instead
of rowid-column)noRowid
- true
if Use primary keys to determine row
identity (instead of rowid-column)public java.lang.String getImportFilterMappingTableSchema()
public void setImportFilterMappingTableSchema(java.lang.String importFilterMappingTableSchema)
importFilterMappingTableSchema
- schema in which the import-filter mapping tables will be
createdpublic boolean isInsertIncrementally()
true
, collects the rows using multiple insert operations with a limited number of rows per operation. public void setInsertIncrementally(boolean insertIncrementally)
true
, collects the rows using multiple insert operations with a limited number of rows per operation. public boolean isAbortInCaseOfInconsistency()
true
, Subsetter.execute(String, File)
throws an
InconsistentSubsettingResultException
if the result is inconsistent
due to insufficient transaction isolationpublic void setAbortInCaseOfInconsistency(boolean abortInCaseOfInconsitency)
abortInCaseOfInconsitency
- if true
, Subsetter.execute(String, File)
throws an
InconsistentSubsettingResultException
if the result is inconsistent
due to insufficient transaction isolationpublic boolean isEmbedded()
public void setEmbedded(boolean embedded)
embedded
- is the subsetter embedded into an application?public java.util.Map<java.lang.String,java.lang.String> getParameters()
public void setParameter(java.lang.String name, java.lang.String value)
name
- parameter namevalue
- valuepublic static java.util.Map<java.lang.String,java.lang.String> getSchemaMapping(java.lang.String rawschemamapping)
public java.util.Map<java.lang.String,java.lang.String> getSchemaMapping()
public void setSchemaMapping(java.util.Map<java.lang.String,java.lang.String> schemaMapping)
schemaMapping
- source schema mappublic void setSourceSchemaMapping(java.util.Map<java.lang.String,java.lang.String> sourceSchemaMapping)
sourceSchemaMapping
- the sourceSchemaMapping to setpublic java.util.Map<java.lang.String,java.lang.String> getSourceSchemaMapping()
public void setDeletionSchemaMapping(java.util.Map<java.lang.String,java.lang.String> deletionSchemaMapping)
deletionSchemaMapping
- the sourceSchemaMapping to setpublic java.util.Map<java.lang.String,java.lang.String> getDeletionSchemaMapping()
public ScriptFormat getScriptFormat()
public void setScriptFormat(ScriptFormat scriptFormat)
public void setCurrentModelSubfolder(java.lang.String modelFolder)
modelFolder
- the folder, null
for default modelpublic java.lang.String getCurrentModelSubfolder()
null
for default modelpublic java.net.URL getDataModelURL()
public void setDataModelURL(java.net.URL datamodelURL)
public ProgressListenerRegistry getProgressListenerRegistry()
ProgressListenerRegistry
.ProgressListenerRegistry
public LayoutStorage getLayoutStorage()
public void setLayoutStorage(LayoutStorage layoutStorage)
public java.lang.Long getLimit()
public void setLimit(java.lang.Long limit)
limit
- maximum allowed number of exported rows. If this limit is exceeded, the export aborts with an error.public boolean isIndependentWorkingTables()
public void setIndependentWorkingTables(boolean independentWorkingTables)
public java.util.Set<java.lang.String> getUpkDomain()
public void setUpkDomain(java.util.Set<java.lang.String> upkDomain)
public java.lang.String getCurrentConnectionAlias()
public void setCurrentConnectionAlias(java.lang.String currentConnectionAlias)