EquinoxItemsHelper

@TestOnly
abstract class EquinoxItemsHelper<T : EquinoxItem?>

Deprecated

This class is used as test here, but will be integrated in the next version of Equinox

The EquinoxItemsHelper class is useful to manage all the EquinoxItem database operations

Author

N7ghtm4r3 - Tecknobit

Inheritors

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
interface BatchQuery
The BatchQuery interface to manage the batch queries to insert or delete items in batch
Link copied to clipboard
The ItemsManagementWorkflow interface useful to manage the workflow to manage items on them insertion or deletion

Properties

Link copied to clipboard
private val COMMA: String = ","
COMMA comma character
Link copied to clipboard
protected open var entityManager: EntityManager
entityManager entity manager helper
Link copied to clipboard
protected val RELATIONSHIP_VALUES_SLICE: String = "(?, ?)"
RELATIONSHIP_VALUES_SLICE query part to insert in the join table new row
Link copied to clipboard
private val ROUND_BRACKET: String = ")"
ROUND_BRACKET round bracket character
Link copied to clipboard
private val SINGLE_QUOTE: String = "'"
SINGLE_QUOTE single quote character
Link copied to clipboard
protected val TUPLE_VALUES_SLICE: String = "(?, ?, ?)"
TUPLE_VALUES_SLICE query part to insert in the join table new row

Functions

Link copied to clipboard
private open fun <I> assembleDeleteBatchQuery(deleteQuery: String, itemToDeleteId: String, values: List<I>): Query
Method to assemble a batch query to delete items
Link copied to clipboard
private open fun <I> assembleInsertBatchQuery(insertQuery: String, valuesSlice: String, values: Collection<I>): Query
Method to assemble the batch query to insert items
Link copied to clipboard
protected open fun <I> executeDeleteBatch(deleteQuery: String, itemToDeleteId: String, values: List<I>)
Method to execute a batch query to delete items
Link copied to clipboard
protected open fun <I> executeInsertBatch(insertQuery: String, valuesSlice: String, values: Collection<I>, batchQuery: EquinoxItemsHelper.BatchQuery)
Method to execute a batch query to insert items
Link copied to clipboard
@TestOnly
open fun getItemIfAllowed(userId: String, itemId: String): T
Method used to get an item if the user is authorized
Link copied to clipboard
protected open fun manageItems(workflow: EquinoxItemsHelper.ItemsManagementWorkflow, itemId: String, ids: List<String>)
protected open fun manageItems(workflow: EquinoxItemsHelper.ItemsManagementWorkflow, valuesSlice: String, itemId: String, ids: List<String>, batchQuery: EquinoxItemsHelper.BatchQuery)
Method to manage the items of an item to a container