Package io.camunda.migrator.impl.clients
Class DbClient
java.lang.Object
io.camunda.migrator.impl.clients.DbClient
Wrapper class for IdKeyMapper database operations with exception handling.
Maintains the same exception wrapping behavior as ExceptionUtils.callApi.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckExistsByC7IdAndType(String c7Id, IdKeyMapper.TYPE type) Checks if an entity exists in the mapping table by type and id.booleancheckHasC8KeyByC7IdAndType(String c7Id, IdKeyMapper.TYPE type) Checks if an entity exists in the mapping table by type and id.Finds the count of skipped entities for all typesFinds the count of skipped entities for the given typeprotected IdKeyDbModelcreateIdKeyDbModel(String c7Id, Date createTime, Long c8Key, IdKeyMapper.TYPE type) Creates a new IdKeyDbModel instance with the provided parameters.protected IdKeyDbModelcreateIdKeyDbModel(String c7Id, Date createTime, Long c8Key, IdKeyMapper.TYPE type, String skipReason) Creates a new IdKeyDbModel instance with the provided parameters including skip reason.voidDeletes all mappings from the database.protected voiddeleteByC7Id(String c7Id) Deletes a mapping by C7 ID.voidfetchAndHandleSkippedForType(IdKeyMapper.TYPE type, Consumer<IdKeyDbModel> callback) Processes skipped entities with pagination.Finds all C7 IDs.findC8KeyByC7IdAndType(String c7Id, IdKeyMapper.TYPE type) Finds the key by C7 ID and type.Finds the latest create time by type.Finds the Ids of all skipped process instances.voidinsert(String c7Id, Long c8Key, IdKeyMapper.TYPE type) Inserts a new record into the mapping table.voidinsert(String c7Id, Long c8Key, Date createTime, IdKeyMapper.TYPE type) Inserts a new process instance record into the mapping table.voidInserts a new process instance record into the mapping table.voidLists skipped entities by type with pagination and prints them.voidupdateC8KeyByC7IdAndType(String c7Id, Long c8Key, IdKeyMapper.TYPE type) Updates a record by setting the key for an existing ID and type.voidupdateSkipReason(String c7Id, IdKeyMapper.TYPE type, String skipReason)
-
Field Details
-
properties
-
idKeyMapper
-
-
Constructor Details
-
DbClient
public DbClient()
-
-
Method Details
-
checkExistsByC7IdAndType
Checks if an entity exists in the mapping table by type and id. -
checkHasC8KeyByC7IdAndType
Checks if an entity exists in the mapping table by type and id. -
findLatestCreateTimeByType
Finds the latest create time by type. -
findC8KeyByC7IdAndType
Finds the key by C7 ID and type. -
findAllC7Ids
Finds all C7 IDs. -
updateC8KeyByC7IdAndType
Updates a record by setting the key for an existing ID and type. -
updateSkipReason
-
insert
Inserts a new process instance record into the mapping table. -
insert
Inserts a new record into the mapping table. -
insert
public void insert(String c7Id, Long c8Key, Date createTime, IdKeyMapper.TYPE type, String skipReason) Inserts a new process instance record into the mapping table. -
listSkippedEntitiesByType
Lists skipped entities by type with pagination and prints them. -
fetchAndHandleSkippedForType
Processes skipped entities with pagination. -
countSkipped
Finds the count of skipped entities for all types -
countSkippedByType
Finds the count of skipped entities for the given type -
findSkippedProcessInstances
Finds the Ids of all skipped process instances. -
deleteAllMappings
public void deleteAllMappings()Deletes all mappings from the database. -
deleteByC7Id
Deletes a mapping by C7 ID. -
createIdKeyDbModel
protected IdKeyDbModel createIdKeyDbModel(String c7Id, Date createTime, Long c8Key, IdKeyMapper.TYPE type, String skipReason) Creates a new IdKeyDbModel instance with the provided parameters including skip reason. -
createIdKeyDbModel
protected IdKeyDbModel createIdKeyDbModel(String c7Id, Date createTime, Long c8Key, IdKeyMapper.TYPE type) Creates a new IdKeyDbModel instance with the provided parameters.
-