Class BaseLogTable

    • Field Detail

      • 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
      • 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)
      • 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)
      • 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