Record Class JDBCEmitterConfig

java.lang.Object
java.lang.Record
org.apache.tika.pipes.emitter.jdbc.JDBCEmitterConfig

public record JDBCEmitterConfig(String connection, String insert, String createTable, String alterTable, String postConnection, int maxRetries, int maxStringLength, LinkedHashMap<String,String> keys, String attachmentStrategy, String multivaluedFieldStrategy, String multivaluedFieldDelimiter) extends Record
  • Constructor Details

    • JDBCEmitterConfig

      public JDBCEmitterConfig(String connection, String insert, String createTable, String alterTable, String postConnection, int maxRetries, int maxStringLength, LinkedHashMap<String,String> keys, String attachmentStrategy, String multivaluedFieldStrategy, String multivaluedFieldDelimiter)
      Creates an instance of a JDBCEmitterConfig record class.
      Parameters:
      connection - the value for the connection record component
      insert - the value for the insert record component
      createTable - the value for the createTable record component
      alterTable - the value for the alterTable record component
      postConnection - the value for the postConnection record component
      maxRetries - the value for the maxRetries record component
      maxStringLength - the value for the maxStringLength record component
      keys - the value for the keys record component
      attachmentStrategy - the value for the attachmentStrategy record component
      multivaluedFieldStrategy - the value for the multivaluedFieldStrategy record component
      multivaluedFieldDelimiter - the value for the multivaluedFieldDelimiter record component
  • Method Details

    • load

      public static JDBCEmitterConfig load(String json) throws TikaConfigException
      Throws:
      TikaConfigException
    • validate

      public void validate() throws TikaConfigException
      Throws:
      TikaConfigException
    • getAttachmentStrategyEnum

      public JDBCEmitterConfig.AttachmentStrategy getAttachmentStrategyEnum() throws TikaConfigException
      Throws:
      TikaConfigException
    • getMultivaluedFieldStrategyEnum

      public JDBCEmitterConfig.MultivaluedFieldStrategy getMultivaluedFieldStrategyEnum() throws TikaConfigException
      Throws:
      TikaConfigException
    • getEffectiveMaxStringLength

      public int getEffectiveMaxStringLength()
      Returns the effective maxStringLength, using the default of 64000 if not set or 0.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • connection

      public String connection()
      Returns the value of the connection record component.
      Returns:
      the value of the connection record component
    • insert

      public String insert()
      Returns the value of the insert record component.
      Returns:
      the value of the insert record component
    • createTable

      public String createTable()
      Returns the value of the createTable record component.
      Returns:
      the value of the createTable record component
    • alterTable

      public String alterTable()
      Returns the value of the alterTable record component.
      Returns:
      the value of the alterTable record component
    • postConnection

      public String postConnection()
      Returns the value of the postConnection record component.
      Returns:
      the value of the postConnection record component
    • maxRetries

      public int maxRetries()
      Returns the value of the maxRetries record component.
      Returns:
      the value of the maxRetries record component
    • maxStringLength

      public int maxStringLength()
      Returns the value of the maxStringLength record component.
      Returns:
      the value of the maxStringLength record component
    • keys

      public LinkedHashMap<String,String> keys()
      Returns the value of the keys record component.
      Returns:
      the value of the keys record component
    • attachmentStrategy

      public String attachmentStrategy()
      Returns the value of the attachmentStrategy record component.
      Returns:
      the value of the attachmentStrategy record component
    • multivaluedFieldStrategy

      public String multivaluedFieldStrategy()
      Returns the value of the multivaluedFieldStrategy record component.
      Returns:
      the value of the multivaluedFieldStrategy record component
    • multivaluedFieldDelimiter

      public String multivaluedFieldDelimiter()
      Returns the value of the multivaluedFieldDelimiter record component.
      Returns:
      the value of the multivaluedFieldDelimiter record component