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 String
connectionName
protected HasDatabasesInterface
databasesInterface
protected List<org.pentaho.di.core.logging.LogTableField>
fields
static String
PROP_LOG_TABLE_CONNECTION_NAME
static String
PROP_LOG_TABLE_FIELD_ENABLED
static String
PROP_LOG_TABLE_FIELD_ID
static String
PROP_LOG_TABLE_FIELD_NAME
static String
PROP_LOG_TABLE_FIELD_SUBJECT
static String
PROP_LOG_TABLE_INTERVAL
static String
PROP_LOG_TABLE_SCHEMA_NAME
static String
PROP_LOG_TABLE_SIZE_LIMIT
static String
PROP_LOG_TABLE_TABLE_NAME
static String
PROP_LOG_TABLE_TIMEOUT_DAYS
protected String
schemaName
protected org.pentaho.di.core.variables.VariableSpace
space
protected String
tableName
protected String
timeoutInDays
static String
XML_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.RowMetaInterface
addFieldsToIndex(org.pentaho.di.core.logging.LogTableField... logTableFields)
protected void
addFieldToIndex(org.pentaho.di.core.logging.LogTableField field, org.pentaho.di.core.row.RowMetaInterface index)
protected Object
clone()
protected org.pentaho.di.core.row.ValueMetaInterface
computeValueMeta(org.pentaho.di.core.logging.LogTableField field)
boolean
containsKeyField()
boolean
equals(Object obj)
org.pentaho.di.core.logging.LogTableField
findField(String id)
Find a log table field in this log table definition.StringBuilder
generateTableSQL(LogTableInterface logTable, AbstractMeta meta)
String
getActualConnectionName()
String
getActualSchemaName()
String
getActualTableName()
String
getConnectionName()
abstract String
getConnectionNameVariable()
org.pentaho.di.core.database.DatabaseMeta
getDatabaseMeta()
org.pentaho.di.core.logging.LogTableField
getErrorsField()
List<org.pentaho.di.core.logging.LogTableField>
getFields()
protected String
getFieldsXML()
org.pentaho.di.core.logging.LogTableField
getKeyField()
protected String
getLogBuffer(org.pentaho.di.core.variables.VariableSpace space, String logChannelId, org.pentaho.di.core.logging.LogStatus status, String limit)
org.pentaho.di.core.logging.LogTableField
getLogDateField()
org.pentaho.di.core.logging.LogTableField
getLogField()
abstract String
getLogTableCode()
org.pentaho.di.core.logging.LogTableField
getNameField()
String
getQuotedSchemaTableCombination()
String
getSchemaName()
abstract String
getSchemaNameVariable()
org.pentaho.di.core.logging.LogTableField
getStatusField()
Object
getSubject(String id)
Get the subject of a field with the specified IDString
getSubjectString(String id)
Return the subject in the form of a string for the specified ID.String
getTableName()
abstract String
getTableNameVariable()
String
getTimeoutInDays()
boolean
isDefined()
protected boolean
isGlobalParameter(String parameter)
void
loadFieldsXML(Node node)
void
loadFromRepository(org.pentaho.di.repository.RepositoryAttributeInterface attributeInterface)
void
replaceMeta(BaseLogTable baseLogTable)
void
saveToRepository(org.pentaho.di.repository.RepositoryAttributeInterface attributeInterface)
Save this core information of the log table to the repository using the specified attribute interface.void
setAllGlobalParametersToNull()
void
setConnectionName(String connectionName)
void
setFields(List<org.pentaho.di.core.logging.LogTableField> fields)
void
setSchemaName(String schemaName)
void
setTableName(String tableName)
void
setTimeoutInDays(String timeoutInDays)
String
toString()
-
-
-
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:
clone
in classObject
- Throws:
CloneNotSupportedException
-
saveToRepository
public void saveToRepository(org.pentaho.di.repository.RepositoryAttributeInterface attributeInterface) throws org.pentaho.di.core.exception.KettleException
Save 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)
-
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
-
-