public class Task extends OnException implements ObjectStorage, LocationProvider
OnTask
interface.Modifier and Type | Field and Description |
---|---|
static int |
AS_CONFIGURED
The AS_CONFIGURED - use default settings for the task.
|
static String |
ASYNCHRONOUS_ATTR |
static int |
BEFORE_ETL
The BEFORE_ETL task - executed before etl process has started.
|
static String |
BEFORE_ETL_STR
The BEFORE_ETL task code.
|
static String |
COND_CONNECTION_ATTR |
static String |
COND_lANG_ATTR |
static String |
CONDITION_ATTR |
static String |
ENABLED_ATTR |
static int |
INLINE
The INLINE task - executed for each row of the data set druring extract.
|
static String |
INLINE_STR
The INLINE task code.
|
static String |
METRICS_ENABLED_ATTR |
static String |
NAME_ATTR |
static String |
ON_EXCEPTION_ATTR |
static String |
ON_EXCEPTION_MASK_ATTR |
static String |
ON_EXCEPTION_MESSAGE_ATTR |
static String |
ON_EXCEPTION_STR
The ON_EXCEPTION task code.
|
static int |
ON_EXCEPTION_TASK
The ON EXCEPTION task executed when there is an exception during extract or load.
|
static int |
POST
The POST task - executed after extract or load.
|
static String |
POST_STR
The POST task code.
|
static int |
PRE
The PRE task - executed before extract or load.
|
static String |
PRE_STR
The PRE task code.
|
static Map<String,Integer> |
SCOPE
The DEST_SCOPE.
|
static String |
SCOPE_AFTER_ATTR |
static String |
SCOPE_INLINE_ATTR |
static String |
SCOPE_ON_EXCEPTION_ATTR |
static String |
SCOPE_PRE_ATTR |
static String |
TASK_ATTR |
ON_EXCEPTION, ON_EXCEPTION_CONTINUE, ON_EXCEPTION_CONTINUE_STR, ON_EXCEPTION_IGNORE, ON_EXCEPTION_IGNORE_STR, ON_EXCEPTION_MERGE, ON_EXCEPTION_MERGE_STR, ON_EXCEPTION_RAISE, ON_EXCEPTION_RAISE_KEY, ON_EXCEPTION_RAISE_STR, ON_EXCEPTION_TYPE, ON_PARSE_EXCEPTION, ON_PARSE_EXCEPTION_STR
Constructor and Description |
---|
Task()
Instantiates a new task.
|
Modifier and Type | Method and Description |
---|---|
void |
addScope(int value)
Adds the scope.
|
void |
addVariable(Variable var)
Adds the variable.
|
void |
addVariables(ListHashMap<String,Variable> value)
Adds the variables.
|
boolean |
commitWhenDone()
Checks if commit need to be executed when done.
|
void |
enableMetrics(boolean value)
Enable metrics.
|
int |
getAsynchronous()
Checks if task is asynchronous.
|
String |
getClassName()
Gets the task class name.
|
String |
getCode()
Gets the code.
|
Connection |
getConnection()
Gets the connection.
|
String |
getConnectionName()
Gets the connection name.
|
DataSet |
getDataSet()
Gets the data set.
|
String |
getDefaultConnectionName()
Gets the default connection name.
|
Driver |
getDriver()
Gets the driver.
|
String |
getDriverClassName()
Gets the driver class name.
|
Point |
getEndLocation()
Gets the end location.
|
String |
getFlow()
Gets the flow name.
|
String |
getIdForException()
Gets the id for exception.
|
TypedKeyValue<Point,Point> |
getLocation(String key)
Gets the location of the collection artifact such as sources, destinations, variables, etc.
|
Map<String,TypedKeyValue<Point,Point>> |
getLocations()
The the locations of the collection artifacts such as sources, destinations, etc.
|
String |
getName()
Gets the name.
|
int |
getOnExceptionActions(String action)
Parsers given type and creates a list of "on exception" actions.
|
OnTask |
getOnTask()
Gets the instance of the class implementing OnTask interface.
|
Block |
getOwner()
Gets the owner.
|
String |
getParamValue(String value,
String varName,
String def)
Gets the task parameter value.
|
Scenario |
getScenario()
Gets the scenario.
|
int |
getScope()
Gets the scope.
|
Source |
getSource()
Gets the source.
|
Point |
getStartLocation()
Gets the start location.
|
String |
getString(String key)
Gets the string representation of the value by the key.
|
String |
getTableName()
Gets the table name.
|
String |
getUsing()
Gets the "using".
|
String |
getUuid()
Gets the uuid.
|
Object |
getValue(String key)
Gets the value by the key.
|
Variable |
getVariable(String name)
Gets the variable by name.
|
ListHashMap<String,Variable> |
getVariables()
Gets the variables.
|
boolean |
isEnabled()
Checks if task is enabled.
|
boolean |
isFinal()
If task is final it must be executed at the very end of the etl process.
|
boolean |
isMetricsEnabled()
Checks if is metrics enabled.
|
boolean |
isScopeSet(int value)
Checks if scope is set.
|
boolean |
noConnection()
"No connection" flag.
|
int |
parseScope(String scope)
Parses the scope.
|
void |
setAsynchronous(int asynchronous)
Sets the asynchronous flag.
|
void |
setClassName(String value)
Sets the class name.
|
void |
setCode(String value)
Sets the code.
|
void |
setCommitWhenDone(boolean value)
Sets the "commit when done" flag.
|
void |
setConnection(Connection value)
Sets the connection.
|
void |
setConnectionName(String value)
Sets the connection name.
|
void |
setDataSet(DataSet value)
Sets the data set.
|
void |
setDefaultFromVar(Map<String,Object> defs,
String attrName,
String varName)
Sets the default value to the model attribute using given variable.
|
void |
setDefaultFromVar(Map<String,Object> defs,
String attrName,
String varName,
String def)
Sets the default value to the model attribute using given variable.
|
void |
setDefaults(Map<String,Object> defs,
OnTask onTask)
Set default values for the model attributes used to edit task.
|
void |
setDriver(Driver value)
Sets the driver.
|
void |
setDriverClassName(String value)
Sets the driver class name.
|
void |
setEnabled(boolean value)
Sets the is enabled flag.
|
void |
setFinal(boolean isFinal)
Sets the "is final" attribute of the task.
|
void |
setFlow(String flow)
Sets the flow name.
|
void |
setLocation(boolean doSet,
String key,
org.w3c.dom.Node treesNode)
Set the location for the artifacts such as variables, etc.
|
void |
setLocation(boolean doSet,
String key,
TypedKeyValue<Point,Point> location)
Set the location for the artifacts such as variables, etc.
|
void |
setName(String value)
Sets the name.
|
void |
setNoConnection(boolean value)
Sets the "no connection" flag.
|
void |
setOnTask(OnTask value)
Sets the instance of the
OnTask interface. |
void |
setOwner(Block block)
Sets the owner.
|
void |
setScenario(Scenario value)
Sets the scenario.
|
void |
setSource(Source value)
Sets the source.
|
void |
setTableName(String value)
Sets the table name.
|
void |
setUsing(String value)
Sets the "using".
|
void |
setValue(String key,
Object value)
Associates value with the key.
|
void |
setVariables(ListHashMap<String,Variable> value)
Sets the variables.
|
findException, getExceptionActions, getExceptionMask, getKeyFields, getMessage, getOnExceptionAction, handleException, hasAllExceptions, isSavePoint, log, setExceptionMask, setKeyFields, setMessage, setOnExceptionAction, setOnExceptionAction, setSavePoint
getConditionCode, getConditionConnectionName, getConditionLang, setConditionCode, setConditionConnectionName, setConditionLang
public static final String TASK_ATTR
public static final String NAME_ATTR
public static final String SCOPE_ON_EXCEPTION_ATTR
public static final String SCOPE_PRE_ATTR
public static final String SCOPE_AFTER_ATTR
public static final String SCOPE_INLINE_ATTR
public static final String ON_EXCEPTION_ATTR
public static final String ON_EXCEPTION_MASK_ATTR
public static final String ON_EXCEPTION_MESSAGE_ATTR
public static final String ENABLED_ATTR
public static final String COND_lANG_ATTR
public static final String COND_CONNECTION_ATTR
public static final String CONDITION_ATTR
public static final String ASYNCHRONOUS_ATTR
public static final String METRICS_ENABLED_ATTR
public static final int AS_CONFIGURED
public static final int PRE
public static final int POST
public static final int INLINE
public static final int BEFORE_ETL
public static final int ON_EXCEPTION_TASK
public static final String PRE_STR
public static final String POST_STR
public static final String INLINE_STR
public static final String BEFORE_ETL_STR
public static final String ON_EXCEPTION_STR
public static final Map<String,Integer> SCOPE
public void addScope(int value)
value
- the new scope. Possible values: PRE
, POST
, INLINE
, BEFORE_ETL
public void addVariable(Variable var)
var
- the variablepublic void addVariables(ListHashMap<String,Variable> value)
value
- the variablespublic boolean commitWhenDone()
public void enableMetrics(boolean value)
value
- the valuepublic String getClassName()
OnTask
interface.public String getCode()
public Connection getConnection()
public String getConnectionName()
public DataSet getDataSet()
public String getDefaultConnectionName()
ConditionalExecution
getDefaultConnectionName
in class ConditionalExecution
public Driver getDriver()
public String getDriverClassName()
public Point getEndLocation()
LocationProvider
getEndLocation
in interface LocationProvider
public TypedKeyValue<Point,Point> getLocation(String key)
key
- the artifact type namepublic Map<String,TypedKeyValue<Point,Point>> getLocations()
public String getName()
OnException
getName
in class OnException
public int getOnExceptionActions(String action)
OnException
getOnExceptionActions
in class OnException
action
- the typepublic OnTask getOnTask()
getClassName()
.public Block getOwner()
public String getParamValue(String value, String varName, String def)
value
- the valuevarName
- the variable namedef
- the default valuepublic Scenario getScenario()
public int getScope()
public Source getSource()
public Point getStartLocation()
LocationProvider
getStartLocation
in interface LocationProvider
public String getString(String key)
ObjectStorage
getString
in interface ObjectStorage
key
- the keypublic String getTableName()
public String getUsing()
public Object getValue(String key)
ObjectStorage
getValue
in interface ObjectStorage
key
- the keypublic Variable getVariable(String name)
name
- the namepublic ListHashMap<String,Variable> getVariables()
public boolean isEnabled()
public boolean isMetricsEnabled()
public boolean isScopeSet(int value)
value
- possible values: Task.PRE, Task.POST, Task.INLINE, Task.BEFORE_ETLpublic boolean noConnection()
public int parseScope(String scope)
scope
- the "|" delimited string of possible scope codespublic void setClassName(String value)
OnTask
interface.value
- the new class namepublic void setCode(String value)
value
- the new codepublic void setCommitWhenDone(boolean value)
value
- the new value for the "commit when done" flagpublic void setConnection(Connection value)
value
- the new connectionpublic void setConnectionName(String value)
value
- the new connection namepublic void setDataSet(DataSet value)
value
- the new data setpublic void setDefaultFromVar(Map<String,Object> defs, String attrName, String varName)
defs
- the default valuesattrName
- the model's attribute namevarName
- the variable namepublic void setDefaultFromVar(Map<String,Object> defs, String attrName, String varName, String def)
defs
- the default valuesattrName
- the model's attribute namevarName
- the variable namedef
- the actual default valuepublic void setDefaults(Map<String,Object> defs, OnTask onTask)
defs
- the default valuesonTask
- the instance of OnTask
interfacepublic void setDriver(Driver value)
value
- the new driverpublic void setDriverClassName(String value)
value
- the new driver class namepublic void setEnabled(boolean value)
value
- the new value of the is enabled flagpublic void setLocation(boolean doSet, String key, org.w3c.dom.Node treesNode)
doSet
- if false do not add location info for the artifactkey
- the artifact typetreesNode
- the DOM node which holds location informationpublic void setLocation(boolean doSet, String key, TypedKeyValue<Point,Point> location)
doSet
- if false do not add location info for the artifactkey
- the artifact typelocation
- the locationpublic void setName(String value)
OnException
setName
in class OnException
value
- the new namepublic void setNoConnection(boolean value)
value
- the new value for the "no connection" flag. If true there is no jdbc connection associated with the task.public void setOnTask(OnTask value)
OnTask
interface.value
- the new instance of the OnTask
interfacepublic void setOwner(Block block)
block
- the new ownerpublic void setScenario(Scenario value)
value
- the scenariopublic void setSource(Source value)
value
- the new sourcepublic void setTableName(String value)
value
- the new table namepublic void setUsing(String value)
value
- the new "using"public void setValue(String key, Object value)
ObjectStorage
setValue
in interface ObjectStorage
key
- the keyvalue
- the valuepublic void setVariables(ListHashMap<String,Variable> value)
value
- the variablespublic boolean isFinal()
public void setFinal(boolean isFinal)
isFinal
- the new value of the "is final" attributepublic int getAsynchronous()
public void setAsynchronous(int asynchronous)
asynchronous
- boolean, the new value for asynchronous flagpublic String getFlow()
public void setFlow(String flow)
flow
- the new flow namepublic String getIdForException()
ConditionalExecution
getIdForException
in class ConditionalExecution
public String getUuid()
Copyright © 2010-2020 Toolsverse. All Rights Reserved.