abstract class AbstractJDBCHashSet<K : Any, out T : JDBCHashedTable> : MutableSet<K>, AbstractSet<K>
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 AbstractJDBCHashMap for implementation details.
<init> |
AbstractJDBCHashSet(table: T, loadOnInit: Boolean = false) 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(). |
innerMap |
val innerMap: AbstractJDBCHashMap<K, Unit, T> |
size |
open val size: Int |
table |
val table: T |
add |
open fun add(element: K): Boolean |
addElementToInsert |
abstract fun addElementToInsert(insert: <ERROR CLASS>, entry: K, finalizables: MutableList<() -> Unit>): Unit Implementation should marshall the element to the insert statement. |
clear |
open fun clear(): Unit |
contains |
open fun contains(element: K): Boolean |
elementFromRow |
abstract fun elementFromRow(row: <ERROR CLASS>): K Implementation should return the element object marshalled from the database table row. |
isEmpty |
open fun isEmpty(): Boolean |
iterator |
open fun iterator(): MutableIterator<K> |
remove |
open fun remove(element: K): Boolean |
isOrderedAndUnique |
fun <T, I : Comparable<I>> Iterable<T>.isOrderedAndUnique(extractId: T.() -> I): Boolean Determine if an iterable data types contents are ordered and unique, based on their Comparable.compareTo function. |
noneOrSingle |
fun <T> Iterable<T>.noneOrSingle(predicate: (T) -> Boolean): T? Returns the single element matching the given predicate, or fun <T> Iterable<T>.noneOrSingle(): T? Returns single element, or |
JDBCHashSet |
class JDBCHashSet<K : Any> : AbstractJDBCHashSet<K, BlobSetTable> A convenient JDBC table backed hash set with iteration order based on insertion order. See AbstractJDBCHashSet and AbstractJDBCHashMap for further implementation details. |