Package org.pentaho.di.core.logging
Class BaseLogTable
- java.lang.Object
-
- org.pentaho.di.core.logging.BaseLogTable
-
- Direct Known Subclasses:
ChannelLogTable,JobEntryLogTable,JobLogTable,MetricsLogTable,PerformanceLogTable,StepLogTable,TransLogTable
public abstract class BaseLogTable extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected StringconnectionNameprotected HasDatabasesInterfacedatabasesInterfaceprotected List<org.pentaho.di.core.logging.LogTableField>fieldsstatic StringPROP_LOG_TABLE_CONNECTION_NAMEstatic StringPROP_LOG_TABLE_FIELD_ENABLEDstatic StringPROP_LOG_TABLE_FIELD_IDstatic StringPROP_LOG_TABLE_FIELD_NAMEstatic StringPROP_LOG_TABLE_FIELD_SUBJECTstatic StringPROP_LOG_TABLE_INTERVALstatic StringPROP_LOG_TABLE_SCHEMA_NAMEstatic StringPROP_LOG_TABLE_SIZE_LIMITstatic StringPROP_LOG_TABLE_TABLE_NAMEstatic StringPROP_LOG_TABLE_TIMEOUT_DAYSprotected StringschemaNameprotected org.pentaho.di.core.variables.VariableSpacespaceprotected StringtableNameprotected StringtimeoutInDaysstatic StringXML_TAG
-
Constructor Summary
Constructors Constructor Description BaseLogTable(org.pentaho.di.core.variables.VariableSpace space, HasDatabasesInterface databasesInterface, String connectionName, String schemaName, String tableName)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected org.pentaho.di.core.row.RowMetaInterfaceaddFieldsToIndex(org.pentaho.di.core.logging.LogTableField... logTableFields)protected voidaddFieldToIndex(org.pentaho.di.core.logging.LogTableField field, org.pentaho.di.core.row.RowMetaInterface index)protected Objectclone()protected org.pentaho.di.core.row.ValueMetaInterfacecomputeValueMeta(org.pentaho.di.core.logging.LogTableField field)booleancontainsKeyField()booleanequals(Object obj)org.pentaho.di.core.logging.LogTableFieldfindField(String id)Find a log table field in this log table definition.StringBuildergenerateTableSQL(LogTableInterface logTable, AbstractMeta meta)StringgetActualConnectionName()StringgetActualSchemaName()StringgetActualTableName()StringgetConnectionName()abstract StringgetConnectionNameVariable()org.pentaho.di.core.database.DatabaseMetagetDatabaseMeta()org.pentaho.di.core.logging.LogTableFieldgetErrorsField()List<org.pentaho.di.core.logging.LogTableField>getFields()protected StringgetFieldsXML()org.pentaho.di.core.logging.LogTableFieldgetKeyField()protected StringgetLogBuffer(org.pentaho.di.core.variables.VariableSpace space, String logChannelId, org.pentaho.di.core.logging.LogStatus status, String limit)protected StringgetLogBuffer(org.pentaho.di.core.variables.VariableSpace space, String logChannelId, org.pentaho.di.core.logging.LogStatus status, String limit, int logBufferFrom)org.pentaho.di.core.logging.LogTableFieldgetLogDateField()org.pentaho.di.core.logging.LogTableFieldgetLogField()abstract StringgetLogTableCode()org.pentaho.di.core.logging.LogTableFieldgetNameField()StringgetQuotedSchemaTableCombination()StringgetSchemaName()abstract StringgetSchemaNameVariable()org.pentaho.di.core.logging.LogTableFieldgetStatusField()ObjectgetSubject(String id)Get the subject of a field with the specified IDStringgetSubjectString(String id)Return the subject in the form of a string for the specified ID.StringgetTableName()abstract StringgetTableNameVariable()StringgetTimeoutInDays()booleanisDefined()protected booleanisGlobalParameter(String parameter)voidloadFieldsXML(Node node)voidloadFromRepository(org.pentaho.di.repository.RepositoryAttributeInterface attributeInterface)voidreplaceMeta(BaseLogTable baseLogTable)voidsaveToRepository(org.pentaho.di.repository.RepositoryAttributeInterface attributeInterface)Save this core information of the log table to the repository using the specified attribute interface.voidsetAllGlobalParametersToNull()voidsetConnectionName(String connectionName)voidsetFields(List<org.pentaho.di.core.logging.LogTableField> fields)voidsetSchemaName(String schemaName)voidsetTableName(String tableName)voidsetTimeoutInDays(String timeoutInDays)StringtoString()
-
-
-
Field Detail
-
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
-
space
protected org.pentaho.di.core.variables.VariableSpace space
-
databasesInterface
protected HasDatabasesInterface databasesInterface
-
connectionName
protected String connectionName
-
schemaName
protected String schemaName
-
tableName
protected String tableName
-
timeoutInDays
protected String timeoutInDays
-
fields
protected List<org.pentaho.di.core.logging.LogTableField> fields
-
-
Constructor Detail
-
BaseLogTable
public BaseLogTable(org.pentaho.di.core.variables.VariableSpace space, HasDatabasesInterface databasesInterface, String connectionName, String schemaName, String tableName)
-
-
Method Detail
-
replaceMeta
public void replaceMeta(BaseLogTable baseLogTable)
-
clone
protected Object clone() throws CloneNotSupportedException
- Overrides:
clonein classObject- Throws:
CloneNotSupportedException
-
saveToRepository
public void saveToRepository(org.pentaho.di.repository.RepositoryAttributeInterface attributeInterface) throws org.pentaho.di.core.exception.KettleExceptionSave this core information of the log table to the repository using the specified attribute interface.- Parameters:
attributeInterface- The attribute interface to use to set attributes- Throws:
org.pentaho.di.core.exception.KettleException
-
loadFromRepository
public void loadFromRepository(org.pentaho.di.repository.RepositoryAttributeInterface attributeInterface) throws org.pentaho.di.core.exception.KettleException- Throws:
org.pentaho.di.core.exception.KettleException
-
getLogTableCode
public abstract String getLogTableCode()
-
getConnectionNameVariable
public abstract String getConnectionNameVariable()
-
getSchemaNameVariable
public abstract String getSchemaNameVariable()
-
getTableNameVariable
public abstract String getTableNameVariable()
-
getDatabaseMeta
public org.pentaho.di.core.database.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<org.pentaho.di.core.logging.LogTableField> getFields()
- Returns:
- the fields
-
setFields
public void setFields(List<org.pentaho.di.core.logging.LogTableField> fields)
- Parameters:
fields- the fields to set
-
findField
public org.pentaho.di.core.logging.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 org.pentaho.di.core.logging.LogTableField getLogDateField()
- Returns:
- the field that represents the log date field or null if none was defined.
-
getKeyField
public org.pentaho.di.core.logging.LogTableField getKeyField()
- Returns:
- the field that represents the key to this logging table (batch id etc)
-
getLogField
public org.pentaho.di.core.logging.LogTableField getLogField()
- Returns:
- the field that represents the logging text (or null if none is found)
-
getStatusField
public org.pentaho.di.core.logging.LogTableField getStatusField()
- Returns:
- the field that represents the status (or null if none is found)
-
getErrorsField
public org.pentaho.di.core.logging.LogTableField getErrorsField()
- Returns:
- the field that represents the number of errors (or null if none is found)
-
getNameField
public org.pentaho.di.core.logging.LogTableField getNameField()
- Returns:
- the field that represents the name of the object that is being used (or null if none is found)
-
getFieldsXML
protected String getFieldsXML()
-
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
-
getLogBuffer
protected String getLogBuffer(org.pentaho.di.core.variables.VariableSpace space, String logChannelId, org.pentaho.di.core.logging.LogStatus status, String limit)
-
getLogBuffer
protected String getLogBuffer(org.pentaho.di.core.variables.VariableSpace space, String logChannelId, org.pentaho.di.core.logging.LogStatus status, String limit, int logBufferFrom)
-
setAllGlobalParametersToNull
public void setAllGlobalParametersToNull()
-
isGlobalParameter
protected boolean isGlobalParameter(String parameter)
-
addFieldsToIndex
protected org.pentaho.di.core.row.RowMetaInterface addFieldsToIndex(org.pentaho.di.core.logging.LogTableField... logTableFields)
-
addFieldToIndex
protected void addFieldToIndex(org.pentaho.di.core.logging.LogTableField field, org.pentaho.di.core.row.RowMetaInterface index)
-
computeValueMeta
protected org.pentaho.di.core.row.ValueMetaInterface computeValueMeta(org.pentaho.di.core.logging.LogTableField field)
-
generateTableSQL
public StringBuilder generateTableSQL(LogTableInterface logTable, AbstractMeta meta) throws org.pentaho.di.core.exception.KettleException
- Throws:
org.pentaho.di.core.exception.KettleException
-
-