net.corda.node.utilities

## Class AbstractJDBCHashSet<K,T extends JDBCHashedTable>

- net.corda.node.utilities.AbstractJDBCHashSet<K,T>

- Direct Known Subclasses:
    JDBCHashSet

      public class AbstractJDBCHashSet<K,T extends JDBCHashedTable>

  Base class for JDBC backed hash set that delegates to a JDBC backed hash map where the values are all Unit and not actually persisted. Iteration order is order of insertion. Iterators can remove().

  See `class AbstractJDBCHashMap` for implementation details.

  See Also:
    `class AbstractJDBCHashMap`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractJDBCHashSet(T table, boolean loadOnInit, int maxBuckets)` Base class for JDBC backed hash set that delegates to a JDBC backed hash map where the values are all Unit and not actually persisted. Iteration order is order of insertion. Iterators can remove().

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `add(K element)`
    `void` | `addElementToInsert(org.jetbrains.exposed.sql.statements.InsertStatement insert, K entry, java.util.List<kotlin.jvm.functions.Function0> finalizables)` Implementation should marshall the element to the insert statement.
    `void` | `clear()`
    `boolean` | `contains(java.lang.Object element)`
    `K` | `elementFromRow(org.jetbrains.exposed.sql.ResultRow row)` Implementation should return the element object marshalled from the database table row.
    `AbstractJDBCHashMap<K,kotlin.Unit,T>` | `getInnerMap()`
    `int` | `getSize()`
    `T` | `getTable()`
    `boolean` | `isEmpty()`
    `java.util.Iterator<K>` | `iterator()`
    `boolean` | `remove(java.lang.Object element)`
    `int` | `size()`

- - ### Constructor Detail

    - #### AbstractJDBCHashSet

          public AbstractJDBCHashSet(T table,
                                     boolean loadOnInit,
                                     int maxBuckets)

      Base class for JDBC backed hash set that delegates to a JDBC backed hash map where the values are all Unit and not actually persisted. Iteration order is order of insertion. Iterators can remove().

      See `class AbstractJDBCHashMap` for implementation details.

      See Also:
        `class AbstractJDBCHashMap`

  - ### Method Detail

    - #### getInnerMap

          public AbstractJDBCHashMap<K,kotlin.Unit,T> getInnerMap()

    - #### add

          public boolean add(K element)

    - #### clear

          public void clear()

    - #### iterator

          public java.util.Iterator<K> iterator()

    - #### remove

          public boolean remove(java.lang.Object element)

    - #### getSize

          public int getSize()

    - #### size

          public int size()

    - #### contains

          public boolean contains(java.lang.Object element)

    - #### isEmpty

          public boolean isEmpty()

    - #### elementFromRow

          public K elementFromRow(org.jetbrains.exposed.sql.ResultRow row)

      Implementation should return the element object marshalled from the database table row.

      See example implementations in `class JDBCHashSet`.

      See Also:
        `class JDBCHashSet`

    - #### addElementToInsert

          public void addElementToInsert(org.jetbrains.exposed.sql.statements.InsertStatement insert,
                                         K entry,
                                         java.util.List<kotlin.jvm.functions.Function0> finalizables)

      Implementation should marshall the element to the insert statement.

      If some cleanup is required after the insert statement is executed, such as closing a Blob, then add a closure to the finalizables to do so.

      See example implementations in `class JDBCHashSet`.

      See Also:
        `class JDBCHashSet`

    - #### getTable

          public T getTable()