Class SQLCommitterConfig

java.lang.Object
com.norconex.committer.sql.SQLCommitterConfig
All Implemented Interfaces:
Serializable

public class SQLCommitterConfig extends Object implements Serializable

SQL Committer configuration.

See Also:
  • Field Details

    • DEFAULT_SQL_CONTENT_FIELD

      public static final String DEFAULT_SQL_CONTENT_FIELD
      Default SQL content field
      See Also:
    • DEFAULT_MULTI_VALUES_JOINER

      public static final String DEFAULT_MULTI_VALUES_JOINER
      Default multi-value join string
      See Also:
  • Constructor Details

    • SQLCommitterConfig

      public SQLCommitterConfig()
  • Method Details

    • getDriverPath

      public String getDriverPath()
      Gets the path to the JDBC driver JAR file.
      Returns:
      driver JAR path
    • setDriverPath

      public void setDriverPath(String driverPath)
      Sets the path to the JDBC driver JAR file.
      Parameters:
      driverPath - driver JAR path
    • getDriverClass

      public String getDriverClass()
      Gets the fully-qualified JDBC driver class name.
      Returns:
      JDBC driver class name
    • setDriverClass

      public void setDriverClass(String driverClass)
      Sets the fully-qualified JDBC driver class name.
      Parameters:
      driverClass - JDBC driver class name
    • getConnectionUrl

      public String getConnectionUrl()
      Gets the JDBC connection URL.
      Returns:
      JDBC connection URL
    • setConnectionUrl

      public void setConnectionUrl(String connectionUrl)
      Sets the JDBC connection URL.
      Parameters:
      connectionUrl - JDBC connection URL
    • getCredentials

      public Credentials getCredentials()
      Gets the database authentication credentials.
      Returns:
      credentials
    • setCredentials

      public void setCredentials(Credentials credentials)
      Sets the database authentication credentials.
      Parameters:
      credentials - the credentials
    • getProperties

      public Properties getProperties()
      Gets additional JDBC connection properties.
      Returns:
      JDBC connection properties
    • setProperties

      public void setProperties(Properties properties)
      Sets additional JDBC connection properties.
      Parameters:
      properties - JDBC connection properties
    • getTableName

      public String getTableName()
      Gets the target table name.
      Returns:
      table name
    • setTableName

      public void setTableName(String tableName)
      Sets the target table name.
      Parameters:
      tableName - table name
    • getCreateTableSQL

      public String getCreateTableSQL()
      Gets the SQL statement used to create the target table when it does not exist. Use {tableName} and {primaryKey} as placeholders.
      Returns:
      table creation SQL
    • setCreateTableSQL

      public void setCreateTableSQL(String createTableSQL)
      Sets the SQL statement used to create the target table when it does not exist. Use {tableName} and {primaryKey} as placeholders.
      Parameters:
      createTableSQL - table creation SQL
    • getCreateFieldSQL

      public String getCreateFieldSQL()
      Gets the SQL statement used to add a new column when a document field has no matching column. Use {fieldName} as a placeholder.
      Returns:
      field/column creation SQL
    • setCreateFieldSQL

      public void setCreateFieldSQL(String createFieldSQL)
      Sets the SQL statement used to add a new column when a document field has no matching column. Use {fieldName} as a placeholder.
      Parameters:
      createFieldSQL - field/column creation SQL
    • getMultiValuesJoiner

      public String getMultiValuesJoiner()
      Gets the separator used to join multi-valued fields into a single string. Default is "|".
      Returns:
      multi-values joiner string
    • setMultiValuesJoiner

      public void setMultiValuesJoiner(String multiValuesJoiner)
      Sets the separator used to join multi-valued fields into a single string.
      Parameters:
      multiValuesJoiner - separator string
    • isFixFieldNames

      public boolean isFixFieldNames()
      Gets whether to sanitize field names to conform to SQL identifier rules.
      Returns:
      true if field names are sanitized
    • setFixFieldNames

      public void setFixFieldNames(boolean fixFieldNames)
      Sets whether to sanitize field names to conform to SQL identifier rules.
      Parameters:
      fixFieldNames - true to sanitize field names
    • isFixFieldValues

      public boolean isFixFieldValues()
      Gets whether to truncate field values that exceed the column length.
      Returns:
      true if field values are truncated
    • setFixFieldValues

      public void setFixFieldValues(boolean fixFieldValues)
      Sets whether to truncate field values that exceed the column length.
      Parameters:
      fixFieldValues - true to truncate oversized values
    • getTargetContentField

      public String getTargetContentField()
      Gets the SQL column name where the document content is stored. Default is "content".
      Returns:
      target content column name
    • setTargetContentField

      public void setTargetContentField(String targetContentField)
      Sets the SQL column name where the document content is stored.
      Parameters:
      targetContentField - target content column name
    • getPrimaryKey

      public String getPrimaryKey()
      Gets the primary key column name.
      Returns:
      primary key column name
    • setPrimaryKey

      public void setPrimaryKey(String primaryKey)
      Sets the primary key column name.
      Parameters:
      primaryKey - primary key column name
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object