BatchSynchronizationProcedure
The BatchSynchronizationProcedure
class is designed to compact and to clean implement a batch synchronization procedure giving the base behavior that a batch synchronization need to have
Author
N7ghtm4r3 - Tecknobit
Since
1.0.8
Parameters
<O>
The type of the owner entity
<D>
The type of the owned entity
<V>
The type of the support item used during the synchronization such JoinTableSyncBatchItem
Types
Link copied to clipboard
The
CurrentDataCallback
interface is useful to define a retriever used to retrieve the current data currently owned by the owner entityProperties
Link copied to clipboard
IN_CLAUSE
in clause query partLink copied to clipboard
batchQuery
the manager of the batch query to executeLink copied to clipboard
CLOSED_ROUND_BRACKET
closed round bracket characterLink copied to clipboard
currentDataCallback
the callback used to retrieve the current data owned by the owner entityLink copied to clipboard
DELETE_FROM_
delete from query commandLink copied to clipboard
entityManager
entity manager helperLink copied to clipboard
model
the model to use during the synchronization procedureLink copied to clipboard
OPENED_ROUND_BRACKET
opened round bracket characterLink copied to clipboard
ownedItems
the collection of the entities owned by the owner entityLink copied to clipboard
QUESTION_MARK
question mark characterLink copied to clipboard
SINGLE_QUOTE
single quote characterFunctions
Link copied to clipboard
protected open fun batchDelete(table: String, values: Collection<out Any>, @NotNull columns: Array<@NotNull String>)
Method used to execute a batch delete of a single list of data simultaneously
Link copied to clipboard
protected open fun <V> batchInsert( command: EquinoxItemsHelper.InsertCommand, table: String, batchQuery: EquinoxItemsHelper.BatchQuery<V>)
Method used to execute a batch insert of a list of data simultaneously
Link copied to clipboard
Method used to create the batch query used by the procedure
Link copied to clipboard
Method used to create the sync batch model used by the procedure
Link copied to clipboard
Method used to execute the batch synchronization
Link copied to clipboard
Method used to get the batchQuery
Link copied to clipboard
Method used to get the currentDataCallback
Link copied to clipboard
Method used to get the model
Link copied to clipboard
Method used to get the ownedItems
Link copied to clipboard
Method used to loads and convert a raw collection of data to the collection used by the procedure
Link copied to clipboard
open fun setCurrentDataCallback(currentDataCallback: BatchSynchronizationProcedure.CurrentDataCallback<D>)
Method used to set the currentDataCallback instance
Link copied to clipboard
protected open fun <V> syncBatch(model: EquinoxItemsHelper.SyncBatchModel, table: String, batchQuery: EquinoxItemsHelper.BatchQuery<V>)
protected open fun <V> syncBatch( model: EquinoxItemsHelper.SyncBatchModel, command: EquinoxItemsHelper.InsertCommand, table: String, batchQuery: EquinoxItemsHelper.BatchQuery<V>)
Method used to execute a batch synchronization of a list of data simultaneously