org.pentaho.di.core.logging
Class TransLogTable
java.lang.Object
org.pentaho.di.core.logging.TransLogTable
- All Implemented Interfaces:
- Cloneable, LogTableInterface
public class TransLogTable
- extends Object
- implements Cloneable, LogTableInterface
This class describes a transformation logging table
- Author:
- matt
Methods inherited from interface org.pentaho.di.core.logging.LogTableInterface |
getActualSchemaName, getActualTableName, getConnectionName, getDatabaseMeta, getErrorsField, getFields, getKeyField, getLogDateField, getLogField, getNameField, getQuotedSchemaTableCombination, getSchemaName, getStatusField, getTableName, getTimeoutInDays, isDefined, setConnectionName |
XML_TAG
public static final String XML_TAG
- See Also:
- Constant Field Values
PROP_LOG_TABLE_CONNECTION_NAME
public static String PROP_LOG_TABLE_CONNECTION_NAME
PROP_LOG_TABLE_SCHEMA_NAME
public static String PROP_LOG_TABLE_SCHEMA_NAME
PROP_LOG_TABLE_TABLE_NAME
public static String PROP_LOG_TABLE_TABLE_NAME
PROP_LOG_TABLE_FIELD_ID
public static String PROP_LOG_TABLE_FIELD_ID
PROP_LOG_TABLE_FIELD_NAME
public static String PROP_LOG_TABLE_FIELD_NAME
PROP_LOG_TABLE_FIELD_ENABLED
public static String PROP_LOG_TABLE_FIELD_ENABLED
PROP_LOG_TABLE_FIELD_SUBJECT
public static String PROP_LOG_TABLE_FIELD_SUBJECT
PROP_LOG_TABLE_INTERVAL
public static String PROP_LOG_TABLE_INTERVAL
PROP_LOG_TABLE_SIZE_LIMIT
public static String PROP_LOG_TABLE_SIZE_LIMIT
PROP_LOG_TABLE_TIMEOUT_DAYS
public static String PROP_LOG_TABLE_TIMEOUT_DAYS
TransLogTable
public TransLogTable(VariableSpace space,
HasDatabasesInterface databasesInterface,
List<StepMeta> steps)
clone
public Object clone()
- Overrides:
clone
in class Object
getXML
public String getXML()
loadXML
public void loadXML(Node node,
List<DatabaseMeta> databases,
List<StepMeta> steps)
saveToRepository
public void saveToRepository(RepositoryAttributeInterface attributeInterface)
throws KettleException
- Save this core information of the log table to the repository using the specified attribute interface.
- Specified by:
saveToRepository
in interface LogTableInterface
- Parameters:
attributeInterface
- The attribute interface to use to set attributes
- Throws:
KettleException
loadFromRepository
public void loadFromRepository(RepositoryAttributeInterface attributeInterface)
throws KettleException
- Description copied from interface:
LogTableInterface
- Loads details of the log table from a repository.
- Specified by:
loadFromRepository
in interface LogTableInterface
- Parameters:
attributeInterface
- The attribute interface used to load the attributes
- Throws:
KettleException
getDefault
public static TransLogTable getDefault(VariableSpace space,
HasDatabasesInterface databasesInterface,
List<StepMeta> steps)
findField
public LogTableField findField(TransLogTable.ID id)
getSubject
public Object getSubject(TransLogTable.ID id)
getSubjectString
public String getSubjectString(TransLogTable.ID id)
setBatchIdUsed
public void setBatchIdUsed(boolean use)
isBatchIdUsed
public boolean isBatchIdUsed()
setLogFieldUsed
public void setLogFieldUsed(boolean use)
isLogFieldUsed
public boolean isLogFieldUsed()
getStepnameRead
public String getStepnameRead()
setStepRead
public void setStepRead(StepMeta read)
getStepnameWritten
public String getStepnameWritten()
setStepWritten
public void setStepWritten(StepMeta written)
getStepnameInput
public String getStepnameInput()
setStepInput
public void setStepInput(StepMeta input)
getStepnameOutput
public String getStepnameOutput()
setStepOutput
public void setStepOutput(StepMeta output)
getStepnameUpdated
public String getStepnameUpdated()
setStepUpdate
public void setStepUpdate(StepMeta update)
getStepnameRejected
public String getStepnameRejected()
setStepRejected
public void setStepRejected(StepMeta rejected)
setLogInterval
public void setLogInterval(String logInterval)
- Sets the logging interval in seconds.
Disabled if the logging interval is <=0.
- Parameters:
logInterval
- The log interval value. A value higher than 0 means that the log table is updated every 'logInterval' seconds.
getLogInterval
public String getLogInterval()
- Get the logging interval in seconds.
Disabled if the logging interval is <=0.
A value higher than 0 means that the log table is updated every 'logInterval' seconds.
- Parameters:
logInterval
- The log interval,
getLogSizeLimit
public String getLogSizeLimit()
- Returns:
- the logSizeLimit
setLogSizeLimit
public void setLogSizeLimit(String logSizeLimit)
- Parameters:
logSizeLimit
- the logSizeLimit to set
getLogRecord
public RowMetaAndData getLogRecord(LogStatus status,
Object subject,
Object parent)
- This method calculates all the values that are required
- Specified by:
getLogRecord
in interface LogTableInterface
- Parameters:
id
- the id to use or -1 if no id is neededstatus
- the log status to usesubject
- the subject to query, in this case a Trans object
- Returns:
- The log record to write
getLogTableCode
public String getLogTableCode()
getLogTableType
public String getLogTableType()
- Specified by:
getLogTableType
in interface LogTableInterface
getConnectionNameVariable
public String getConnectionNameVariable()
- Specified by:
getConnectionNameVariable
in interface LogTableInterface
getSchemaNameVariable
public String getSchemaNameVariable()
- Specified by:
getSchemaNameVariable
in interface LogTableInterface
getTableNameVariable
public String getTableNameVariable()
- Specified by:
getTableNameVariable
in interface LogTableInterface
getRecommendedIndexes
public List<RowMetaInterface> getRecommendedIndexes()
- Specified by:
getRecommendedIndexes
in interface LogTableInterface
- Returns:
- A list of rows that contain the recommended indexed fields for this logging table.
toString
public String toString()
- Overrides:
toString
in class Object
getDatabaseMeta
public DatabaseMeta getDatabaseMeta()
- Returns:
- the databaseMeta
getActualConnectionName
public String getActualConnectionName()
- Returns:
- the connectionName
getActualSchemaName
public String getActualSchemaName()
- Returns:
- the schemaName
setSchemaName
public void setSchemaName(String schemaName)
- Parameters:
schemaName
- the schemaName to set
getSchemaName
public String getSchemaName()
getActualTableName
public String getActualTableName()
- Returns:
- the tableName
getTableName
public String getTableName()
setTableName
public void setTableName(String tableName)
- Parameters:
tableName
- the tableName to set
getQuotedSchemaTableCombination
public String getQuotedSchemaTableCombination()
getFields
public List<LogTableField> getFields()
- Returns:
- the fields
setFields
public void setFields(List<LogTableField> fields)
- Parameters:
fields
- the fields to set
findField
public LogTableField findField(String id)
- Find a log table field in this log table definition.
Use the id of the field to do the lookup.
- Parameters:
id
- the id of the field to search for
- Returns:
- the log table field or null if nothing was found.
getSubject
public Object getSubject(String id)
- Get the subject of a field with the specified ID
- Parameters:
id
-
- Returns:
- the subject or null if no field could be find with the specified id
getSubjectString
public String getSubjectString(String id)
- Return the subject in the form of a string for the specified ID.
- Parameters:
id
- the id of the field to look for.
- Returns:
- the string of the subject (name of step) or null if nothing was found.
containsKeyField
public boolean containsKeyField()
getLogDateField
public LogTableField getLogDateField()
- Returns:
- the field that represents the log date field or null if none was defined.
getKeyField
public LogTableField getKeyField()
- Returns:
- the field that represents the key to this logging table (batch id etc)
getLogField
public LogTableField getLogField()
- Returns:
- the field that represents the logging text (or null if none is found)
getStatusField
public LogTableField getStatusField()
- Returns:
- the field that represents the status (or null if none is found)
getErrorsField
public LogTableField getErrorsField()
- Returns:
- the field that represents the number of errors (or null if none is found)
getNameField
public LogTableField getNameField()
- Returns:
- the field that represents the name of the object that is being used (or null if none is found)
loadFieldsXML
public void loadFieldsXML(Node node)
isDefined
public boolean isDefined()
getTimeoutInDays
public String getTimeoutInDays()
- Returns:
- the timeoutInDays
setTimeoutInDays
public void setTimeoutInDays(String timeoutInDays)
- Parameters:
timeoutInDays
- the timeoutInDays to set
getConnectionName
public String getConnectionName()
- Returns:
- the connectionName
setConnectionName
public void setConnectionName(String connectionName)
- Parameters:
connectionName
- the connectionName to set
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object